Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Take icli 0.9.2 and sign vphoned for launchd kickstart

Jackycd88e35d7da5
diff --git a/Research/0_binary_patch_comparison.md b/Research/0_binary_patch_comparison.md
index 827e74a0..c5504a2b 100644
--- a/Research/0_binary_patch_comparison.md
+++ b/Research/0_binary_patch_comparison.md
@@ -2435,6 +2435,19 @@ override after `udid.set` and after a reboot, and the guest's own after
`udid.clear`. Details and the measurements are in
`Research/Guest/xcode_install_signature_gate.md`, "The host sees it too".
+## vphoned launchd service entitlements (2026-10-20)
+
+`VPhoneDaemon.entitlements` adds `com.apple.private.xpc.service-configure`
+and `com.apple.private.xpc.service-attach` (true) for `services.kickstart`.
+icli 0.9.1's device regression on iOS 27.0.1 guests found that launchd
+refuses kickstart with status 144 unless the caller holds both; icli's own
+binary carries them, and a library consumer such as vphoned has to sign
+with them itself. Not yet observed on a guest with vphoned:
+`services.stop` and `unload` were answered 144 without service-configure,
+so whether they now succeed is unverified, and the notes that say so
+(`Research/Guest/service_trimming.md`, `GuestServiceProfile`) are left as
+they are until a guest shows otherwise.
+
## vphoned accessibility client entitlements (2026-09-30)
`VPhoneDaemon.entitlements` adds three true booleans:
diff --git a/Research/vphoned_http_api.md b/Research/vphoned_http_api.md
index d8470fb4..12002a20 100644
--- a/Research/vphoned_http_api.md
+++ b/Research/vphoned_http_api.md
@@ -579,7 +579,7 @@ guest's own `System/System/ComputerName` in configd's preferences, which a
clone inherits.
`services.kickstart {label, kill?}` (capability `service_kickstart`, icli
-0.9.1) is `launchctl kickstart`: launchd spawns the job now, whether or not
+0.9.2) is `launchctl kickstart`: launchd spawns the job now, whether or not
its launch conditions hold, and answers the new `pid`. A running instance is
left alone and the answer says `unchanged`. With `"kill": true` (**force**)
launchd kills the running instance, waits for it to exit and spawns a new
@@ -588,6 +588,11 @@ daemon takes over: `services.load` of a label launchd already holds is a
no-op, so a new binary would otherwise wait for the next reboot. Kickstarting
vphoned's own label with `kill` ends the process answering the call; the
caller sees the connection drop and reconnects to the new instance.
+On iOS 27 launchd allows kickstart only to a caller holding
+`com.apple.private.xpc.service-configure` and `service-attach`, which
+vphoned's entitlements carry; it answers success with the running pid
+rather than EALREADY when nothing changed, and icli reports that as
+`unchanged` too.
`services.profile` (capability `service_profile`) reports the service profile
and `services.profile.apply` **force** applies one
diff --git a/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved b/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 4bf33f40..b3e0bb6f 100644
--- a/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -24,8 +24,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/owngoal-dev/icli.git",
"state" : {
- "revision" : "651ce0d0aed59d2601c35595f1a2ba7e29bb4169",
- "version" : "0.8.6"
+ "revision" : "217dc37e55ef44bf6a0739358f2486e660b05d40",
+ "version" : "0.9.2"
}
},
{
diff --git a/VPhoneDaemon/Configuration/VPhoneDaemon.entitlements b/VPhoneDaemon/Configuration/VPhoneDaemon.entitlements
index 02b954ba..50a3bd3f 100644
--- a/VPhoneDaemon/Configuration/VPhoneDaemon.entitlements
+++ b/VPhoneDaemon/Configuration/VPhoneDaemon.entitlements
@@ -337,6 +337,10 @@
</array>
<key>com.apple.private.vfs.snapshot</key>
<true/>
+ <key>com.apple.private.xpc.service-attach</key>
+ <true/>
+ <key>com.apple.private.xpc.service-configure</key>
+ <true/>
<key>com.apple.rootless.critical</key>
<true/>
<key>com.apple.rootless.datavault.metadata</key>
diff --git a/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.pbxproj b/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.pbxproj
index 935dfa3c..6fd9a05d 100644
--- a/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.pbxproj
+++ b/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.pbxproj
@@ -345,7 +345,7 @@
repositoryURL = "https://github.com/owngoal-dev/icli.git";
requirement = {
kind = upToNextMajorVersion;
- minimumVersion = 0.8.6;
+ minimumVersion = 0.9.2;
};
};
C10000000000000000000072 /* XCRemoteSwiftPackageReference "swift-nio" */ = {
diff --git a/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
index a1c351d9..cd9f11e3 100644
--- a/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -6,8 +6,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/owngoal-dev/icli.git",
"state" : {
- "revision" : "651ce0d0aed59d2601c35595f1a2ba7e29bb4169",
- "version" : "0.8.6"
+ "revision" : "217dc37e55ef44bf6a0739358f2486e660b05d40",
+ "version" : "0.9.2"
}
},
{