Run a virtual iPhone on an Apple Silicon Mac.
Swift
Keep siriactionsd running so Control Center controls draw
Jacky843f7673ed08
diff --git a/Research/Guest/service_trimming.md b/Research/Guest/service_trimming.mdindex 9e0cfd34..f60be6c6 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 | 137 | Appendix A of the measurement below. Nothing in vphone, IcliKit or the guest hooks talks to them |+| `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 || `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 |@@ -53,7 +53,7 @@ The `base` group, by area:| Area | Examples | Kind || --- | --- | --- |-| Siri and intelligence | assistantd, siriinferenced, intelligenceflowd, siriactionsd, modelmanagerd, corespeechd | Not used. siriactionsd also serves Shortcuts and App Intents, and corespeechd and modelmanagerd serve dictation |+| Siri and intelligence | assistantd, siriinferenced, intelligenceflowd, modelmanagerd, corespeechd | Not used. corespeechd and modelmanagerd serve dictation. siriactionsd stays: see below || 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 |@@ -67,6 +67,18 @@ The `base` group, by area:| OTA | softwareupdateservicesd, mobile.softwareupdated, OTATaskingAgent, OTACrashCopier | Same as the [OTA block](ota_software_update_block.md) || Cellular extras and prediction | WirelessRadioManager, carkitd, vmd, PowerUIAgent, duetexpertd, ospredictiond | CommCenter itself stays |+**siriactionsd stays (list version 2, 2026-10-24).** It was in the measured+base list, but it also serves `com.apple.siri.VoiceShortcuts.xpc`, through+which every Control Center control and App Intents widget serializes its+intent (`-[INAppIntent initWithAppBundleIdentifier:linkAction:linkActionMetadata:]`).+With it disabled, each such extension traps in WidgetKit+(`ControlAction.swift: Fatal error: Can't create CHSIntentReference from+BarcodeScannerIntent: nilError`), and Control Center draws Timer, Calculator,+Camera, Code Scanner, Alarm, Magnifier and Voice Memo as blank circles. Seen+on an iPhone Duo 27.1 guest; allowing the label and restarting restored every+control. It is now in `neverDisable`, so `trimmed` no longer selects it and a+guest that applies the profile again turns it back on.+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 003e0052..638a3d28 100644--- a/VPhoneDaemon/Daemon/GuestServiceProfile.swift+++ b/VPhoneDaemon/Daemon/GuestServiceProfile.swift@@ -21,7 +21,7 @@ import Foundationenum GuestServiceProfile {/// Raised whenever a label list changes, and kept in the record, so a/// guest shows which list its overrides came from.- static let listVersion = 1+ static let listVersion = 2static let recordPath = "/var/db/vphoned/service-profile.plist"static let trimmed = "trimmed"static let none = "none"@@ -80,8 +80,9 @@ enum GuestServiceProfile {static let groups27 = catalog(base: base27)/// Appendix A of the 2026-10-07 measurement on `svctest-a` (iPhone, 27.0- /// 24A435): 137 LaunchDaemons that were loaded at boot and stayed unloaded- /// after the override, with the four traps below already taken out.+ /// 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`).static let base27: [String] = ["com.apple.CallHistorySyncHelper","com.apple.Maps.mapspushd",@@ -189,7 +190,6 @@ enum GuestServiceProfile {"com.apple.servicesintelligenced","com.apple.seserviced","com.apple.siri.sirireaderd",- "com.apple.siriactionsd","com.apple.siriinferenced","com.apple.siriknowledged","com.apple.sociallayerd",@@ -280,6 +280,11 @@ enum GuestServiceProfile {"com.apple.ReportCrash", "com.apple.osanalytics.osanalyticshelper","com.apple.audiomxd", "com.apple.mediaplaybackd", "com.apple.mediaremoted", "com.apple.cameracaptured","com.apple.mobileactivationd",+ // App Intents: every Control Center control and App Intents widget+ // serializes its intent through siriactionsd's VoiceShortcuts service;+ // without it WidgetKit traps in each extension and the controls draw+ // blank.+ "com.apple.siriactionsd",]// MARK: - Selectiondiff --git a/VPhoneDaemon/Tests/LogicTests.swift b/VPhoneDaemon/Tests/LogicTests.swiftindex 57c9033d..5877f3cb 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, 137, "appendix A")- expectEqual(Set(GuestServiceProfile.base27).count, 137, "appendix A has no duplicates")+ expectEqual(GuestServiceProfile.base27.count, 136, "appendix A less siriactionsd")+ expectEqual(Set(GuestServiceProfile.base27).count, 136, "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, 131, "137 minus six 26.6.2 does not load")+ expectEqual(base26.count, 130, "136 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,30 +87,32 @@ enum LogicTests {static func profileSelection() {let trimmed = try? GuestServiceProfile.select(profile: "trimmed", iosMajor: 27)- expectEqual(trimmed?.labels.count, 141, "default trimmed = 137 + 2 store + 2 follow-up")+ expectEqual(trimmed?.labels.count, 140, "default trimmed = 136 + 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")expectEqual(trimmed?.labels, trimmed?.labels.sorted(), "labels sorted")let accounts = try? GuestServiceProfile.select(profile: "trimmed", iosMajor: 27, extraGroups: ["accounts"])- expectEqual(accounts?.labels.count, 144, "accounts adds three")+ expectEqual(accounts?.labels.count, 143, "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, 140, "allow removes one")+ expectEqual(allowed?.labels.count, 139, "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, 135, "26 trimmed = 131 + 2 store + 2 follow-up")+ expectEqual(trimmed26?.labels.count, 134, "26 trimmed = 130 + 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,- 138, "accounts adds three on 26",+ 137, "accounts adds three on 26",)expectEqual(try? GuestServiceProfile.select(profile: "none", iosMajor: 25), GuestServiceProfile.Selection())@@ -205,7 +207,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, 138, "141 minus the three already disabled")+ expectEqual(apply.disable.count, 137, "140 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 {