Run a virtual iPhone on an Apple Silicon Mac.
Swift
icli 0.8.4: device.environment and packages see vphoned's bootstrap
Jacky2cd1db410916
diff --git a/Research/vphoned_http_api.md b/Research/vphoned_http_api.mdindex 699d700c..25f7273b 100644--- a/Research/vphoned_http_api.md+++ b/Research/vphoned_http_api.md@@ -79,8 +79,8 @@ command-line executable remains unentitled and still launches `vphone-vm`.The guest links IcliKit directly. App registration refresh is available through`POST /v1/apps/refresh` or the WebSocket method `apps.refresh`. An optional`directory` selects a bundle directory; omitted, it uses `/Applications` under-the bootstrap vphoned installed (vphoned runs from the system volume, so-IcliKit cannot find the bootstrap itself). `system.uicache` is the same call.+the bootstrap vphoned installed (vphoned runs from the system volume, and+knows which install it completed). `system.uicache` is the same call.IcliKit verifies registrations by reading them back; a bundle it could notregister or verify is named in the error message. Since icli 0.7.17 aregistration builds the record uicache builds (entitlements, containerization,@@ -92,10 +92,17 @@ Since icli 0.8.0 a `PlugIns` entry that is not an app extension (a`.bundle`, a `.framework`, or an `.appex` without `NSExtension`) no longerstalls `apps.register` or `apps.refresh` and fails them with "did not recordthe plug-ins"; a `refresh_incomplete` message names the app and the field.+Since icli 0.8.4 a refresh lists apps from LaunchServices' application+records and reads a registration only for the apps it plans to change: one+with nothing to do took 0.03 s on an iOS 26.6.2 guest, 0.53 s before.`screen.screenshot` uses IcliKit's native screen capture and returns a base64JPEG with `mime_type`, `width`, and `height`; the current VM produces 1290×2796.The host's Save/Copy Screenshot menu decodes this guest image. It omits thenotch and cutout drawn by the host VM window.+Since icli 0.8.4 a native-resolution screenshot taken while SpringBoard is+not running (the boot logo, the respring spinner) is captured through the+render server at its real size; UIKit's capture came out magnified by the+screen scale.`apps.install` accepts IPA and TIPA archives. IcliKit 0.6.8 validates andextracts the archive, then calls vphone's signer on the temporary app bundlebefore IcliKit copies it into a container, registers it, and owns rollback.@@ -337,6 +344,20 @@ and whenever the settings change. SpringBoard reads the key when it starts, soa newly written one holds from the next boot or respring. Measurements:`Research/Guest/lock_screen_idle_timer.md`.+Since icli 0.8.4 `device.environment` and the package methods see a+bootstrap vphoned installed. vphoned runs from the system volume, outside+the bootstrap, and icli found no RootHide root from there: the report said+no bootstrap, and `packages.list` and `packages.status` looked for+`/var/lib/dpkg/status`. icli now finds the one `.jbroot-<16 hex digits>`+directory in `/var/containers/Bundle/Application` (`jbroot_source` is+`filesystem .jbroot`), and reads dpkg's database from the root's+`Library/dpkg` when `var/lib/dpkg`, a link the dpkg package ships, is not+there yet. Both methods answer in either layout as soon as+`bootstrap.install` has written the `firmware` record. A RootHide root+directory left by an install that did not finish is found the same way;+`bootstrap.inspect` tells a completed install (`jbroot`) from a root that+is only there (`roots`).+`/v1/health` also carries `mobilegestalt_restart_pending`. At startup vphonedremoves libMobileGestalt's cache,`/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.mobilegestaltcache/Library/Caches/com.apple.MobileGestalt.plist`,diff --git a/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved b/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolvedindex 061a584b..151b3845 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" : "eef631078200ea35faded39f46b7d909980c0e1c",- "version" : "0.8.0"+ "revision" : "47904e97f269ae6b60df95365aad104384ed27a8",+ "version" : "0.8.4"}},{diff --git a/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.pbxproj b/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.pbxprojindex 2d7b8a8e..a23ea097 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.0;+ minimumVersion = 0.8.4;};};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.resolvedindex 2cbd4ee7..28018e09 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" : "eef631078200ea35faded39f46b7d909980c0e1c",- "version" : "0.8.0"+ "revision" : "47904e97f269ae6b60df95365aad104384ed27a8",+ "version" : "0.8.4"}},{