Run a virtual iPhone on an Apple Silicon Mac.
Swift
feat: add opt-in iPhone 15 iOS 17.7 desktop bring-up
黑曜猫7d5b44dac6a9
diff --git a/Research/0_binary_patch_comparison.md b/Research/0_binary_patch_comparison.mdindex 0dd39ec9..0051ce53 100644--- a/Research/0_binary_patch_comparison.md+++ b/Research/0_binary_patch_comparison.md@@ -5799,3 +5799,20 @@ verified0→2→0 in the temporary observer; the Far reduction flushes when thebackgrounds, matching Charcuterie's explicit latching policy. No ActivityKitpermission expansion is part of this patch or the installed bundle. All guesttest timers, activities, apps, helpers and overrides were cleaned up.+++## Experimental iPhone 15 / iOS 17.7 desktop bring-up++See `Research/Guest/ios17_bringup.md`. The existing seputil data patch now+accepts a Capstone-decoded ADR reference as well as ADRP+ADD. The measured+21H16 input has ADR x2 at 0x10000B85C referencing the complete format literal+at 0x10001D3B3; no UUID or instruction replacement is hardcoded. The existing+SwapEnd patch resolves size 0x508 and emits the cloudOS 26.1 size 0x560.+Existing thread-guard and paravirtual-user-client gates include 17. The iOS 18+BSD-only skywalk boot argument also covers 17. New opt-in declaration+`system-springboard-exp-ios17_desktop` installs a SpringBoard-only, iOS-17-only+library. It skips synchronous initial widget discovery and unavailable+AVFlashlight construction; no shared-cache code is modified for these hooks.+Selection restores SpringBoard and removes the library on opt-out; a restart+restores native methods.+No native iOS 17 kernel, Metal driver, camera or networking support is claimed.diff --git a/Research/Guest/ios17_bringup.md b/Research/Guest/ios17_bringup.mdnew file mode 100644index 00000000..d3ed19c0--- /dev/null+++ b/Research/Guest/ios17_bringup.md@@ -0,0 +1,101 @@+# Experimental iPhone 15 / iOS 17.7 desktop bring-up++This is desktop-only bring-up, not general iOS 17 support. The guest uses the+actual iPhone15,4 17.7 (21H16) userland and the cloudOS 26.1 (23B85) vphone600+kernel/boot chain. The only accepted 17.x preparation pairing is this one.++## Reproduce++Build and install the complete VPhone bundle as described in the main guide.+Keep other machines on their existing bundles. With the installed version in+`<bundle>`, create a separate disposable guest:++```sh+vphone-launchpad-cli vm create ios17-test --bundle '<bundle>' \+ --device iPhone15,4 --cpu 6 --memory 6144 --disk-size 64 --network none \+ --iphone-source 'https://updates.cdn-apple.com/2024FallFCS/fullrestores/062-78954/8A879FCE-CD96-4FEB-BAFB-0FF58CCB5058/iPhone15,4_17.7_21H16_Restore.ipsw' \+ --cloudos-source 'https://updates.cdn-apple.com/private-cloud-compute/399b664dd623358c3de118ffc114e42dcd51c9309e751d43bc949b98f4e31349' \+ --no-template --keep-artifacts \+ --allow system-springboard-exp-ios17_desktop+```++Creation may report non-applicable camera, audio and launchd patch failures;+they are not silently counted as applied. Keep those logs. Wait for vphoned,+then apply the same uncompressed CoreAnimation defaults as the iOS 18 route.+Before changing an existing guest, save its global preferences with `guest pull`+if the file exists; preserve the absence of a previously absent file too.+The following script merges only the three keys, retaining other preferences:++```sh+vphone-launchpad-cli guest rpc ios17-test script.eval '{"source":"var p=\"/var/preferences/.GlobalPreferences.plist\"; var C=ObjC.use(\"NSMutableDictionary\"); var d=C.dictionaryWithContentsOfFile_(p); if(!d)d=C.new(); for(var k of [\"CAEnableIOSurfaceCompression\",\"CAEnableFramebufferCompression\",\"CAEnableDeepFramebuffer\"])d.setObject_forKey_(false,k); d.writeToFile_atomically_(p,true)"}'+vphone-launchpad-cli vm stop ios17-test+vphone-launchpad-cli vm start ios17-test --wait+vphone-launchpad-cli guest unlock ios17-test+```++The scripted preferences step is currently required; this PR does not claim that+one stock New Machine click completes every display compatibility setting.++## What changed and why++- Device description for iPhone15,4/D37AP: 1179x2556 at 3x.+- Existing SwapEnd patch: the 17.7 userland sends 0x508; the 26.1 kernel accepts+ 0x560. The existing semantic decoder finds the selector-5 call and size load.+- Existing thread-guard and paravirtual-user-client compatibility patch gates+ include 17. No new kernel instruction encoding is introduced.+- The existing BSD-only skywalk boot argument also covers 17. The older+ Network.framework otherwise traps in `os_channel_create_extended`, including+ chronod; SpringBoard synchronously waits for its extension subscription.+ Networking remains unvalidated, so this recipe deliberately uses no NIC.+- seputil's full `%s/%s.gl` format literal is referenced by ADR on 21H16, rather+ than ADRP+ADD. Recognizing that decoded reference lets the existing two-byte+ data patch select AA.gl. No device UUID is embedded in code or in the recipe.+- The new opt-in `system-springboard-exp-ios17_desktop` stages+ `libvphoneios17desktop.dylib`. The installer adds a weak load to SpringBoard+ and backs up the original executable; the library also checks process name+ and OS major at runtime.+ It skips `CHSWidgetExtensionProvider`'s initial synchronous content load and+ disables AVFlashlight construction/capability. Thread traces identify these+ two synchronous service dependencies as desktop startup blockers. Widgets and+ flashlight are sacrificed explicitly, not reported as supported.++## Undo++Turn off `system-springboard-exp-ios17_desktop` through Patch Settings or+`fw set-patches --block`, then run `cfw update-environment` while stopped and+restart. The selection restores the original SpringBoard and removes the library;+the next process starts with native methods again. There is no shared-cache edit or permanent method modification+for this workaround. The native desktop may stall again when it is off.+Restore the saved global preferences (or their original absence) to undo the+separate CoreAnimation defaults. CPU, memory and NIC configuration are ordinary+VM settings. No host security or global default bundle setting is changed.++## Evidence and limits++The first prototype booted and cold-rebooted, reported iPhone15,4 and iOS 17.7.0,+completed first-boot migration, unlocked, and displayed the Home Screen icons and+Dock. The user confirmed the desktop in a screenshot. The prototype's temporary+UUID hard link and direct SpringBoard load command are not the integrated path:+the integrated installer uses the seputil patch and a selection-owned,+backed-up weak load.++A separate guest was restored from the two original IPSWs with the integrated+boot patches, then updated to the final guest installer. It cold-booted and+unlocked to Home Screen icons and Dock; Calendar displayed its date and empty+agenda while Weather reported unavailable. The installed SpringBoard had the+weak library dependency. Turning the selection off, updating the environment+and rebooting removed the library and restored SpringBoard byte-for-byte to+the original (matching SHA-256). Re-enabling, updating the environment and+cold-booting again returned to the Home Screen.++- Wallpaper remains black; widget discovery is bypassed and widget behavior is+ incomplete or unvalidated. Widgets can appear blank or unavailable.+- No compatible Metal driver is claimed. The 26.1 driver cannot be assumed to+ work against the 17.7 IOGPU framework.+- Camera, flashlight, audio feature coverage and network usability are not+ validated. The scope is reaching the desktop.+- Some stock services still crash or fail to execute across the version gap.+- Do not describe this as a native iOS 17 kernel or support for every 17.x build.++Automated validation and a separate integrated clean-restore result are recorded+in the PR description, with prototype observations distinguished from that run.diff --git a/VPhoneDaemon/Daemon/GuestAPI+Environment.swift b/VPhoneDaemon/Daemon/GuestAPI+Environment.swiftindex e332cd50..8c1788d7 100644--- a/VPhoneDaemon/Daemon/GuestAPI+Environment.swift+++ b/VPhoneDaemon/Daemon/GuestAPI+Environment.swift@@ -21,7 +21,7 @@ extension GuestAPI {"libdevicehubfix.dylib","libdevicename.dylib","libprefsfix.dylib",- "libsigninfix.dylib",+ "libsigninfix.dylib", "libvphoneios17desktop.dylib","libvphonefolddisplay.dylib","libvphonefoldguard.dylib","libvphonehinge.dylib",@@ -31,7 +31,7 @@ extension GuestAPI {]/// Must match `VPhoneGuestEnvironment.selectedLibraries`: the VM's patch selection owns these.static let environmentSelectedLibraries: Set = [- "libprefsfix.dylib", "libsigninfix.dylib",+ "libprefsfix.dylib", "libsigninfix.dylib", "libvphoneios17desktop.dylib","libvphonegyro.dylib", "libvphoneaccelerometer.dylib", "libvphoneattitude.dylib","libvphonehinge.dylib", "libvphonefoldguard.dylib", "libvphonefolddisplay.dylib",]diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestDisplayPatchSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestDisplayPatchSet.swiftindex ae7b10c7..25742dc1 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestDisplayPatchSet.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestDisplayPatchSet.swift@@ -27,10 +27,10 @@ public enum FirmwareGuestDisplayPatchSet {VPhonePatchDeclaration(identifier: "dyld-boot-iomfb_swapend",title: "IOMFB swap-end size",- summary: "Resizes the swap-end structure a 26.0 or 18.x userland submits.",+ summary: "Resizes the swap-end structure a 26.0, 18.x or experimental 17.7 userland submits.",target: .dyldSharedCache,applicability: VPhonePatchApplicability(- iOSBase: .oneOf([.release(major: 26, minor: 0), .major(18)]),+ iOSBase: .oneOf([.release(major: 26, minor: 0), .major(18), .major(17)]),),bootEssential: true,),diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestSystemPatchSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestSystemPatchSet.swiftindex abd0f9df..a5b21b9e 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestSystemPatchSet.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestSystemPatchSet.swift@@ -24,6 +24,7 @@ public enum FirmwareGuestSystemPatchSet {public static let homePodInstallPersonaLibrary = "/usr/lib/libvphoneinstallpersona.dylib"public static let homePodAdHocInstall = "system-installd-exp-homepod_adhoc"public static let homePodMISFixLibrary = "/usr/lib/libvphonehomepodmisfix.dylib"+ public static let ios17Desktop = "system-springboard-exp-ios17_desktop"public static let metalCacheReuse = "system-systemhook-cfw-metal_cache_reuse"public static let metalCacheReuseMarker = "/usr/lib/vphone-metal-cache-reuse"public static let gyroscope = "system-backboardd-cfw-gyroscope"@@ -96,6 +97,13 @@ public enum FirmwareGuestSystemPatchSet {name: "Guest System",summary: "Shared-cache policy gates, patched system daemons and the vphone guest payload",patches: [+ VPhonePatchDeclaration(+ identifier: ios17Desktop,+ title: "iOS 17 desktop bring-up",+ summary: "Skips unavailable flashlight construction and synchronous widget discovery that stall SpringBoard on iOS 17 research guests. Widgets and flashlight are unavailable while selected. Experimental, off by default.",+ target: .guestExecutable(path: "/System/Library/CoreServices/SpringBoard.app/SpringBoard"),+ applicability: VPhonePatchApplicability(iOSBase: .major(17)),+ ),VPhonePatchDeclaration(identifier: homeViewEnvironmentService,title: "HomeView distance simulation service",diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelBasePatchSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelBasePatchSet.swiftindex 44fde1b6..710ab1f2 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelBasePatchSet.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelBasePatchSet.swift@@ -158,7 +158,7 @@ public enum FirmwareKernelBasePatchSet {the UI.""",target: .firmware(.kernelcache),- applicability: VPhonePatchApplicability(iOSBase: .major(18)),+ applicability: VPhonePatchApplicability(iOSBase: .oneOf([.major(18), .major(17)])),bootEssential: true,),],diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelCustomFirmwarePatchSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelCustomFirmwarePatchSet.swiftindex d61d780f..c0534ecf 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelCustomFirmwarePatchSet.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelCustomFirmwarePatchSet.swift@@ -322,7 +322,7 @@ public enum FirmwareKernelCustomFirmwarePatchSet {prewarm its shaders and crash-loops at every boot.""",target: .firmware(.kernelcache),- applicability: VPhonePatchApplicability(iOSBase: .oneOf([.major(26), .major(18)])),+ applicability: VPhonePatchApplicability(iOSBase: .oneOf([.major(26), .major(18), .major(17)])),),// MARK: Displaydiff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swiftindex 73773ef7..3029a3e1 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift@@ -68,7 +68,7 @@ public enum FirmwarePatchSetCatalog {Set(FirmwareKernelFridaPatchSet.manifest.patches.map(\.identifier)).union(hypervisorConcealmentPatches).union(experimentalIdentityPatches)- .union([FirmwareGuestSystemPatchSet.homeViewEnvironmentService])+ .union([FirmwareGuestSystemPatchSet.homeViewEnvironmentService, FirmwareGuestSystemPatchSet.ios17Desktop]).union([FirmwareGuestSystemPatchSet.homeViewProfileLookup, FirmwareGuestSystemPatchSet.homeViewDisplayLookups, FirmwareGuestSystemPatchSet.homeViewSetupBypass, FirmwareGuestSystemPatchSet.otaUserland, FirmwareGuestSystemPatchSet.homePodTopCap, FirmwareGuestSystemPatchSet.homePodSetupBypass, FirmwareGuestSystemPatchSet.homePodAirPlayVM, FirmwareGuestSystemPatchSet.homePodAudioProduct, FirmwareGuestSystemPatchSet.homePodWelcome, FirmwareGuestSystemPatchSet.homePodSiriSpeech, FirmwareGuestSystemPatchSet.homePodOTAUserland, FirmwareGuestSystemPatchSet.homePodSoundGlow, FirmwareGuestSystemPatchSet.homePodCryptexStaging, FirmwareGuestSystemPatchSet.homePodCryptexClass, FirmwareGuestSystemPatchSet.homePodAdHocInstall]).union([FirmwareKernelCustomFirmwarePatchSet.tvTPROPagers, misTrustAuthPatch, FirmwareGuestSystemPatchSet.settingsRootRows, FirmwareGuestSystemPatchSet.settingsSoftwareUpdate, FirmwareGuestSystemPatchSet.tvTPRO, FirmwareGuestSystemPatchSet.tvOTAUserland, FirmwareGuestSystemPatchSet.tvSetupDisplayLookup, FirmwareGuestSystemPatchSet.tvSetupFocus, FirmwareGuestSystemPatchSet.tvLocalActivation, FirmwareGuestSystemPatchSet.tvLegacySetup])@@ -228,7 +228,7 @@ public enum FirmwarePatchSetCatalog {freshly restored 26.4 guest does not survive. The HomePod-only top cap is off.""",patchSets: bundledReferences,- selection: .block([FirmwareGuestSystemPatchSet.homeViewEnvironmentService, FirmwareGuestSystemPatchSet.homeViewProfileLookup, FirmwareGuestSystemPatchSet.homeViewDisplayLookups, FirmwareGuestSystemPatchSet.homeViewSetupBypass, FirmwareGuestSystemPatchSet.tvLegacySetup, FirmwareGuestSystemPatchSet.tvSetupDisplayLookup, FirmwareGuestSystemPatchSet.tvSetupFocus, FirmwareGuestSystemPatchSet.tvLocalActivation, FirmwareGuestSystemPatchSet.homePodTopCap, FirmwareGuestSystemPatchSet.homePodSetupBypass, FirmwareGuestSystemPatchSet.homePodAirPlayVM, FirmwareGuestSystemPatchSet.homePodAudioProduct, FirmwareGuestSystemPatchSet.homePodWelcome, FirmwareGuestSystemPatchSet.homePodSiriSpeech, FirmwareGuestSystemPatchSet.homePodOTAUserland, FirmwareGuestSystemPatchSet.homePodSoundGlow, FirmwareGuestSystemPatchSet.homePodCryptexStaging, FirmwareGuestSystemPatchSet.homePodCryptexClass, FirmwareGuestSystemPatchSet.homePodAdHocInstall]),+ selection: .block([FirmwareGuestSystemPatchSet.ios17Desktop, FirmwareGuestSystemPatchSet.homeViewEnvironmentService, FirmwareGuestSystemPatchSet.homeViewProfileLookup, FirmwareGuestSystemPatchSet.homeViewDisplayLookups, FirmwareGuestSystemPatchSet.homeViewSetupBypass, FirmwareGuestSystemPatchSet.tvLegacySetup, FirmwareGuestSystemPatchSet.tvSetupDisplayLookup, FirmwareGuestSystemPatchSet.tvSetupFocus, FirmwareGuestSystemPatchSet.tvLocalActivation, FirmwareGuestSystemPatchSet.homePodTopCap, FirmwareGuestSystemPatchSet.homePodSetupBypass, FirmwareGuestSystemPatchSet.homePodAirPlayVM, FirmwareGuestSystemPatchSet.homePodAudioProduct, FirmwareGuestSystemPatchSet.homePodWelcome, FirmwareGuestSystemPatchSet.homePodSiriSpeech, FirmwareGuestSystemPatchSet.homePodOTAUserland, FirmwareGuestSystemPatchSet.homePodSoundGlow, FirmwareGuestSystemPatchSet.homePodCryptexStaging, FirmwareGuestSystemPatchSet.homePodCryptexClass, FirmwareGuestSystemPatchSet.homePodAdHocInstall]),)/// The iOS payloads, hooks and shared-cache patches an Apple TV guest has nodiff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swiftindex 0c4d7b10..3bc7a801 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift@@ -122,7 +122,7 @@ extension FirmwarePipeline {// Network.framework uses the BSD path (the 26.1-kernel skywalk// channel-create traps in the 18.x Network.framework and crash-loops// mDNSResponder → no DNS). Empty on 26.x bases (stock boot-args).- let extraBootArgs = baseIs18 ? "if_attach_nx=0x3" : ""+ let extraBootArgs = (baseIs18 || iOSBase?.major == 17) ? "if_attach_nx=0x3" : ""// 1. AVPBooter — Apple's ROM, in the VM root. Patched when the plan keeps// the boot chain set. A machine booting OpenAVB has nothingdiff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swiftindex 81806ae2..0154922a 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swift@@ -17,6 +17,33 @@ import VPhonePatchKit@Suite("Bundled patch set catalogue")struct FirmwarePatchSetCatalogTests {+ @Test func `iOS 17 desktop workaround is opt in and unavailable on other bases`() throws {+ let id = FirmwareGuestSystemPatchSet.ios17Desktop+ for version in ["17.7", "18.6.2", "26.1", "27.1"] {+ for enabled in [false, true] {+ var preset = FirmwarePatchSetCatalog.standardPreset+ if enabled { preset.selection = preset.selection.allowing([id]) }+ let plan = try VPhonePatchPlan.resolve(+ preset: preset, patchSets: FirmwarePatchSetCatalog.bundled,+ iOSBase: VPhoneVersion(version), cloudOS: VPhoneVersion("26.1")+ )+ #expect(plan.isEnabled(id) == (enabled && version == "17.7"))+ }+ }+ }++ @Test func `Experimental iOS 17 selects the older userland boot compatibility patches`() throws {+ let plan = try VPhonePatchPlan.resolve(+ preset: FirmwarePatchSetCatalog.standardPreset,+ patchSets: FirmwarePatchSetCatalog.bundled,+ iOSBase: VPhoneVersion("17.7"), cloudOS: VPhoneVersion("26.1"),+ )+ #expect(plan.isEnabled("dyld-boot-iomfb_swapend"))+ #expect(plan.isEnabled("kernel-boot-thread_guard_violation"))+ #expect(plan.isEnabled(FirmwarePatchSetCatalog.paravirtUserClientsPatch))+ #expect(!plan.isEnabled("dyld-boot-iomfb_force_kern"))+ }+@Test func `CIBarcode lowering is scoped to the measured base and can be disabled`() throws {let identifier = FirmwareGuestSystemPatchSet.arm64eX1CIBarcodefor base in ["26.4", "27.0.1", "27.1", "27.1.1", "27.2", "28.0"] {diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swiftindex d0bc9ec9..fd4875f3 100644--- a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift@@ -1323,6 +1323,7 @@ struct VPhoneCustomFirmwareInstaller {&& identifier != FirmwareGuestSystemPatchSet.attitude&& identifier != FirmwareGuestSystemPatchSet.hinge&& identifier != FirmwareGuestSystemPatchSet.foldGuard+ && identifier != FirmwareGuestSystemPatchSet.ios17Desktop}guard plan.isEnabled(identifier) else {print(" [·] \(identifier): off in preset \(plan.presetIdentifier)")@@ -1715,6 +1716,29 @@ struct VPhoneCustomFirmwareInstaller {}}+ // iOS 17 does not reliably propagate the spawn hook to SpringBoard.+ // Keep the weak load owned by this selection, with the original binary+ // backed up by the same mechanism as the other executable patches.+ let desktop = FirmwareGuestSystemPatchSet.ios17Desktop+ isolate([desktop]) {+ let path = "System/Library/CoreServices/SpringBoard.app/SpringBoard"+ let library = "libvphoneios17desktop.dylib"+ if on(desktop) {+ try system.replaceFile("usr/lib/" + library, fromFileAt: VPhoneGuestBinaries.resolve(library), mode: 0o755, owner: Self.guestOwner)+ try patchMachO(system: system, work: work, path: path,+ preserveEntitlements: true, injectedDylibPath: "/usr/lib/" + library)+ live.insert(desktop)+ } else {+ if priorGuest.contains(desktop) {+ guard try revertMachO(system: system, work: work, path: path) else {+ live.insert(desktop)+ throw ValidationError("iOS 17 desktop workaround has no SpringBoard backup; cannot safely remove its library.")+ }+ }+ try system.removeItem("usr/lib/" + library)+ }+ }+// 2. The dyld shared cache. The version branches and the declarations'// applicability say the same thing; this is what a VM with no plan// still follows.@@ -1729,7 +1753,7 @@ struct VPhoneCustomFirmwareInstaller {("dyld-boot-xpc_lwcr", "patch-xpc-lwcr", [dsc]),("dyld-boot-lockdown_mode", "patch-lockdown-mode", [dsc]),]- } else if version.hasPrefix("26.0") || version.hasPrefix("18.") {+ } else if version.hasPrefix("26.0") || version.hasPrefix("18.") || version.hasPrefix("17.") {dyld.append(("dyld-boot-iomfb_swapend", "patch-iomfb-swapend", [dsc, "--target-size", "0x560"]))}dyld += [@@ -2085,7 +2109,7 @@ struct VPhoneCustomFirmwareInstaller {try requireX1Bootstrap()if !isHomePod {- isolate([]) { try restoreMISFixTargets(system: system) }+ isolate([]) { try restoreMISFixTargets(system: system, preserveSpringBoard: on(FirmwareGuestSystemPatchSet.ios17Desktop)) }}// HomePod has no misagent/provisioning service. Its research SDK signs@@ -3239,13 +3263,15 @@ struct VPhoneCustomFirmwareInstaller {/// A guest installed before that still carries a load command in each, and/// `patchMachO` left the original beside it as `.bak`. The `/mf` alias/// existed only for SpringBoard's.- private func restoreMISFixTargets(system: VPhoneConfinedDirectory) throws {+ private func restoreMISFixTargets(system: VPhoneConfinedDirectory, preserveSpringBoard: Bool = false) throws {let targets = ["usr/libexec/installd","usr/libexec/misagent","System/Library/CoreServices/SpringBoard.app/SpringBoard",]for path in targets where try system.isRegularFile("\(path).bak") {+ // The iOS 17 desktop selection owns this executable and its backup.+ if preserveSpringBoard && path == "System/Library/CoreServices/SpringBoard.app/SpringBoard" { continue }try system.rename("\(path).bak", to: path)print(" [+] \(path): restored the original, libmisfix is inserted at spawn")}diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swiftindex 80096e85..3c29346e 100644--- a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift@@ -137,8 +137,8 @@ struct VPhoneCustomFirmwarePatchSeputilCommand: ParsableCommand {to "AA" makes the path /mnt7/AA.gl on every guest, which is what letsthe install ship one pre-made .gl file instead of one per device.- The literal is found in __TEXT,__cstring and confirmed by an adrp+add- pair in __TEXT,__text that computes its address — the Python takes the+ The literal is found in __TEXT,__cstring and confirmed by an adr or adrp+add+ reference in __TEXT,__text that computes its address — the Python takes thefirst substring hit anywhere in the file. Both land on the same byte inthis firmware; this one cannot land on a coincidence in the next.diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swiftindex f681adaf..10a6f857 100644--- a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift@@ -97,6 +97,10 @@ enum VPhoneFirmwarePreparer {device: productType,downloadConnections: downloadConnections,)+ if phone.version.hasPrefix("17."),+ !(phone.version == "17.7" && device.productType == "iPhone15,4" && cloud.version == "26.1") {+ throw ValidationError("Experimental iOS 17 bring-up is limited to iPhone15,4 17.7 with cloudOS 26.1. Other pairings have not been validated.")+ }let ota: (file: URL, key: String?, version: String, build: String)?if device.restoreBase != nil || (device.family == .homePod && otaSource != nil) {ota = try resolveOTA(diff --git a/VPhoneExecutable/VPhoneVirtualization/Build/StageBundle.sh b/VPhoneExecutable/VPhoneVirtualization/Build/StageBundle.shindex 877b9e95..42041bf9 100755--- a/VPhoneExecutable/VPhoneVirtualization/Build/StageBundle.sh+++ b/VPhoneExecutable/VPhoneVirtualization/Build/StageBundle.sh@@ -131,6 +131,7 @@ guest_compatibility_library="$(/usr/bin/xcrun swift-stdlib-tool --print \/bin/cp "$guest_products/devicename/libdevicename.dylib" "$guest/libdevicename.dylib"/bin/cp "$guest_products/prefsfix/libprefsfix.dylib" "$guest/libprefsfix.dylib"/bin/cp "$guest_products/signinfix/libsigninfix.dylib" "$guest/libsigninfix.dylib"+/bin/cp "$guest_products/ios17desktop/libvphoneios17desktop.dylib" "$guest/libvphoneios17desktop.dylib"/bin/cp "$guest_products/gyroscope/libvphonegyro.dylib" "$guest/libvphonegyro.dylib"/bin/cp "$guest_products/accelerometer/libvphoneaccelerometer.dylib" "$guest/libvphoneaccelerometer.dylib"/bin/cp "$guest_products/hinge/libvphonehinge.dylib" "$guest/libvphonehinge.dylib"diff --git a/VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.sh b/VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.shindex d67b9c26..5e45dac7 100755--- a/VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.sh+++ b/VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.sh@@ -161,7 +161,7 @@ fifor name in vphoned vphoned-tvos vphoned-watchos libvphonetvsetupfocus.dylib libswiftCompatibilitySpan.dylib launchdhook-vphone.dylib SystemHook-vphone.dylib libcamfix.dylib \libvcamcaptured.dylib libmisfix.dylib libhapticsfix.dylib libbatteryhealthfix.dylib libdevicehubfix.dylib libdevicename.dylib \- libprefsfix.dylib libsigninfix.dylib libvphonegyro.dylib libvphoneaccelerometer.dylib libvphonehinge.dylib libvphonefoldguard.dylib libvphonefolddisplay.dylib libvphoneattitude.dylib libvphonehomepoddisplay.dylib libvphonecryptexstaging.dylib libvphoneinstallpersona.dylib libvphonehomepodmisfix.dylib vphone-homepod-setup libAppleParavirtCompilerPluginIOGPUFamily.dylib; do+ libprefsfix.dylib libsigninfix.dylib libvphoneios17desktop.dylib libvphonegyro.dylib libvphoneaccelerometer.dylib libvphonehinge.dylib libvphonefoldguard.dylib libvphonefolddisplay.dylib libvphoneattitude.dylib libvphonehomepoddisplay.dylib libvphonecryptexstaging.dylib libvphoneinstallpersona.dylib libvphonehomepodmisfix.dylib vphone-homepod-setup libAppleParavirtCompilerPluginIOGPUFamily.dylib; dorequire_signed_macho "$guest/$name"done# iOS 18 must be able to resolve the compatibility library without Xcode.diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/experimental.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/experimental.plistindex c1a87483..45738308 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/experimental.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/experimental.plist@@ -93,6 +93,7 @@<string>Block</string><key>Patches</key><array>+ <string>system-springboard-exp-ios17_desktop</string><string>system-userprofilesd-exp-keybag_lookup</string><string>system-breadboard-exp-mach_lookup</string><string>system-homeview-exp-setup_bypass</string>diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/homepod-mini.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/homepod-mini.plistindex 5be1c414..12f55cf2 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/homepod-mini.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/homepod-mini.plist@@ -153,6 +153,7 @@<string>system-virtualaudio-cfw-device_state_null_gate</string><string>system-dyld-exp-tv_tpro</string><string>kernel-exp-tv_tpro_pagers</string>+ <string>system-springboard-exp-ios17_desktop</string></array></dict><key>Summary</key>diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/homeview.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/homeview.plistindex 70332110..250b48a8 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/homeview.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/homeview.plist@@ -161,6 +161,7 @@<string>system-virtualaudio-cfw-speaker_route_throws</string><string>system-virtualaudio-cfw-volume_mode_precondition</string><string>system-watchdogd-exp-hv_vmm_cache</string>+ <string>system-springboard-exp-ios17_desktop</string></array></dict><key>Summary</key>diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plistindex c031ba12..d27d2785 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist@@ -115,6 +115,7 @@<string>system-mobileactivationd-exp-tv_activation</string><string>system-tv-exp-legacy_setup</string><string>system-exp-ota_userland</string>+ <string>system-springboard-exp-ios17_desktop</string></array></dict><key>Summary</key>diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos-4k.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos-4k.plistindex 4a230e74..caebe244 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos-4k.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos-4k.plist@@ -160,6 +160,7 @@<string>system-virtualaudio-cfw-volume_mode_precondition</string><string>system-dyld-exp-tv_tpro</string><string>kernel-exp-tv_tpro_pagers</string>+ <string>system-springboard-exp-ios17_desktop</string></array></dict><key>Summary</key>diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos.plistindex ac7361df..2cfccf9f 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos.plist@@ -168,6 +168,7 @@<string>system-mobileactivationd-exp-tv_activation</string><string>system-tv-exp-legacy_setup</string><string>system-exp-ota_userland</string>+ <string>system-springboard-exp-ios17_desktop</string></array></dict><key>Summary</key>diff --git a/VPhoneGuestComponents/IOS17Desktop/libvphoneios17desktop.m b/VPhoneGuestComponents/IOS17Desktop/libvphoneios17desktop.mnew file mode 100644index 00000000..a90aabc7--- /dev/null+++ b/VPhoneGuestComponents/IOS17Desktop/libvphoneios17desktop.m@@ -0,0 +1,24 @@+#import <Foundation/Foundation.h>+#import <objc/runtime.h>+#import <dlfcn.h>+static id noFlashlight(id self, SEL sel) { return nil; }+static BOOL noFlashlightCapability(id self, SEL sel) { return NO; }+static void skipUnavailableWidgets(id self, SEL sel) {}+__attribute__((constructor)) static void start(void) {+ if (NSProcessInfo.processInfo.operatingSystemVersion.majorVersion != 17 ||+ ![NSProcessInfo.processInfo.processName isEqualToString:@"SpringBoard"]) return;+ dlopen("/System/Library/PrivateFrameworks/ChronoServices.framework/ChronoServices", RTLD_LAZY);+ Class widgets = objc_getClass("CHSWidgetExtensionProvider");+ SEL load = sel_registerName("_lock_loadContentInitiallySynchronouslyIfNecessary");+ Method loader = class_getInstanceMethod(widgets, load);+ if (loader) class_replaceMethod(widgets, load, (IMP)skipUnavailableWidgets, method_getTypeEncoding(loader));+ dlopen("/System/Library/PrivateFrameworks/AVFCapture.framework/AVFCapture", RTLD_LAZY);+ Class cls = objc_getClass("AVFlashlight");+ if (!cls) { NSLog(@"[ios17-desktop-fix] AVFlashlight absent"); return; }+ Method init = class_getInstanceMethod(cls, @selector(init));+ if (init) class_replaceMethod(cls, @selector(init), (IMP)noFlashlight, method_getTypeEncoding(init));+ SEL cap = sel_registerName("hasFlashlight");+ Method has = class_getClassMethod(cls, cap);+ if (has) class_replaceMethod(object_getClass(cls), cap, (IMP)noFlashlightCapability, method_getTypeEncoding(has));+ NSLog(@"[ios17-desktop-fix] disabled unavailable virtual flashlight");+}diff --git a/VPhoneGuestComponents/Makefile b/VPhoneGuestComponents/Makefileindex 92089ec6..e968155b 100644--- a/VPhoneGuestComponents/Makefile+++ b/VPhoneGuestComponents/Makefile@@ -86,6 +86,7 @@ PREFSFIX_SOURCES := $(wildcard PrefsFix/*.m PrefsFix/*.c)PREFSFIX_INCLUDES := $(wildcard PrefsFix/*.h)# Foundation + ObjC runtime for the sign-in presentation swizzles; AppleAccountUI# etc. are reached through the runtime at runtime, so nothing is needed at link.+IOS17DESKTOP := $(STAGE)/ios17desktop/libvphoneios17desktop.dylibSIGNINFIX := $(STAGE)/signinfix/libsigninfix.dylibSIGNINFIX_SOURCES := $(wildcard SignInFix/*.m SignInFix/*.c)SIGNINFIX_INCLUDES := $(wildcard SignInFix/*.h)@@ -158,7 +159,7 @@ GPU_DYNAMIC_LOOKUP_SYMS := \VIRTIOSOUND := $(STAGE)/virtiosound/VPhoneVirtIOSound.driverVIRTIOSOUND_SOURCES := $(wildcard VirtIOSound/*.m VirtIOSound/*.c)VIRTIOSOUND_INCLUDES := $(wildcard VirtIOSound/*.h) VirtIOSound/Info.plist VirtIOSound/AudioServerDriver.tbd-ARTIFACTS := $(CAMFIX) $(VCAMCAPTURED) $(LAUNCHHOOK) $(SYSTEMHOOK) $(MISFIX) $(HAPTICSFIX) $(BATTERYHEALTHFIX) $(DEVICEHUBFIX) $(DEVICENAME) $(PREFSFIX) $(SIGNINFIX) $(GYROSCOPE) $(ACCELEROMETER) $(HINGE) $(FOLDGUARD) $(FOLDDISPLAY) $(ATTITUDE) $(HOMEPODDISPLAY) $(CRYPTEXSTAGING) $(HOMEPODPERSONA) $(HOMEPODMISFIX) $(HOMEPODSETUP) $(TVSETUPFOCUS) $(GPU_PLUGIN) $(VIRTIOSOUND)+ARTIFACTS := $(IOS17DESKTOP) $(CAMFIX) $(VCAMCAPTURED) $(LAUNCHHOOK) $(SYSTEMHOOK) $(MISFIX) $(HAPTICSFIX) $(BATTERYHEALTHFIX) $(DEVICEHUBFIX) $(DEVICENAME) $(PREFSFIX) $(SIGNINFIX) $(GYROSCOPE) $(ACCELEROMETER) $(HINGE) $(FOLDGUARD) $(FOLDDISPLAY) $(ATTITUDE) $(HOMEPODDISPLAY) $(CRYPTEXSTAGING) $(HOMEPODPERSONA) $(HOMEPODMISFIX) $(HOMEPODSETUP) $(TVSETUPFOCUS) $(GPU_PLUGIN) $(VIRTIOSOUND)PLISTS := $(STAGE)/camfix/libcamfix.plist $(STAGE)/vcamcaptured/libvcamcaptured.plist \$(STAGE)/misfix/libmisfix.plistGPU_PROVENANCE := $(STAGE)/gpu/README.md@@ -204,7 +205,7 @@ gpu: $(GPU_PLUGIN)package: all@rm -f $(ARCHIVE)- @/usr/bin/tar -cf $(ARCHIVE) -C $(STAGE) camfix vcamcaptured launchhook systemhook misfix hapticsfix batteryhealthfix devicehubfix devicename prefsfix signinfix gyroscope accelerometer hinge foldguard attitude homepoddisplay cryptexstaging homepodpersona homepodmisfix homepodsetup tvsetupfocus gpu virtiosound folddisplay+ @/usr/bin/tar -cf $(ARCHIVE) -C $(STAGE) ios17desktop camfix vcamcaptured launchhook systemhook misfix hapticsfix batteryhealthfix devicehubfix devicename prefsfix signinfix gyroscope accelerometer hinge foldguard attitude homepoddisplay cryptexstaging homepodpersona homepodmisfix homepodsetup tvsetupfocus gpu virtiosound folddisplay@echo "Packaged $(ARCHIVE)"test-loader-links:@@ -621,3 +622,17 @@ build-executable-remap-probe:@mkdir -p $(OUT)xcrun --sdk iphoneos swiftc -target arm64-apple-ios26.0 -O Tests/ExecutableRemapProbe.swift -module-cache-path $(OUT)/probe-module-cache -o $(OUT)/ExecutableRemapProbecodesign --force --sign - --timestamp=none $(OUT)/ExecutableRemapProbe++$(IOS17DESKTOP): IOS17Desktop/libvphoneios17desktop.m+ @mkdir -p $(STAGE)/ios17desktop+ $(CLANG) $(COMMON_FLAGS) -dynamiclib -install_name /usr/lib/libvphoneios17desktop.dylib -o $@ $< -framework Foundation -lobjc -Wl,-not_for_dyld_shared_cache+ @codesign --force --sign - $@++.PHONY: test-ios17-desktop+test-ios17-desktop:+ @mkdir -p ../.build/ios17-desktop-tests+ xcrun --sdk macosx clang -fobjc-arc -framework Foundation -Wno-unused-parameter -dynamiclib IOS17Desktop/libvphoneios17desktop.m -o ../.build/ios17-desktop-tests/hook.dylib+ xcrun --sdk macosx clang -fobjc-arc -framework Foundation Tests/IOS17DesktopTests.m -o ../.build/ios17-desktop-tests/test+ ../.build/ios17-desktop-tests/test ../.build/ios17-desktop-tests/hook.dylib 17 SpringBoard+ ../.build/ios17-desktop-tests/test ../.build/ios17-desktop-tests/hook.dylib 18 SpringBoard+ ../.build/ios17-desktop-tests/test ../.build/ios17-desktop-tests/hook.dylib 17 OtherProcessdiff --git a/VPhoneGuestComponents/Tests/IOS17DesktopTests.m b/VPhoneGuestComponents/Tests/IOS17DesktopTests.mnew file mode 100644index 00000000..442be2ac--- /dev/null+++ b/VPhoneGuestComponents/Tests/IOS17DesktopTests.m@@ -0,0 +1,37 @@+#import <Foundation/Foundation.h>+#import <objc/runtime.h>+#import <dlfcn.h>+#import <assert.h>+static NSInteger version;+static NSString *process;+static int loads;+static NSOperatingSystemVersion testVersion(id self, SEL sel) { return (NSOperatingSystemVersion){version,0,0}; }+static NSString *testProcess(id self, SEL sel) { return process; }+@interface AVFlashlight : NSObject++ (BOOL)hasFlashlight;+@end+@implementation AVFlashlight++ (BOOL)hasFlashlight { return YES; }+@end+@interface CHSWidgetExtensionProvider : NSObject+- (void)_lock_loadContentInitiallySynchronouslyIfNecessary;+@end+@implementation CHSWidgetExtensionProvider+- (void)_lock_loadContentInitiallySynchronouslyIfNecessary { loads++; }+@end+int main(int argc, char **argv) { @autoreleasepool {+ assert(argc == 4);+ version = atoi(argv[2]); process = [NSString stringWithUTF8String:argv[3]];+ Class cls = object_getClass(NSProcessInfo.processInfo);+ Method v = class_getInstanceMethod(cls, @selector(operatingSystemVersion));+ Method p = class_getInstanceMethod(cls, @selector(processName));+ class_replaceMethod(cls, @selector(operatingSystemVersion), (IMP)testVersion, method_getTypeEncoding(v));+ class_replaceMethod(cls, @selector(processName), (IMP)testProcess, method_getTypeEncoding(p));+ assert(dlopen(argv[1], RTLD_NOW));+ BOOL selected = version == 17 && [process isEqualToString:@"SpringBoard"];+ assert([AVFlashlight hasFlashlight] == !selected);+ assert(([AVFlashlight new] == nil) == selected);+ [[CHSWidgetExtensionProvider new] _lock_loadContentInitiallySynchronouslyIfNecessary];+ assert(loads == (selected ? 0 : 1));+ puts("desktop hook guard and unavailable-service behavior passed");+}}diff --git a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestDevice.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestDevice.swiftindex 766af166..bf27dc48 100644--- a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestDevice.swift+++ b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestDevice.swift@@ -117,6 +117,9 @@ public struct VPhoneGuestDevice: Sendable, Equatable {)}+ /// Experimental iPhone 15 / iOS 17.7 desktop bring-up on cloudOS 26.1.+ public static let iPhone15_4 = iPhone("iPhone15,4", "d37ap", "iPhone 15", width: 1179, height: 2556)+/// iPhone 16 Pro: 1206x2622, 402x874 points.public static let iPhone17_1 = iPhone("iPhone17,1", "d93ap", "iPhone 16 Pro", width: 1206, height: 2622)/// iPhone 16 Pro Max: 1320x2868, 440x956 points.@@ -288,7 +291,7 @@ public struct VPhoneGuestDevice: Sendable, Equatable {iPhone17_4, iPhone17_1, iPhone17_2, iPhone17_5,iPhone18_3, iPhone18_4, iPhone18_1, iPhone18_2, iPhone18_5,iPhone19_2, iPhone19_4,- iPhone11_6,+ iPhone11_6, iPhone15_4,iPad16_1,iPad15_7,iPad15_3, iPad15_5,diff --git a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swiftindex 94fc70cc..5c7f3a43 100644--- a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swift+++ b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swift@@ -17,7 +17,7 @@ public enum VPhoneGuestEnvironment {"libdevicehubfix.dylib","libdevicename.dylib","libprefsfix.dylib",- "libsigninfix.dylib",+ "libsigninfix.dylib", "libvphoneios17desktop.dylib","libvphonefolddisplay.dylib","libvphonefoldguard.dylib","libvphonehinge.dylib",@@ -36,7 +36,7 @@ public enum VPhoneGuestEnvironment {/// Selection installs/removes these. A live hash sync may replace an/// installed copy, but must never reinstall a patch the user turned off.public static let selectedLibraries: Set<String> = [- "libprefsfix.dylib", "libsigninfix.dylib",+ "libprefsfix.dylib", "libsigninfix.dylib", "libvphoneios17desktop.dylib","libvphonegyro.dylib", "libvphoneaccelerometer.dylib", "libvphoneattitude.dylib","libvphonehinge.dylib", "libvphonefoldguard.dylib", "libvphonefolddisplay.dylib",]diff --git a/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/GuestDeviceTests.swift b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/GuestDeviceTests.swiftindex 2a87690a..4689657a 100644--- a/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/GuestDeviceTests.swift+++ b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/GuestDeviceTests.swift@@ -6,6 +6,18 @@ import Testing/// VM's `config.plist` keeps it.@Suite("Guest device")struct GuestDeviceTests {+ @Test func `experimental iPhone 15 keeps its board and display through manifest encoding`() throws {+ let device = try #require(VPhoneGuestDevice.named("iPhone15,4"))+ #expect(device.deviceClass == "d37ap")+ #expect(device.screen.width == 1179 && device.screen.height == 2556)+ #expect(device.screen.scale == 3)+ #expect(VPhoneGuestDevice.detect(buildManifest: ["SupportedProductTypes": ["iPhone15,4"]]) == device)+ let manifest = VPhoneVirtualMachineManifest.newVM().updating(guestDevice: device)+ let decoded = try PropertyListDecoder().decode(VPhoneVirtualMachineManifest.self, from: PropertyListEncoder().encode(manifest))+ #expect(decoded.guestDevice == device)+ #expect(VPhoneGuestDevice.default == .iPhone17_3)+ }+@Test(arguments: ["HomeAccessory17,1", "HomeAccessory17,2"])func `HomeView keeps distinct board identities and the tvOS executable platform`(type: String) throws {let device = try #require(VPhoneGuestDevice.named(type))