Run a virtual iPhone on an Apple Silicon Mac.
Swift
Record standard on iOS 18.6 with Frida
Maximilian Paß49d8b42d6061
diff --git a/Documents/Guides/compatibility.md b/Documents/Guides/compatibility.mdindex f836275d..03c14410 100644--- a/Documents/Guides/compatibility.md+++ b/Documents/Guides/compatibility.md@@ -22,12 +22,13 @@ These are the two iPhone17,3 combinations exercised with the native JB pipeline| Research board | `11,6_18.7.2_22H124` | `18.7.2-22H43` | Minimal preset from the CLI (2026-10-21): GPU driver from a temporary cloudOS restore, iOS 18 kernelcache mix linked over ssh by the kmutil of macOS 15.6.1, restore, boot, vphoned ping; screen, lock screen, unlock and home swipes checked || Research board | `11,6_18.1_22B83` | `18.1-22B83` | Minimal preset from the CLI (2026-10-21): GPU driver from a temporary cloudOS restore, kernelcache mix linked over ssh by the kmutil of macOS 15.6.1, restore, boot, vphoned; Hello screen, lock screen, unlock and home swipes checked || Research board | `11,6_18.5_22F76` | `18.5-22F76` | Minimal preset from the CLI (2026-10-21): GPU driver from a temporary cloudOS restore, kernelcache mix linked over ssh by the kmutil of macOS 15.6.1, restore, boot, vphoned; lock screen, unlock and home swipes checked |+| Research board | `11,6_18.6_22G86` | `18.6-22G86` | standard preset from Launchpad's CLI (2026-10-24): kernelcache mix (cached), restore, CFW, boot, vphoned, Hello screen; Frida 17.24.3 attach, spawn, Interceptor and Stalker with the two Frida patches allowed |The cloudOS 26.4 beta image (`26.4-23E5207q`) is the newest one that contains `vphone600ap`, the identity the guest's kernel, SEP and device tree come from, and it stays the recommended cloudOS: it needs nothing beyond vphone-cli. Every cloudOS release after it was checked on 2026-10-03 and lists only the PCC boards and `vresearch101ap`: `iPhone99,11` is gone from `SupportedProductTypes`, and there is no `kernelcache.*.vphone600`, `sep-firmware.vphone600` or `DeviceTree.vphone600ap`.On such a cloudOS the research board stands in (the Research Board patch set): `fw patch` turns its device tree and SEP into vphone600's and rebuilds its kernelcache with the vphone600 virtualisation kexts, from a recipe for that kernelcache. KDK extraction is native; the link still needs root (`vphone-cli fw kernelcache`; see [the recipes](../../VPhoneExecutable/VPhoneVirtualization/Resources/kernelcache_recipes/README.md)). `fw prepare` refuses a cloudOS no recipe covers. `fw catalog` lists each iOS release's own cloudOS beside the recommended one, and Launchpad offers it under Firmware.-iOS 18.1 to 18.7.2 run the same way on their own release's cloudOS, with the userland of the iPhone XS family's IPSWs (`vm create --device iPhone11,6`, the Minimal preset; `fw catalog --device iPhone11,6` lists them). Their kernels are kernel-first: from macOS 26.4 on, another Mac or a macOS VM running macOS 15 or 26.0 to 26.3 links the mix over ssh (`VPHONE_KMUTIL_SSH`, see [Creating and running](create-and-run.md)); Launchpad offers them as the iPhone XS Max, with that Mac as the macOS builder. 18.1, 18.5 and 18.7.2 are checked on VMs; the other four recipes have not been booted yet.+iOS 18.1 to 18.7.2 run the same way on their own release's cloudOS, with the userland of the iPhone XS family's IPSWs (`vm create --device iPhone11,6`, the Minimal preset by default, `--preset standard` checked on 18.6; `fw catalog --device iPhone11,6` lists them). Their kernels are kernel-first: from macOS 26.4 on, another Mac or a macOS VM running macOS 15 or 26.0 to 26.3 links the mix over ssh (`VPHONE_KMUTIL_SSH`, see [Creating and running](create-and-run.md)); Launchpad offers them as the iPhone XS Max, with that Mac as the macOS builder. 18.1, 18.5 and 18.7.2 are checked on VMs; the other four recipes have not been booted yet.| cloudOS | `vresearch101ap` | `vphone600ap` | kernelcache recipe || --- | --- | --- | --- |diff --git a/Documents/Guides/create-and-run.md b/Documents/Guides/create-and-run.mdindex 720f7521..9837f414 100644--- a/Documents/Guides/create-and-run.md+++ b/Documents/Guides/create-and-run.md@@ -175,7 +175,7 @@ Under Firmware, a release that also runs on its own cloudOS (`fw catalog`'s thirThe 2.12 Launchpad interface still shows its legacy ipsw selector for older compatible bundles. Native Core Bundle extraction ignores the selected tool path; the CLI no longer needs it.-The iPhone XS Max runs iOS 18.1 to 18.7.2, each on its own release's cloudOS, with the Minimal preset and no template. Its pairings always rebuild the kernelcache, so Firmware asks for the `ipsw`, and for the macOS builder: `user@host` of a Mac or macOS VM running macOS 15 or 26.0 to 26.3 with Remote Login on, and its password for ssh and sudo (empty with ssh keys and passwordless sudo). Launchpad keeps the builder like the `ipsw`, but not the password, which reaches `vphone-cli` only in its environment (`VPHONE_KMUTIL_SSH_PASSWORD`). The creation then stages and links the mix as you, over ssh; from macOS 26.4 on the builder is required, on an older Mac without one the helper links it as root.+The iPhone XS Max runs iOS 18.1 to 18.7.2, each on its own release's cloudOS, with no template and the Minimal preset by default; Standard works as well (checked on 18.6). Its pairings always rebuild the kernelcache, so Firmware asks for the `ipsw`, and for the macOS builder: `user@host` of a Mac or macOS VM running macOS 15 or 26.0 to 26.3 with Remote Login on, and its password for ssh and sudo (empty with ssh keys and passwordless sudo). Launchpad keeps the builder like the `ipsw`, but not the password, which reaches `vphone-cli` only in its environment (`VPHONE_KMUTIL_SSH_PASSWORD`). The creation then stages and links the mix as you, over ssh; from macOS 26.4 on the builder is required, on an older Mac without one the helper links it as root.The creation runs `vm template find` first. When a current template matches, it clones the machine (`vm create --template <id> --skip-first-boot`) and boots it. When none does, it builds the template in a temporary machine of the same library, named `template-` and eight hex digits, with its usual steps (restore, then `cfw install` through the helper), then `vm template trim`, the headless `vm template setup --strict` and `vm template adopt --iphone-source … --cloudos-source … --expect <id>`, and clones the machine from the result. The setup boot fails when an app it should remove stays, and the adopt fails when the build's key comes out other than the one `find` computed, so a build is never saved under an id later creations would not find. Each is a step of its own with its duration, and a failed one shows the reason `vphone-cli` gave.diff --git a/Research/0_binary_patch_comparison.md b/Research/0_binary_patch_comparison.mdindex b8cf435b..c81efe2e 100644--- a/Research/0_binary_patch_comparison.md+++ b/Research/0_binary_patch_comparison.md@@ -4778,8 +4778,8 @@ iOS 18.1 to 18.7.2 run on their own release's research board kernel, rebuiltwith the vphone600 kexts of the public cloudOS 26.1 (23B78), which still shipsvphone600 components. The userland comes from the iPhone XS family's IPSWs(iPhone11,2/4/6), the only ones carrying every 18.x release, 18.7.x included.-Only `minimal` boots these kernels: `standard`'s kernel patches panic them early-in `kmem_init` (not investigated).+`minimal` boots them as restored; `standard` boots them since 2026-10-24 (see+"`standard` on the iOS 18 research board kernels" below).### The kernelcache@@ -4870,6 +4870,59 @@ oldest base and one of the three with 15 donor kexts, and 18.5 (22F76) oncloudOS 18.5 passed the same checks. The other four recipes resolve everydonor import but have not been booted yet.+### 2026-10-24 — `standard` on the iOS 18 research board kernels++Checked on iOS 18.6 (22G86) on cloudOS 18.6 (22G86), VM restored with+`--preset standard --no-template`: boot, Hello screen with a working display,+vphoned, Setup skipped, and Frida 17.24.3 (`frida-server` as a launch daemon)+attaching to SpringBoard, trustd and backboardd, spawning Settings with an+Interceptor hook and following a foreign SpringBoard thread with Stalker. Every+change below is a second shape, tried only when the 26.x shape is absent: the+cloudOS 26.4 beta vphone600 kernel (as 26.x and as 27.x), the 26.4/26.5/26.6+mixes and the 26.4b/26.4/26.5/26.6 LLB, iBSS, iBEC and TXM patch byte for byte as+before. The 18.6 offsets are of the mix kernelcache and the decompressed images.++**The `kmem_init` panic** was `kernel-boot-thread_guard_violation`, the one+kernel patch pinned to iOS 18 bases and so never before applied to an 18.x+*kernel*. Its anchor chain takes the first BL near the+`com.apple.security.only-one-exception-port` reference whose target has a+TBZ and then a BL; on 18.x that is a zone helper (`tbnz w2, #6` on the alloc+flags), whose callee is a per-CPU zone allocator. `RET` there made every+allocation return garbage, so `kmem_init`'s first `vm_map_enter` failed with+`KERN_INVALID_ARGUMENT`. 18.x `set_exception_behavior_violation` tests+`thid_should_crash` with `ldrb ; cmp #1 ; b.ne` and calls+`thread_guard_violation(current_thread(), …)`; the patch now takes the callee of+the BL after `mrs x0, tpidr_el1` in the window's callees when exactly one exists+(18.6 `0xA21D34`, which compares `get_threadtask()` with `kernel_task` first).+The 26.x kernels match neither shape, as before.++| Patch | 26.x shape | iOS 18 shape (18.6) |+| --- | --- | --- |+| `llb-boot-rootfs` | `mov w8, #0x3b7/#0x3c2/#0x110` (iBoot `__LINE__` codes) | lines moved to `0x3ab`, `0x3b6`, `0x10d`: the last two `cbz w0 ; mov w8, #line` gates of the function holding the unique `cmp x8, #0x400 ; b.hs` (`0x27890`, `0x278E4`), and in the caller of the function laid out after it that tests `ldr xN, [xM, #0x78]` for null, that null check (`0x2B594`) and its last `cbz w0 ; mov w8 ; b` gate (`0x2B790`). Without them LLB falls into recovery once CFW changed the System volume |+| TXM string refs | `adrp ; add` | lone `adr` (+ `nop`): get-task-allow `0x1B5B8`, debugger entitlement `0x1B404`, selector 42/29 stub `0x22EC8` |+| `txm-boot-sel42_29` | `strb w0, [x20, #0x30]` | the flag the gate tests is at `+0x20` (`+0x30` is a pointer): the store is chosen from the gate's `add xT, xObj, #flag ; ldarb` (`ARM64.strbW0X20_20`, keystone-checked) |+| `txm-boot-developer_mode_bypass` | NOP `tbnz w9, #0` before the "system policy" string | `cbz w9, <enable block>` earlier in the function becomes `b` (`0x1B9C4`) |+| `kernel-boot-post_validation` (NOP) | `tbnz` after the TXM CodeSignature log | `cmp w8, #1 ; b.eq`: the `b.eq` is NOPed (`0xEA4C3C`) |+| `kernel-boot-cred_label_update_execve` | separate deny and success caves | `findCodeCave` reserves nothing; when both lookups return the same run, the two share one 40-byte run (`0x984D1C`) |+| `kernel-boot-vm_fault_enter_prepare` | `tbz wFlags, #3 ; mov wT, #0 ; b` | up to four frame reloads between `mov` and `b` (`0xA7A6EC`) |+| `kernel-boot-proc_security_policy` | unique `mov w1, #0x3ea ; bl` | AppleSEPKeyStore makes the same call; ambiguity is resolved to `com.apple.kernel`'s `__TEXT_EXEC` (`0xF08CC8`) |+| `kernel-cfw-proc_pidinfo` | guard pair then `movz w0, #0x16 ; sub` | one frame store between (`0xF0664C`, `0xF06654`) |+| `dyld-boot-iomfb_swapend` | — | now also requires cloudOS ≥ 26.0: an 18.x userland on its own kernel needs no resize, and the resized structure fails (`swap_end returned error e00002c2`, black screen) |+| `kernel-exp-frida_thread_set_state_entitlement_flag`, `kernel-exp-frida_syscall_filter_off` | cloudOS ≥ 26.4 | also cloudOS 18.x (same shapes, 18.6 `0xA606E0`/`0xA608E8`; `0xA0FB18`, `0xA0FBA8`, `0x113FB54`). TPRO and the immutable-code patch have no 18.x shape and stay ≥ 26.4 |++`kernel-boot-vm_map_protect` finds no gate on 18.x, as on 26.5 and later.+`txm-boot-precheck_admission` (the 27.0.1 fix) and `ibec-boot-bootx_precondition`+have no 18.x site and are not needed there.++The surface-compression keys `filesystem-boot-ios18_surface_compression` writes+into a `minimal` image live on the Data volume, which `cfw install` cannot reach.+On any other preset vphoned sets them at startup on an iOS 18 guest+(`GuestCoreAnimationCompression`) and restarts backboardd once.++`cfw update-kernel` now also serves a research-board VM: it installs the+kernelcache `fw patch` (run as the user) re-mixed and re-patched into the+restore tree, instead of refusing. The restore tree has to still be there.+### 2026-10-23 — Integrating the minimal, research-board, watch and iOS 18 presetsThe combined PR stack retains its declared patch sets and version gates. Thediff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swiftindex 37b2ea84..f01379ec 100644--- a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift@@ -133,8 +133,8 @@ struct VPhoneVirtualMachineCreateCommand: ParsableCommand {/// An Apple TV takes the TV preset; one whose userland comes from an OTA/// takes the arm64e one, with the GPU driver and the userland swap. An- /// Apple Watch takes the watch preset, an iPhone XS Max `minimal`: its iOS 18- /// research board kernel boots no other.+ /// Apple Watch takes the watch preset, an iPhone XS Max `minimal`, the preset+ /// checked on every iOS 18 release (`standard` is checked on 18.6).private var defaultPreset: String {switch selectedGuest {case let guest? where guest.family == .appleTV:diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadPatchCatalog.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadPatchCatalog.swiftindex 733eadd0..609984e2 100644--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadPatchCatalog.swift+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadPatchCatalog.swift@@ -309,7 +309,8 @@ nonisolated struct VPhoneLaunchpadPatchSelection: Hashable, Sendable {case "AppleTV14,1", "AppleTV18,1": tvOS4KPresetcase let type? where type.hasPrefix("AppleTV"): tvOSPresetcase let type? where type.hasPrefix("Watch"): watchOSPreset- // The iOS 18 research board kernels boot no other preset.+ // The iOS 18 research board guests: `minimal` is checked on every+ // release, `standard` on 18.6.case "iPhone11,6", "iPhone11,4": minimalPresetdefault: defaultPreset}