Run a virtual iPhone on an Apple Silicon Mac.
Swift
Keep passd and financed running so Wallet opens
Jacky6c903a16c841
diff --git a/Research/Guest/service_trimming.md b/Research/Guest/service_trimming.mdindex f60be6c6..7ca13f7b 100644--- a/Research/Guest/service_trimming.md+++ b/Research/Guest/service_trimming.md@@ -44,7 +44,7 @@ load a disabled job at the next boot. It is the same mechanism| Group | Default | Labels | Why they can go || --- | --- | --- | --- |-| `base` | on | 136 | Appendix A of the measurement below, less `siriactionsd` (list version 2). Nothing in vphone, IcliKit or the guest hooks talks to them |+| `base` | on | 134 | Appendix A of the measurement below, less `siriactionsd`, `passd` and `financed` (list version 2). Nothing in vphone, IcliKit or the guest hooks talks to them || `app_store` | on | `com.apple.appstored`, `com.apple.itunesstored` | Off with the App Store and iTunes Store apps a template removes. `appstorecomponentsd` is already in `base` || `signin_followup` | on | `com.apple.followupd`, `com.apple.appleidsetupd` | The sign-in follow-up and Apple Account setup prompts. They complement `libsigninfix`'s pane suppression. A guest that went through `setup.skip` has no follow-up items, so no orphaned badge is left || `accounts` | off, `groups: ["accounts"]` | `com.apple.akd`, `com.apple.amsaccountsd`, `com.apple.appleaccountd` | Only for guests that never sign in: with these off, the guest cannot sign in to an Apple Account |@@ -57,7 +57,7 @@ The `base` group, by area:| Photos and media analysis | mediaanalysisd, photoanalysisd, photosface | mediaanalysisd alone wrote 79 MiB in a 15-minute idle window || Ads, content and recommendations | amsengagementd, promotedcontentd, tipsd, weatherd, gamed | amsengagementd was the top idle CPU and write consumer || Find My | findmydeviced, searchpartyd, findmylocated, fmflocatord | No Apple Account |-| Wallet, NFC, Secure Element | passd, nfcd, seld, seserviced, coreidvd | No NFC or SE hardware |+| Wallet, NFC, Secure Element | nfcd, seld, seserviced, coreidvd | No NFC or SE hardware. passd and financed stay: see below || Watch | nanotimekitcompaniond, nanoprefsyncd, nanobackupd | No paired watch. nanoregistryd stays (see below) || Home and health | homed, homeeventsd, fitnesscoachingd, ThreadCommissionerService | HomeKit apps under test need `homed` || Maps background | routined, navd, destinationd, mapspushd, mapssyncd | Not the location simulation path |@@ -79,6 +79,16 @@ on an iPhone Duo 27.1 guest; allowing the label and restarting restored everycontrol. It is now in `neverDisable`, so `trimmed` no longer selects it and aguest that applies the profile again turns it back on.+**passd and financed stay (list version 2, 2026-10-24).** Wallet's first+screen asks passd synchronously for its pass groups+(`-[PKPassLibrary _getGroupsControllerSnapshotWithOptions:synchronously:retries:handler:]`),+and passd waits on financed's Core Data store+(`com.apple.financed.service.coredatastore`). With passd disabled, Wallet's+`NSXPCStore` retried until FrontBoard's 20-second scene-create watchdog+killed it; with passd running but financed disabled, the synchronous call never+returned and the same watchdog fired. With both running Wallet opens; passd+keeps retrying nfcd, which stays disabled, at about 0.02 CPU-seconds a minute.+Some of these are only optional: Shortcuts, dictation, HomeKit, Maps,Mail, Reminders, iMessage and Safari bookmark sync. A research target thatuses one of those frameworks needs its daemon back. Pass that label in `allow`diff --git a/VPhoneDaemon/Daemon/GuestServiceProfile.swift b/VPhoneDaemon/Daemon/GuestServiceProfile.swiftindex 638a3d28..5f0ca556 100644--- a/VPhoneDaemon/Daemon/GuestServiceProfile.swift+++ b/VPhoneDaemon/Daemon/GuestServiceProfile.swift@@ -82,7 +82,8 @@ enum GuestServiceProfile {/// Appendix A of the 2026-10-07 measurement on `svctest-a` (iPhone, 27.0/// 24A435): the LaunchDaemons that were loaded at boot and stayed unloaded/// after the override, with the four traps below already taken out: 137,- /// less siriactionsd since list version 2 (see `neverDisable`).+ /// less siriactionsd, passd and financed since list version 2 (see+ /// `neverDisable`).static let base27: [String] = ["com.apple.CallHistorySyncHelper","com.apple.Maps.mapspushd",@@ -129,7 +130,6 @@ enum GuestServiceProfile {"com.apple.email.maild","com.apple.eyereliefd","com.apple.familycircled",- "com.apple.financed","com.apple.findmy.findmybeaconingd","com.apple.findmy.findmylocated","com.apple.finhealthd",@@ -174,7 +174,6 @@ enum GuestServiceProfile {"com.apple.nfcd","com.apple.ospredictiond","com.apple.parsec-fbf",- "com.apple.passd","com.apple.peopled","com.apple.perfpowermetricd","com.apple.photoanalysisd",@@ -285,6 +284,10 @@ enum GuestServiceProfile {// without it WidgetKit traps in each extension and the controls draw// blank."com.apple.siriactionsd",+ // Wallet: its first screen asks passd synchronously for the pass groups,+ // and passd waits on financed's Core Data store; with either disabled+ // FrontBoard kills Wallet at the scene-create watchdog.+ "com.apple.passd", "com.apple.financed",]// MARK: - Selectiondiff --git a/VPhoneDaemon/Tests/LogicTests.swift b/VPhoneDaemon/Tests/LogicTests.swiftindex 5877f3cb..81b464da 100644--- a/VPhoneDaemon/Tests/LogicTests.swift+++ b/VPhoneDaemon/Tests/LogicTests.swift@@ -46,8 +46,8 @@ enum LogicTests {static func profileCatalog() {let groups = GuestServiceProfile.groups27- expectEqual(GuestServiceProfile.base27.count, 136, "appendix A less siriactionsd")- expectEqual(Set(GuestServiceProfile.base27).count, 136, "appendix A has no duplicates")+ expectEqual(GuestServiceProfile.base27.count, 134, "appendix A less siriactionsd, passd and financed")+ expectEqual(Set(GuestServiceProfile.base27).count, 134, "appendix A has no duplicates")let all = groups.flatMap(\.labels)expectEqual(Set(all).count, all.count, "no label is in two groups")for label in all + GuestServiceProfile.neverDisable {@@ -65,7 +65,7 @@ enum LogicTests {static func profileCatalog26() {let base26 = GuestServiceProfile.base26- expectEqual(base26.count, 130, "136 minus six 26.6.2 does not load")+ expectEqual(base26.count, 128, "134 minus six 26.6.2 does not load")expectEqual(Set(base26).count, base26.count, "no duplicates")expect(Set(base26).isSubset(of: GuestServiceProfile.base27), "26 adds no label of its own")expect(GuestServiceProfile.notLoadedOn26.isSubset(of: GuestServiceProfile.base27), "only 27 labels are left out")@@ -87,32 +87,33 @@ enum LogicTests {static func profileSelection() {let trimmed = try? GuestServiceProfile.select(profile: "trimmed", iosMajor: 27)- expectEqual(trimmed?.labels.count, 140, "default trimmed = 136 + 2 store + 2 follow-up")+ expectEqual(trimmed?.labels.count, 138, "default trimmed = 134 + 2 store + 2 follow-up")expectEqual(trimmed?.groups, ["base", "app_store", "signin_followup"])expect(trimmed?.labels.contains("com.apple.followupd") == true, "followupd is in trimmed")expect(trimmed?.labels.contains("com.apple.akd") == false, "akd is not in trimmed by default")expect(trimmed?.labels.contains("com.apple.siriactionsd") == false, "siriactionsd serves App Intents controls")expect(GuestServiceProfile.neverDisable.contains("com.apple.siriactionsd"), "siriactionsd is never disabled")+ expect(trimmed?.labels.contains("com.apple.passd") == false && trimmed?.labels.contains("com.apple.financed") == false, "Wallet's daemons stay")expectEqual(trimmed?.labels, trimmed?.labels.sorted(), "labels sorted")let accounts = try? GuestServiceProfile.select(profile: "trimmed", iosMajor: 27, extraGroups: ["accounts"])- expectEqual(accounts?.labels.count, 143, "accounts adds three")+ expectEqual(accounts?.labels.count, 141, "accounts adds three")expect(accounts?.labels.contains("com.apple.amsaccountsd") == true, "amsaccountsd with accounts")let allowed = try? GuestServiceProfile.select(profile: "trimmed", iosMajor: 27, allow: ["com.apple.weatherd", "com.example.not-listed"],)- expectEqual(allowed?.labels.count, 139, "allow removes one")+ expectEqual(allowed?.labels.count, 137, "allow removes one")expectEqual(allowed?.allowed, ["com.apple.weatherd"], "only catalog labels are reported as allowed")expect(allowed?.labels.contains("com.apple.weatherd") == false, "weatherd kept")let trimmed26 = try? GuestServiceProfile.select(profile: "trimmed", iosMajor: 26)- expectEqual(trimmed26?.labels.count, 134, "26 trimmed = 130 + 2 store + 2 follow-up")+ expectEqual(trimmed26?.labels.count, 132, "26 trimmed = 128 + 2 store + 2 follow-up")expectEqual(trimmed26?.groups, ["base", "app_store", "signin_followup"])expect(trimmed26?.refused.isEmpty == true, "the 26 list names nothing never disabled")expectEqual((try? GuestServiceProfile.select(profile: "trimmed", iosMajor: 26, extraGroups: ["accounts"]))?.labels.count,- 137, "accounts adds three on 26",+ 135, "accounts adds three on 26",)expectEqual(try? GuestServiceProfile.select(profile: "none", iosMajor: 25), GuestServiceProfile.Selection())@@ -207,7 +208,7 @@ enum LogicTests {var overrides = Dictionary(uniqueKeysWithValues: ota.map { ($0, true) })overrides["com.apple.user-choice"] = truelet apply = GuestServiceProfile.reconcile(target: trimmed.labels, owned: [], overrides: overrides)- expectEqual(apply.disable.count, 137, "140 minus the three already disabled")+ expectEqual(apply.disable.count, 135, "138 minus the three already disabled")expectEqual(apply.skipped.map(\.label), ota.sorted())let owned = GuestServiceProfile.owned(after: apply, failedDisable: [], failedEnable: [])for label in apply.disable {