Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Merge upstream main into guest-audio

Jacky6d284217eb4b
diff --cc Research/vphoned_http_api.md
index 0230aad9,f3eee25f..e9545c25
--- a/Research/vphoned_http_api.md
+++ b/Research/vphoned_http_api.md
@@@ -299,16 -299,16 +299,26 @@@ and whenever the settings change. Sprin
a newly written one holds from the next boot or respring. Measurements:
`Research/Guest/lock_screen_idle_timer.md`.
+`/v1/health` also carries `mobilegestalt_restart_pending`. At startup vphoned
+removes libMobileGestalt's cache,
+`/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.mobilegestaltcache/Library/Caches/com.apple.MobileGestalt.plist`,
+when it is older than the Preboot `devicetree.img4` the guest booted: its
+answers were worked out from an older tree
+(`VPhoneDaemon/Daemon/GuestMobileGestaltCache.swift`). Running processes keep
+the answers they read, so the field is true from that removal until the guest
+restarts, also across a vphoned restart in the same boot; vphoned does not
+restart the guest itself. See `Research/Guest/virtio_sound.md` §7.
+
+ `screen.unlock` reads the lock state, then turns the display on with
+ `SBSUndimScreen` (no toggle, unlike a power press) and presses Home to dismiss
+ the Lock Screen: a passcode-free guest goes to the Home Screen, a guest with a
+ passcode gets the passcode pad, into which `passcode` is typed
+ (`VPhoneDaemon/Daemon/GuestScreenUnlock.swift`). A lit, unlocked guest returns
+ at once; a dark but unlocked one is only woken. A guest with a passcode needs
+ `passcode`, entered once and never retried; without it the call fails before
+ any key is sent. It needs no private entitlement. `timeout` is 1–60 seconds,
+ 10 by default. Measurements: `Research/Guest/screen_unlock.md`.
+
`network.ipv4.get` and `network.ipv4.set` read and write the IPv4 settings of
one interface (default `en0`) in configd's network preferences,
`/var/preferences/SystemConfiguration/preferences.plist`, through SCPreferences