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

A scenario for the fairplayd question

vcvkk47ab4fef121b
diff --git a/userland/rc.jobs.fairplay b/userland/rc.jobs.fairplay
new file mode 100644
index 0000000..452d132
--- /dev/null
+++ b/userland/rc.jobs.fairplay
@@ -0,0 +1,26 @@
+# Commands run by the launchd job com.redwood.demo (see com.redwood.demo.plist).
+# What fairplayd changes (RC_JOBS=rc.jobs.fairplay, the iOS volume on the flash as the root, where the
+# program exists: FLASHBOOT=1, mkjobs.py --root-volume). Two questions, in this order.
+#
+# First, and it needs no finger: does fairplayd stay up? It wants the IOKit user client
+# com_apple_driver_FairPlayIOKitUserClient (its own entitlement names it) and this kernel has no such
+# driver, so it may well go the way CommCenter does. "exited due to SIG" in the log answers it.
+#
+# Second, if it does stay up: the three applications the README blames on its absence. Unlock, then
+# App Store, Podcasts and the Weather widget for half a minute each, with `xl screenshot` from another
+# terminal while each is open. Icon places are the first home-screen page (docs/homescreen.jpg).
+#
+# Before the run, from this working copy: `./xl reload` (the loader has to be this copy's -- one left
+# resident by another copy may not put ufs_shared_pa= on the kernel's command line, and then the kernel's
+# UFS driver never comes up, /dev/ufs_darwin never appears, "mount /dev/ufs_darwin: No such file or
+# directory", and the boot falls back to /sbin/launchd.ios, which exists only in the RAM image), then
+# `./xl ramdisk userland/flashboot.apfs`, then
+# XL_CMDLINE="root_apfs=ufs_darwin ufs=2 ufs_native=1 bootcpu=7 cpus=8 cpufreq=1 touchscreen=1 gpu=1 \
+# adsp=1 wifi=1" XL_SECS=260 ./xl run
+# built with CRYPTEXES=flash FLASHBOOT=1 PREBUILT=1 REST=1 RC_JOBS=rc.jobs.fairplay OSLOG=com.apple.fairplayd.H2
+/redwood/bin/rwtouch wait 32 swipe 0.5 0.985 0.5 0.3 250 wait 10
+/bin/ps -A
+/redwood/bin/rwtouch tap 0.615 0.59 wait 30 button home wait 6
+/redwood/bin/rwtouch tap 0.385 0.59 wait 30 button home wait 6
+/redwood/bin/rwtouch tap 0.27 0.18 wait 30 button home wait 6
+/bin/ps -A