Run a virtual iPhone on an Apple Silicon Mac.
Swift
Merge branch 'pr/minimal-stock-llb' into pr/minimal-trust-cache
Maximilian Paßd6a8669933e4
diff --cc VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swiftindex b9af425e,5847df54..fa54e0be--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift@@@ -422,11 -411,9 +413,10 @@@ public enum FirmwarePatchSetCatalog.bundled(FirmwareRestoreImagePatchSet.identifier),],selection: .allow(- minimalBootChainPatches- .union(minimalDeviceTreePatches)+ minimalDeviceTreePatches.union(FirmwareResearchBoardPatchSet.manifest.patches.map(\.identifier))- .union(FirmwareRestoreImagePatchSet.manifest.patches.map(\.identifier)),+ .union(FirmwareRestoreImagePatchSet.manifest.patches.map(\.identifier))+ .subtracting([FirmwareRestoreImagePatchSet.launchdCacheLoader]),),)@@@ -453,11 -443,9 +446,10 @@@summary: "Minimal for an Apple Watch guest: the watch board's device tree, and a resealed system with vphoned, the GPU driver, speaker audio and activation restored onto a stock kernel and TXM.",patchSets: minimalPreset.patchSets,selection: .allow(- minimalBootChainPatches- .union(watchOSDeviceTreePatches)+ watchOSDeviceTreePatches.union(FirmwareResearchBoardPatchSet.manifest.patches.map(\.identifier))- .union(FirmwareRestoreImagePatchSet.manifest.patches.map(\.identifier)),+ .union(FirmwareRestoreImagePatchSet.manifest.patches.map(\.identifier))+ .subtracting([FirmwareRestoreImagePatchSet.launchdCacheLoader]),),)diff --cc VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swiftindex 3ce665a7,b70bac1d..15d54ad1--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swift@@@ -233,14 -232,18 +232,22 @@@ struct FirmwarePatchSetCatalogTestscloudOS: VPhoneVersion("26.4"),)let restoreImage = Set(FirmwareRestoreImagePatchSet.manifest.patches.map(\.identifier))- let bootChain = FirmwarePatchSetCatalog.minimalBootChainPatcheslet researchBoard = Set(FirmwareResearchBoardPatchSet.manifest.patches.map(\.identifier))- #expect(plan.enabled == restoreImage.union(FirmwarePatchSetCatalog.minimalDeviceTreePatches).union(researchBoard))+ // The unsecure-cache gate stays out: the launchd.plist minimal edits is+ // signed and in the trust cache, so the stock launchd_cache_loader takes it.+ #expect(!plan.isEnabled(FirmwareRestoreImagePatchSet.launchdCacheLoader))+ #expect(plan.enabled == restoreImage.subtracting([FirmwareRestoreImagePatchSet.launchdCacheLoader])- .union(FirmwarePatchSetCatalog.minimalDeviceTreePatches).union(bootChain).union(researchBoard))- #expect(plan.droppedBootEssentials.allSatisfy { !$0.hasPrefix("ibec-") && !$0.hasPrefix("llb-") })++ .union(FirmwarePatchSetCatalog.minimalDeviceTreePatches).union(researchBoard))+ #expect(plan.enabled.isDisjoint(with: FirmwareBootChainPatchSet.manifest.patches.map(\.identifier)))+ // The set stays named, so `--allow` can turn a boot chain patch back on.+ let verbose = try VPhonePatchPlan.resolve(+ preset: FirmwarePatchSetCatalog.minimalPreset,+ patchSets: FirmwarePatchSetCatalog.bundled,+ iOSBase: VPhoneVersion("26.4"),+ cloudOS: VPhoneVersion("26.4"),+ allowed: ["llb-boot-boot_args"],+ )+ #expect(verbose.enabled.contains("llb-boot-boot_args"))let watch = try VPhonePatchPlan.resolve(preset: FirmwarePatchSetCatalog.watchOSPreset,@@@ -248,9 -251,10 +255,11 @@@iOSBase: VPhoneVersion("26.4"),cloudOS: VPhoneVersion("26.4"),)- #expect(watch.enabled == restoreImage+ #expect(!watch.isEnabled(FirmwareRestoreImagePatchSet.launchdCacheLoader))+ #expect(watch.enabled == restoreImage.subtracting([FirmwareRestoreImagePatchSet.launchdCacheLoader])- .union(FirmwarePatchSetCatalog.watchOSDeviceTreePatches).union(bootChain).union(researchBoard))+ .union(FirmwarePatchSetCatalog.watchOSDeviceTreePatches)+ .union(researchBoard))+ #expect(watch.enabled.isDisjoint(with: FirmwareBootChainPatchSet.manifest.patches.map(\.identifier)))}@Test