Skip to content

Apple's open-source XNU kernel on Android phones: its own loader and drivers, Metal on the Adreno. Runs from RAM; a reboot gives the phone back to Android.

C

Settings, a first piece: wifid can be let in, and the kernel listens to it

vcvkk5e774e65b56f
diff --git a/userland/build.sh b/userland/build.sh
index 80cbb11..728433b 100755
--- a/userland/build.sh
+++ b/userland/build.sh
@@ -9,6 +9,7 @@
# after init's checks; rc.ios runs a few iOS programs and halts
# JOBS="..." labels of the stock iOS launchd jobs to load (default: IOS_JOBS)
# REST=1 ... and the rest of them, started only when asked for (see mkjobs.py)
+# WIFID=1 ... and wifid, iOS's Wi-Fi daemon (see below at IOS_JOBS)
# OSLOG="..." labels of the jobs whose os_log output goes to the console ("all": every
# one of JOBS; default: only the window server, which says little)
# INJECT="..." the programs started with a library of ours, "LIBRARY NAME..." per line
@@ -59,6 +60,10 @@ IOS_JOBS=${JOBS-"
com.apple.iconservices.iconservicesagent com.apple.pluginkit.pkd
com.apple.SpringBoard
"}
+# WIFID=1: iOS's own Wi-Fi daemon as well (for Settings to have a Wi-Fi to show: the kernel answers it in
+# bsd/dev/redwood_apple80211.c). NOT READY, and not for use: the kernel so far answers three of the eight things
+# wifid asks when it opens the radio, and with wifid and the radio (wifi=1) both there THE SCREEN STAYS DARK.
+[ -n "$WIFID" ] && IOS_JOBS="$IOS_JOBS com.apple.wifid"
# The programs (file names) started with a library of ours inside them: "LIBRARY NAME..." per line
# (src/inject.c is libredwood.dylib, src/inject_sb.c is libredwood-sb.dylib, src/inject_media.c is
# libredwood-media.dylib).
diff --git a/userland/mkjobs.py b/userland/mkjobs.py
index 4b98f02..4f8228e 100755
--- a/userland/mkjobs.py
+++ b/userland/mkjobs.py
@@ -53,6 +53,9 @@ for label in labels:
with open(f'{src}/{label}.plist', 'rb') as f:
job = plistlib.load(f)
job['StandardErrorPath'] = '/dev/console'
+ # a job that is named is wanted, whatever hardware it says it is for: wifid's asks for a node "wlan" in the
+ # device tree, which the loader's tree does not have yet
+ job.pop('_LimitLoadToDeviceTree', None)
if 'all' in oslog or label in oslog:
job.setdefault('EnvironmentVariables', {})['OS_ACTIVITY_DT_MODE'] = 'YES'
with open(f'{dest}/{label}.plist', 'wb') as f: