Run a virtual iPhone on an Apple Silicon Mac.
Swift
Keep only the camera from EXP and drop the location app hook
Lakr235272673a81
diff --git a/Research/0_binary_patch_comparison.md b/Research/0_binary_patch_comparison.mdindex d7d4c321..98be0dbf 100644--- a/Research/0_binary_patch_comparison.md+++ b/Research/0_binary_patch_comparison.md@@ -9,14 +9,37 @@> identifier is the record identifier the patcher already emits, or the common> prefix when one patch writes several sites — so `jb.kcall10` is one selectable> patch covering its four records, and `sandbox_ext` covers every-> `sandbox_ext_<index>`. 115 patches are declared in total. `vphone-cli fw patches`+> `sandbox_ext_<index>`. 116 patches are declared in total. `vphone-cli fw patches`> prints them; `--json` is what the Launchpad patch editor reads.>> Two presets ship, prewritten, in> `VPhone.bundle/Contents/Resources/patches_presets/`. Both name all nine sets and> differ only in their selection: `standard` (the default, and what a VM gets-> unless `--preset` says otherwise) blocks the two Frida Stalker relaxations and the-> two halves of the `hv_vmm_present` concealment; `extended` blocks nothing.+> unless `--preset` says otherwise) blocks the two Frida Stalker relaxations, the+> three `hv_vmm_present` concealment patches, and the iPhone17,3 identity rewrites;+> `extended` blocks nothing.+>+> **Only the camera remains of EXP by default (2026-09-28).** `standard` is now the+> JB baseline plus the virtual camera. Off by default, besides the concealment+> below: `watchdogd.hv_vmm_cache` (moved into+> `FirmwarePatchSetCatalog.hypervisorConcealmentPatches`, and no longer+> `bootEssential` — watchdogd only panics once the OID is renamed), the eight+> DeviceTree identity rewrites (`devicetree.target_sub_type`,+> `compatible_secondary`, `product.fdr_product_type`, `product.sub_product_type`,+> `product.unique_model`, `product.gestalt_variants_rename`,+> `arm_io.device_type`, `arm_io.soc_generation`), and the post-restore Preboot+> DeviceTree rewrite, now declared as `preboot_devicetree.identity`+> (`.prebootDeviceTree`, Guest Identity set). Until now that rewrite was undeclared+> and `cfw install` ran it on every VM; it now asks the plan first, and a VM with+> no plan still gets it. The last two groups are+> `FirmwarePatchSetCatalog.experimentalIdentityPatches`. Still on: the four board+> presentation properties, camera offsets, the camera / FaceTime / audio / IOPM /+> SMC / ISP nodes, and `camera_dsc`. Camera support reads `/product/camera`+> through MobileGestalt and does not depend on the identity rewrites. Issue #438+> (no location with EXP) is the reason. The `libvlocation.dylib` app hook that+> worked around it is removed, and `location.*` is back on IcliKit's locationd+> simulation with read-back. The Preboot DeviceTree comes from restore, so a VM+> restored with the identity on keeps it until it is restored again.>> **`hv_vmm_present` concealment is opt-in as of 2026-09-28, and it is not a> preference.** `kernelcache_exp.hv_vmm` (the kernel OID rename plus the@@ -37,9 +60,9 @@> declared as a pair, `FirmwarePatchSetCatalog.hypervisorConcealmentPatches`, and a> catalogue test refuses a shipped preset that enables one without the other. Both> lost `bootEssential`, which they never were: a shipped preset that drops a-> boot-essential patch warns on every run. The other former EXP patches are-> untouched — DeviceTree identity and camera, `camera_dsc`, the watchdogd cache-> patch, and the post-restore Preboot DeviceTree rewrite all stay on by default. A VM records only the boxes its owner changed, in+> boot-essential patch warns on every run. (The other former EXP patches stayed on+> in this first change; the note above turns everything but the camera off.) A VM+> records only the boxes its owner changed, in> `<vm>/PatchSelection.plist`, and `fw patch` writes what it resolved to> `<vm>/PatchPlan.plist` for `cfw install` to reuse.>@@ -1520,3 +1543,9 @@ coordinate through `CLLocationManager` for authorized clients. The locationstate is an atomically replaced JSON file, and removal restores the nativepath. Maps showed the Tokyo and Apple Park coordinates in the running 26.4 VM;the automatic SystemHook injection path was verified after relaunching Maps.++**Removed (2026-09-28).** The hook worked around a symptom of the former EXP+patches (issue #438), which `standard` now leaves off; see the note at the top.+SystemHook no longer loads `libvlocation.dylib`, the bundle no longer ships it,+and vphoned's `location.*` methods call IcliKit directly again. A guest that+already has `/usr/lib/libvlocation.dylib` keeps the file, but nothing loads it.diff --git a/Research/Guest/location_simulation_26_4_failure.md b/Research/Guest/location_simulation_26_4_failure.mdindex eb5fa9fd..f4c8e246 100644--- a/Research/Guest/location_simulation_26_4_failure.md+++ b/Research/Guest/location_simulation_26_4_failure.md@@ -1,5 +1,18 @@# iOS 26.4 VM location simulation failure+> **Superseded (2026-09-28): the app hook is gone.** `libvlocation.dylib` and+> its SystemHook load were removed, and `location.set` / `location.clear` /+> `location.current` are IcliKit's `simulateLocation` / `clearSimulatedLocation`+> / `currentLocation` again, which prove a request by reading the fix back (see+> `Research/vphoned_http_api.md`). The 2.0.4 bundle used below was the first+> with the former EXP patches in the JB flow (228326d), including the+> `hv_vmm_present` concealment. With it on, bluetoothd crash-loops and locationd+> blocks on the throttled Bluetooth service (issue #438), which fits the+> `invalid location` / `invalid latest selected hypothesis` fusion failure+> recorded here. `standard` now leaves the concealment and the iPhone17,3+> identity rewrites off; only the camera patches remain from EXP. Re-run the+> reproduction below on a VM restored with `standard` to confirm.+## Reproduction (2026-09-25)The running `26.4` VM uses the `jb` firmware variant and iOS 26.4.0. Itsdiff --git a/Research/vphoned_http_api.md b/Research/vphoned_http_api.mdindex 4c389680..eea53457 100644--- a/Research/vphoned_http_api.md+++ b/Research/vphoned_http_api.md@@ -297,13 +297,12 @@ icli's own error `code` (`failed`, `unavailable`, `device_locked`, …) andmessage.The environment update keeps `launchdhook-vphone.dylib`,-`SystemHook-vphone.dylib`, `libvcamcaptured.dylib`, `libcamfix.dylib`, and-`libvlocation.dylib` in+`SystemHook-vphone.dylib`, `libvcamcaptured.dylib` and `libcamfix.dylib` in`/usr/lib` in step with the host bundle. After each connection the VMprocess compares the guest's hashes with `Contents/Resources/guest-resources`,uploads the libraries that differ to the staging directory(`/var/root/Library/Caches/vphone-environment`) and calls-`environment.install`. vphoned accepts only those five names and checks each+`environment.install`. vphoned accepts only those four names and checks eachSHA-256. When `/` is mounted read-only it runs `/sbin/mount -u -w /`, copieseach library beside its destination, renames it into place with mode 0755and owner root, and tries `/sbin/mount -u -r /` again. An APFS guest can reject@@ -315,14 +314,27 @@ camera client loads the new hook. The result lists `installed`,`restarted_pids` and `reboot_required`, which is true when the launchd hookchanged: launchd keeps the copy it mapped at boot.-`location.set` publishes the validated coordinate atomically to-`/var/mobile/Library/Caches/vphone-location.json`. The app hook reads that file-and delivers updates to authorized `CLLocationManager` clients, including Maps;-`location.clear` removes it. The system simulation request remains best effort-because iOS 26.4's location fusion may reject it. `location.current` reports-`delivery: application_override` when the state file exists; it reports the-published coordinate, not independent confirmation from each app. Newly-installed hooks require app relaunch before that app receives overrides.+`location.set` is IcliKit's `simulateLocation`: it sends locationd's+`CLSimulationManager` the sequence Xcode uses (`stopLocationSimulation`,+`clearSimulatedLocations`, `appendSimulatedLocation:`, `flush`,+`startLocationSimulation`). locationd sends no reply and silently ignores a+client without `com.apple.locationd.simulation`, so success is decided by a+read-back: vphoned opens a `CLLocationManager` with+`initWithEffectiveBundlePath:` on the first authorized System Services bundle+(`SystemCustomization`, `TimeZone`, `CompassCalibration`), then waits up to 5 s+for a fix stamped no earlier than one second before the read, within 1e-7° of+the requested coordinate. The fix must be `fresh` and+`sourceInformation.isSimulatedBySoftware`; otherwise vphoned clears the+simulation and returns `unavailable` (`no location within 5 s`, or `locationd+did not apply the simulated location`). The reply is `simulating: true` plus+the fix that was read back. `location.clear` stops the simulation and polls for+up to 6 s until locationd stops reporting a fresh simulated fix.+`location.current` reads the same way with the caller's timeout and reports+`fresh` and `simulated` as CoreLocation gives them. The read-back needs+locationd to deliver a fused fix. The 2.0.4 guest in+`Research/Guest/location_simulation_26_4_failure.md` never got one; that build+had the hv_vmm_present concealment on, under which bluetoothd crash-loops and+locationd blocks on it (issue #438). `standard` no longer enables it.## Connection failure behaviordiff --git a/VPhoneDaemon/Daemon/GuestAPI+Environment.swift b/VPhoneDaemon/Daemon/GuestAPI+Environment.swiftindex 487ed5be..7bb9fd72 100644--- a/VPhoneDaemon/Daemon/GuestAPI+Environment.swift+++ b/VPhoneDaemon/Daemon/GuestAPI+Environment.swift@@ -14,7 +14,6 @@ extension GuestAPI {"SystemHook-vphone.dylib","libvcamcaptured.dylib","libcamfix.dylib",- "libvlocation.dylib",]static let environmentStaging = "/var/root/Library/Caches/vphone-environment"diff --git a/VPhoneDaemon/Daemon/GuestAPI.swift b/VPhoneDaemon/Daemon/GuestAPI.swiftindex 9d19c812..21b217ce 100644--- a/VPhoneDaemon/Daemon/GuestAPI.swift+++ b/VPhoneDaemon/Daemon/GuestAPI.swift@@ -250,19 +250,19 @@ enum GuestAPI {}return try hidPress(page: page, usage: usage)case "location.set":- return try GuestLocationSimulation.set(.init(+ return try simulateLocation(latitude: number(params, "latitude"),longitude: number(params, "longitude"),altitude: number(params, "altitude", default: 0),horizontalAccuracy: number(params, "horizontal_accuracy", default: 5),verticalAccuracy: number(params, "vertical_accuracy", default: 5),- speed: (params["speed"] as? NSNumber)?.doubleValue ?? -1,- course: (params["course"] as? NSNumber)?.doubleValue ?? -1,- ))+ speed: (params["speed"] as? NSNumber)?.doubleValue,+ course: (params["course"] as? NSNumber)?.doubleValue,+ )case "location.clear":- return try GuestLocationSimulation.clear()+ return try clearSimulatedLocation()case "location.current":- return try GuestLocationSimulation.current(timeout: number(params, "timeout", default: 10))+ return try currentLocation(timeout: number(params, "timeout", default: 10))case "developer_mode.status":return try developerModeStatus()case "developer_mode.enable":diff --git a/VPhoneDaemon/Daemon/GuestLocationSimulation.swift b/VPhoneDaemon/Daemon/GuestLocationSimulation.swiftdeleted file mode 100644index 76ba9e40..00000000--- a/VPhoneDaemon/Daemon/GuestLocationSimulation.swift+++ /dev/null@@ -1,139 +0,0 @@-import Darwin-import Foundation-import IcliKit--/// Publishes one location for the app-side CoreLocation bridge. The VM's-/// locationd accepts simulation commands but can fail to deliver a fused fix.-enum GuestLocationSimulation {- static let path = "/var/mobile/Library/Caches/vphone-location.json"- private static let backend = LocationDaemonBackend()-- struct Point: Sendable {- let latitude: Double- let longitude: Double- let altitude: Double- let horizontalAccuracy: Double- let verticalAccuracy: Double- let speed: Double- let course: Double-- var json: [String: Double] {- [- "latitude": latitude, "longitude": longitude, "altitude": altitude,- "horizontal_accuracy": horizontalAccuracy, "vertical_accuracy": verticalAccuracy,- "speed": speed, "course": course,- ]- }- }-- static func set(_ point: Point) throws -> [String: Any] {- guard point.latitude.isFinite, (-90 ... 90).contains(point.latitude),- point.longitude.isFinite, (-180 ... 180).contains(point.longitude),- point.altitude.isFinite, point.horizontalAccuracy.isFinite, point.horizontalAccuracy >= 0,- point.verticalAccuracy.isFinite, point.verticalAccuracy >= 0,- point.speed.isFinite, point.course.isFinite- else { throw GuestAPIError.invalidRequest("invalid location coordinates or accuracy") }-- let data = try JSONSerialization.data(withJSONObject: point.json)- try FileManager.default.createDirectory(- atPath: (path as NSString).deletingLastPathComponent,- withIntermediateDirectories: true,- )- try writeAtomically(data)- backend.set(point)- return ["simulating": true, "delivery": "application_override", "location": point.json]- }-- static func clear() throws -> [String: Any] {- guard unlink(path) == 0 || errno == ENOENT else {- throw GuestAPIError.operationFailed("could not clear simulated location: \(String(cString: strerror(errno)))")- }- backend.clear()- return ["simulating": false]- }-- static func current(timeout: Double) throws -> [String: Any] {- if let data = try? Data(contentsOf: URL(fileURLWithPath: path)),- let state = try? JSONSerialization.jsonObject(with: data) as? [String: Double]- {- var result: [String: Any] = state- result["simulated"] = true- result["delivery"] = "application_override"- return result- }- return try currentLocation(timeout: timeout)- }-- private static func writeAtomically(_ data: Data) throws {- let temporary = path + "." + UUID().uuidString- let fd = open(temporary, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC | O_NOFOLLOW, 0o644)- guard fd >= 0 else {- throw GuestAPIError.operationFailed("could not open simulated location: \(String(cString: strerror(errno)))")- }- var openFD = fd- defer {- if openFD >= 0 {- close(openFD)- }- unlink(temporary)- }- try data.withUnsafeBytes { buffer in- guard let base = buffer.baseAddress else { return }- var offset = 0- while offset < buffer.count {- let written = write(fd, base.advanced(by: offset), buffer.count - offset)- guard written > 0 else {- throw GuestAPIError.operationFailed("could not write simulated location: \(String(cString: strerror(errno)))")- }- offset += written- }- }- guard fchmod(fd, 0o644) == 0, close(fd) == 0 else {- openFD = -1- throw GuestAPIError.operationFailed("could not finish simulated location: \(String(cString: strerror(errno)))")- }- openFD = -1- guard rename(temporary, path) == 0 else {- throw GuestAPIError.operationFailed("could not publish simulated location: \(String(cString: strerror(errno)))")- }- }-}--/// Best-effort system simulation remains useful on guests whose locationd-/// publishes a fix. It cannot block application updates or route replay.-private final class LocationDaemonBackend: @unchecked Sendable {- private let queue = DispatchQueue(label: "vphoned.location.simulation")- private let lock = NSLock()- private var generation: UInt64 = 0-- func set(_ point: GuestLocationSimulation.Point) {- lock.lock()- generation &+= 1- let submitted = generation- lock.unlock()- queue.async { [self] in- lock.lock()- let current = generation == submitted- lock.unlock()- guard current else { return }- do {- _ = try simulateLocation(- latitude: point.latitude, longitude: point.longitude,- altitude: point.altitude, horizontalAccuracy: point.horizontalAccuracy,- verticalAccuracy: point.verticalAccuracy,- speed: point.speed >= 0 ? point.speed : nil,- course: point.course >= 0 ? point.course : nil,- )- } catch {- NSLog("[location] system simulation unavailable: %@", String(describing: error))- }- }- }-- func clear() {- lock.lock()- generation &+= 1- lock.unlock()- queue.async { _ = try? clearSimulatedLocation() }- }-}diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swiftindex 519b96b1..2b11c5a7 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift@@ -7,6 +7,10 @@//// None is boot-essential: a VM with a stock device tree boots, it just looks like// a research board and has no camera.+//+// The eight Device Identity rewrites came from the former EXP variant and are off+// in `standard` (`FirmwarePatchSetCatalog.experimentalIdentityPatches`). The camera+// geometry and added nodes stay on: the camera needs them, not the identity.import Foundationimport VPhonePatchKitdiff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestIdentityPatchSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestIdentityPatchSet.swiftindex 9478e60e..23018a55 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestIdentityPatchSet.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestIdentityPatchSet.swift@@ -1,15 +1,18 @@// FirmwareGuestIdentityPatchSet.swift — Manifest for what the guest sees of itself.//// The shared-cache half of the hypervisor concealment that the kernel set starts,+// the watchdogd patch that goes with it, the Preboot device tree identity rewrite,// plus the camera symbols the virtual camera is published through. These pair with-// `com.vphone.patchset.kernel.hypervisor` and the device tree's camera nodes: on-// their own, each half leaves the guest inconsistent with itself.+// `com.vphone.patchset.kernel.hypervisor` and the device tree's identity and camera+// nodes: on their own, each half leaves the guest inconsistent with itself.//-// `hv_vmm_dsc` is therefore off in `standard` for exactly the reason its kernel-// half is — see `FirmwareKernelHypervisorPatchSet` for what a 26.4 guest does when-// the OID is renamed. The watchdogd patch beside it is not part of that pair and-// stays on: it stops watchdogd acting on a cached positive answer, which is-// harmless when the sysctl still reads true.+// Everything here came from the former EXP variant. Only `camera_dsc` is on in+// `standard`. `hv_vmm_dsc` is off for exactly the reason its kernel half is — see+// `FirmwareKernelHypervisorPatchSet` for what a 26.4 guest does when the OID is+// renamed. The watchdogd patch only matters once the hypervisor is hidden, so it+// moves with that pair (`FirmwarePatchSetCatalog.hypervisorConcealmentPatches`).+// The Preboot rewrite belongs with the device tree identity patches+// (`FirmwarePatchSetCatalog.experimentalIdentityPatches`).import Foundationimport VPhonePatchKit@@ -17,10 +20,14 @@ import VPhonePatchKitpublic enum FirmwareGuestIdentityPatchSet {public static let identifier = "com.vphone.patchset.guest.identity"+ /// The root `model`, `target-type` and `compatible` rewrite in the restored+ /// Preboot device tree, run by `cfw install`.+ public static let prebootDeviceTreeIdentity = "preboot_devicetree.identity"+public static let manifest = VPhonePatchSetManifest(identifier: identifier,name: "Guest Identity",- summary: "Hypervisor concealment in the shared cache and watchdog, plus the virtual camera symbols",+ summary: "Hypervisor concealment in the shared cache and watchdog, the Preboot identity, and the virtual camera symbols",patches: [VPhonePatchDeclaration(identifier: "hv_vmm_dsc",@@ -35,9 +42,21 @@ public enum FirmwareGuestIdentityPatchSet {VPhonePatchDeclaration(identifier: "watchdogd.hv_vmm_cache",title: "watchdogd hypervisor cache",- summary: "Stops watchdogd caching a positive hypervisor answer and acting on it.",+ summary: """+ Forces watchdogd's cached hypervisor answer to true. Without it, watchdogd \+ panics the guest once kernelcache_exp.hv_vmm renames the sysctl, so it is \+ off by default with the concealment and must be enabled with it.+ """,target: .guestExecutable(path: "/usr/libexec/watchdogd"),- bootEssential: true,+ ),+ VPhonePatchDeclaration(+ identifier: prebootDeviceTreeIdentity,+ title: "Preboot device tree identity",+ summary: """+ Rewrites the restored device tree's root model, target-type and compatible \+ entries to iPhone17,3 / D47. Off by default with the other identity rewrites.+ """,+ target: .prebootDeviceTree,),VPhonePatchDeclaration(identifier: "camera_dsc",diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelHypervisorPatchSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelHypervisorPatchSet.swiftindex 85885171..f0f3c9bb 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelHypervisorPatchSet.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelHypervisorPatchSet.swift@@ -13,7 +13,8 @@// blocks on a synchronous call to the throttled Bluetooth XPC service, the// `com.apple.locationd.migrator` data-migrator plugin hangs for over an hour, and// SpringBoard waits on migration — black screen, no panic. `--preset extended` or a-// per-VM checkmark turns it back on, together with `hv_vmm_dsc`.+// per-VM checkmark turns it back on, together with `hv_vmm_dsc` and+// `watchdogd.hv_vmm_cache`.//// Its own set because it is the one kernel change that is about hiding the// hypervisor rather than about jailbreaking, so a preset can take it or leave it@@ -36,8 +37,8 @@ public enum FirmwareKernelHypervisorPatchSet {summary: """Renames the hv_vmm_present OID and mangles its internal caller, so a userland \check for the hypervisor finds nothing. Off by default: it leaves a freshly \- restored 26.4 guest on a black screen. Enable it together with hv_vmm_dsc, \- never alone.+ restored 26.4 guest on a black screen. Enable it together with hv_vmm_dsc \+ and watchdogd.hv_vmm_cache, never alone.""",target: .firmware(.kernelcache),),diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swiftindex 36a6f226..22a0165a 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift@@ -49,16 +49,41 @@ public enum FirmwarePatchSetCatalog {////// The hypervisor concealment pair is off for a harder reason: it stops a/// freshly restored 26.4 guest booting at all. See- /// ``hypervisorConcealmentPatches``.+ /// ``hypervisorConcealmentPatches``. The rest of the former EXP variant is+ /// off with it, bar the camera: see ``experimentalIdentityPatches``.public static let manualOnlyPatches: Set<String> =Set(FirmwareKernelFridaPatchSet.manifest.patches.map(\.identifier)).union(hypervisorConcealmentPatches)+ .union(experimentalIdentityPatches)- /// The two halves of the `hv_vmm_present` concealment, which are one patch in- /// everything but name and have to be selected together.+ /// The former EXP patches that make the guest claim to be an iPhone17,3.+ ///+ /// `standard` is the JB baseline plus the camera. The camera needs the device+ /// tree's `/product/camera`, ISP and SMC nodes and `camera_dsc`, which stay on;+ /// it does not need the identity rewrites. They shipped on with the hypervisor+ /// concealment when EXP joined the JB flow, and guests from that build lost+ /// location (issue #438), so they go back to opt-in with it. `extended` or a+ /// per-VM checkmark turns them back on.+ public static let experimentalIdentityPatches: Set<String> = [+ "devicetree.target_sub_type",+ "devicetree.compatible_secondary",+ "devicetree.product.fdr_product_type",+ "devicetree.product.sub_product_type",+ "devicetree.product.unique_model",+ "devicetree.product.gestalt_variants_rename",+ "devicetree.arm_io.device_type",+ "devicetree.arm_io.soc_generation",+ FirmwareGuestIdentityPatchSet.prebootDeviceTreeIdentity,+ ]++ /// The `hv_vmm_present` concealment, which is one patch in everything but name+ /// and has to be selected as a whole.////// Renaming the OID without mangling the shared cache breaks the graphics and- /// ML paths; mangling the cache without the rename does nothing. Both are off+ /// ML paths; mangling the cache without the rename does nothing. watchdogd+ /// caches the sysctl at startup and, when the renamed OID returns ENOENT,+ /// reaches a `brk` that launchd turns into a panic, so its patch goes with the+ /// rename and is pointless without it. All three are off/// in `standard` because on a freshly restored 26.4 guest the rename makes/// `bluetoothd`'s cached `kern.hv_vmm_present` lookup fail, which sends it down/// the `MGIsDeviceOneOfType` path, leaves its transport singleton NULL and@@ -69,6 +94,7 @@ public enum FirmwarePatchSetCatalog {public static let hypervisorConcealmentPatches: Set<String> = ["kernelcache_exp.hv_vmm","hv_vmm_dsc",+ "watchdogd.hv_vmm_cache",]/// The preset a VM gets when nothing else is named.@@ -85,16 +111,16 @@ public enum FirmwarePatchSetCatalog {selection: .block(manualOnlyPatches),)- /// Everything the bundle declares, including the Frida relaxations and the- /// hypervisor concealment. Each patch's own version gate still decides whether- /// it lands.+ /// Everything the bundle declares, including the Frida relaxations, the+ /// hypervisor concealment and the iPhone17,3 identity. Each patch's own version+ /// gate still decides whether it lands.public static let extendedPreset = VPhonePatchPreset(identifier: "extended",title: "Extended",summary: """- Every patch this bundle declares, including the Frida Stalker relaxations \- and the hv_vmm_present concealment that a freshly restored 26.4 guest does \- not survive.+ Every patch this bundle declares, including the Frida Stalker relaxations, \+ the iPhone17,3 identity rewrites, and the hv_vmm_present concealment that a \+ freshly restored 26.4 guest does not survive.""",patchSets: bundledReferences,selection: .all,diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swiftindex 4d08c03a..d03d2e8f 100644--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swift+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/PatchSets/FirmwarePatchSetCatalogTests.swift@@ -162,14 +162,15 @@ struct FirmwarePatchSetCatalogTests {}@Test- func `The hv_vmm_present halves move together, and only extended has them`() throws {- // Two patches, one behaviour: the kernel OID rename and the shared-cache- // mangle. A plan holding one without the other is broken either way round —- // the rename alone breaks the graphics and ML paths, the mangle alone does- // nothing — and both together brick a freshly restored 26.4 guest, which is- // why standard has neither. See FirmwareKernelHypervisorPatchSet.+ func `The hv_vmm_present patches move together, and only extended has them`() throws {+ // Three patches, one behaviour: the kernel OID rename, the shared-cache+ // mangle and the watchdogd cache patch. A plan holding some without the+ // rest is broken — the rename alone breaks the graphics and ML paths and+ // panics watchdogd, the others alone do nothing — and all together brick a+ // freshly restored 26.4 guest, which is why standard has none. See+ // FirmwareKernelHypervisorPatchSet.let pair = FirmwarePatchSetCatalog.hypervisorConcealmentPatches- #expect(pair.count == 2)+ #expect(pair.count == 3)for identifier in pair {let declaration = try #require(FirmwarePatchSetCatalog.allDeclarations.first { $0.identifier == identifier },diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swiftindex 05e197e3..835c1df1 100644--- a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift@@ -214,7 +214,7 @@ struct VPhoneCustomFirmwareInstaller {plan: plan,)}- try patchPreboot(volumes: volumes, work: work)+ try patchPreboot(volumes: volumes, work: work, plan: plan)_ = try tool("/sbin/umount", [data.path])dataMounted = false_ = try tool("/sbin/umount", [system.path])@@ -755,8 +755,8 @@ struct VPhoneCustomFirmwareInstaller {try bundle.replaceFile(".vphoned.signed", fromFileAt: work.file("vphoned"), mode: 0o755, owner: owner)}- /// The launchd hook, SystemHook, camera hooks, and location hook. SystemHook- /// loads app hooks from /usr/lib without a bootstrap or tweak loader.+ /// The launchd hook, SystemHook and the camera hooks. SystemHook loads the+ /// camera hooks from /usr/lib without a bootstrap or tweak loader.private func installEnvironment(system: VPhoneConfinedDirectory) throws {for name in VPhoneGuestEnvironment.libraries {let source = try VPhoneGuestBinaries.resolve(name)@@ -793,7 +793,18 @@ struct VPhoneCustomFirmwareInstaller {// MARK: - Preboot- private func patchPreboot(volumes: [[String: Any]], work: WorkDirectory) throws {+ private func patchPreboot(+ volumes: [[String: Any]],+ work: WorkDirectory,+ plan: VPhoneVirtualMachinePatchPlan?,+ ) throws {+ // Like every guest patch, a VM with no plan still gets it.+ let identity = FirmwareGuestIdentityPatchSet.prebootDeviceTreeIdentity+ let rewriteIdentity = plan?.isEnabled(identity) ?? true+ if let plan, !rewriteIdentity {+ print(" [·] \(identity): off in preset \(plan.presetIdentifier)")+ }+ guard rewriteIdentity || !(spoofBuild ?? "").isEmpty else { return }guardlet preboot = volumes.first(where: { ($0["Roles"] as? [String])?.contains("Preboot") == true }),let device = preboot["DeviceIdentifier"] as? String@@ -818,7 +829,9 @@ struct VPhoneCustomFirmwareInstaller {guard candidates.count == 1, let deviceTree = candidates.first else {throw ValidationError("Expected one device tree in the Preboot volume but found \(candidates.count). Restore the VM, then install CFW again.")}- try patchCopy(of: deviceTree, in: root, work: work, verb: "patch-post-restore-dt")+ if rewriteIdentity {+ try patchCopy(of: deviceTree, in: root, work: work, verb: "patch-post-restore-dt")+ }if let build = spoofBuild {let version = "Cryptexes/OS/System/Library/CoreServices/SystemVersion.plist"if try root.isRegularFile(version) {diff --git a/VPhoneExecutable/VPhoneVirtualization/Build/StageBundle.sh b/VPhoneExecutable/VPhoneVirtualization/Build/StageBundle.shindex 08636631..5b91dcc7 100755--- a/VPhoneExecutable/VPhoneVirtualization/Build/StageBundle.sh+++ b/VPhoneExecutable/VPhoneVirtualization/Build/StageBundle.sh@@ -67,7 +67,6 @@ fi/bin/cp "$guest_products/launchhook/launchdhook-vphone.dylib" "$guest/launchdhook-vphone.dylib"/bin/cp "$guest_products/systemhook/SystemHook-vphone.dylib" "$guest/SystemHook-vphone.dylib"/bin/cp "$guest_products/camfix/libcamfix.dylib" "$guest/libcamfix.dylib"-/bin/cp "$guest_products/locationfix/libvlocation.dylib" "$guest/libvlocation.dylib"/bin/cp "$guest_products/camfix/libcamfix.plist" "$guest/libcamfix.plist"/bin/cp "$guest_products/vcamcaptured/libvcamcaptured.dylib" "$guest/libvcamcaptured.dylib"/bin/cp "$guest_products/vcamcaptured/libvcamcaptured.plist" "$guest/libvcamcaptured.plist"diff --git a/VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.sh b/VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.shindex f4775218..c36fa878 100755--- a/VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.sh+++ b/VPhoneExecutable/VPhoneVirtualization/Build/ValidateBundle.sh@@ -55,13 +55,14 @@ for preset in "$resources/patches_presets/"*.plist; do/usr/bin/plutil -lint -s "$preset" || { print -u2 "Malformed patch preset: ${preset:t}"; exit 1; }done-for name in vphoned launchdhook-vphone.dylib SystemHook-vphone.dylib libcamfix.dylib libvlocation.dylib \+for name in vphoned launchdhook-vphone.dylib SystemHook-vphone.dylib libcamfix.dylib \libvcamcaptured.dylib libAppleParavirtCompilerPluginIOGPUFamily.dylib; dorequire_signed_macho "$guest/$name"donefor name in vphoned.plist libcamfix.plist libvcamcaptured.plist; do[[ -f "$guest/$name" ]] || { print -u2 "Missing guest configuration: $name"; exit 1; }done+[[ ! -e "$guest/libvlocation.dylib" ]] || { print -u2 "Obsolete guest library: libvlocation.dylib"; exit 1; }for name in vphoned vphoned.signed vphone-app VPhoneAMFIAllow VPhoneEscalator vphone-archive icli vpregister \vphone-ask-for-permission libcamfix.dylib libvlocation.dylib libvcamcaptured.dylib launchdhook-vphone.dylib \diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/extended.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/extended.plistindex 9e9641db..231e6ed4 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/extended.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/extended.plist@@ -1,8 +1,9 @@<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><!--- Everything the bundle declares, including the two pairs `standard` leaves off:- the Frida Stalker relaxations, and the hv_vmm_present concealment.+ Everything the bundle declares, including the groups `standard` leaves off: the+ Frida Stalker relaxations, the hv_vmm_present concealment, and the iPhone17,3+ identity rewrites.Read this as the catalogue and standard as the safe subset — the two name thesame patch sets and differ only in their selection. Each patch's own version gate@@ -22,7 +23,7 @@<key>Title</key><string>Extended</string><key>Summary</key>- <string>Every patch this bundle declares, including the Frida Stalker relaxations and the hv_vmm_present concealment that a freshly restored 26.4 guest does not survive.</string>+ <string>Every patch this bundle declares, including the Frida Stalker relaxations, the iPhone17,3 identity rewrites, and the hv_vmm_present concealment that a freshly restored 26.4 guest does not survive.</string><key>PatchSets</key><array><dict>diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plistindex 78f8a059..cc4c4962 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist@@ -3,13 +3,18 @@<!--The preset every VM gets unless another is named.- It draws on every patch set the bundle ships and turns on all of their patches- bar two pairs. The Frida Stalker pair widens what any process in the guest may do- and nothing needs it in order to boot. The hv_vmm_present pair — the kernel OID- rename and the shared-cache mangle — leaves a freshly restored 26.4 guest on a- black screen: bluetoothd caches the failed sysctl lookup, crash-loops, and the- data migrator SpringBoard waits on never finishes. Each pair is all-or-nothing;- see FirmwareKernelHypervisorPatchSet for the whole chain.+ It is the JB baseline plus the virtual camera. It draws on every patch set the+ bundle ships and turns on all of their patches bar three groups. The Frida+ Stalker pair widens what any process in the guest may do and nothing needs it in+ order to boot. The hv_vmm_present concealment — the kernel OID rename, the+ shared-cache mangle and the watchdogd patch — leaves a freshly restored 26.4+ guest on a black screen: bluetoothd caches the failed sysctl lookup,+ crash-loops, and the data migrator SpringBoard waits on never finishes. Each of+ those groups is all-or-nothing; see FirmwareKernelHypervisorPatchSet for the+ whole chain. The iPhone17,3 identity rewrites — eight device tree properties and+ the Preboot root model / target-type / compatible — are the rest of the former+ EXP variant; the camera does not need them, and with the concealment they left+ guests without location (issue #438).Each patch's own version gate still decides whether it lands on this pairing ofiPhone base and cloudOS.@@ -95,6 +100,16 @@<string>kernelcache_frida.vm_map_delete_immutable_code</string><string>kernelcache_exp.hv_vmm</string><string>hv_vmm_dsc</string>+ <string>watchdogd.hv_vmm_cache</string>+ <string>devicetree.target_sub_type</string>+ <string>devicetree.compatible_secondary</string>+ <string>devicetree.product.fdr_product_type</string>+ <string>devicetree.product.sub_product_type</string>+ <string>devicetree.product.unique_model</string>+ <string>devicetree.product.gestalt_variants_rename</string>+ <string>devicetree.arm_io.device_type</string>+ <string>devicetree.arm_io.soc_generation</string>+ <string>preboot_devicetree.identity</string></array></dict></dict>diff --git a/VPhoneGuestComponents/LocationFix/libvlocation.m b/VPhoneGuestComponents/LocationFix/libvlocation.mdeleted file mode 100644index a73f11d9..00000000--- a/VPhoneGuestComponents/LocationFix/libvlocation.m+++ /dev/null@@ -1,119 +0,0 @@-#import <CoreLocation/CoreLocation.h>-#import <Foundation/Foundation.h>-#import <objc/runtime.h>--#include <math.h>--// vphoned replaces this file atomically. An absent file means native location.-static NSString *const VPhoneLocationPath = @"/var/mobile/Library/Caches/vphone-location.json";-static char VPhoneLocationTimerKey;--static CLLocation *vphoneLocation(void) {- NSData *data = [NSData dataWithContentsOfFile:VPhoneLocationPath];- if (!data || data.length > 4096) return nil;- NSDictionary *state = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];- if (![state isKindOfClass:NSDictionary.class]) return nil;-- NSNumber *latitude = state[@"latitude"];- NSNumber *longitude = state[@"longitude"];- NSNumber *altitude = state[@"altitude"];- NSNumber *horizontalAccuracy = state[@"horizontal_accuracy"];- NSNumber *verticalAccuracy = state[@"vertical_accuracy"];- NSNumber *speed = state[@"speed"];- NSNumber *course = state[@"course"];- if (![latitude isKindOfClass:NSNumber.class] || ![longitude isKindOfClass:NSNumber.class] ||- ![altitude isKindOfClass:NSNumber.class] || ![horizontalAccuracy isKindOfClass:NSNumber.class] ||- ![verticalAccuracy isKindOfClass:NSNumber.class] || ![speed isKindOfClass:NSNumber.class] ||- ![course isKindOfClass:NSNumber.class]) return nil;- if (!isfinite(latitude.doubleValue) || fabs(latitude.doubleValue) > 90 ||- !isfinite(longitude.doubleValue) || fabs(longitude.doubleValue) > 180 ||- !isfinite(altitude.doubleValue) || !isfinite(horizontalAccuracy.doubleValue) ||- horizontalAccuracy.doubleValue < 0 || !isfinite(verticalAccuracy.doubleValue) ||- verticalAccuracy.doubleValue < 0 || !isfinite(speed.doubleValue) || !isfinite(course.doubleValue)) return nil;-- return [[CLLocation alloc] initWithCoordinate:CLLocationCoordinate2DMake(latitude.doubleValue, longitude.doubleValue)- altitude:altitude.doubleValue- horizontalAccuracy:horizontalAccuracy.doubleValue- verticalAccuracy:verticalAccuracy.doubleValue- course:course.doubleValue- speed:speed.doubleValue- timestamp:NSDate.date];-}--static BOOL vphoneAuthorized(CLLocationManager *manager) {- CLAuthorizationStatus status = manager.authorizationStatus;- return status == kCLAuthorizationStatusAuthorizedAlways || status == kCLAuthorizationStatusAuthorizedWhenInUse;-}--static void vphoneDeliver(CLLocationManager *manager) {- if (!vphoneAuthorized(manager)) return;- CLLocation *location = vphoneLocation();- id<CLLocationManagerDelegate> delegate = manager.delegate;- if (location && [delegate respondsToSelector:@selector(locationManager:didUpdateLocations:)])- [delegate locationManager:manager didUpdateLocations:@[location]];-}--@interface CLLocationManager (VPhoneLocation)-- (void)vphone_startUpdatingLocation;-- (void)vphone_stopUpdatingLocation;-- (void)vphone_requestLocation;-- (CLLocation *)vphone_location;-@end--@implementation CLLocationManager (VPhoneLocation)-- (void)vphone_startUpdatingLocation {- [self vphone_startUpdatingLocation];- dispatch_async(dispatch_get_main_queue(), ^{- NSTimer *timer = objc_getAssociatedObject(self, &VPhoneLocationTimerKey);- if (!timer) {- __weak CLLocationManager *weakManager = self;- timer = [NSTimer scheduledTimerWithTimeInterval:1 repeats:YES block:^(NSTimer *activeTimer) {- CLLocationManager *manager = weakManager;- if (manager) vphoneDeliver(manager);- else [activeTimer invalidate];- }];- objc_setAssociatedObject(self, &VPhoneLocationTimerKey, timer, OBJC_ASSOCIATION_RETAIN_NONATOMIC);- }- vphoneDeliver(self);- });-}--- (void)vphone_stopUpdatingLocation {- [self vphone_stopUpdatingLocation];- dispatch_async(dispatch_get_main_queue(), ^{- NSTimer *timer = objc_getAssociatedObject(self, &VPhoneLocationTimerKey);- [timer invalidate];- objc_setAssociatedObject(self, &VPhoneLocationTimerKey, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);- });-}--- (void)vphone_requestLocation {- if (!vphoneAuthorized(self) || !vphoneLocation()) {- [self vphone_requestLocation];- return;- }- dispatch_async(dispatch_get_main_queue(), ^{ vphoneDeliver(self); });-}--- (CLLocation *)vphone_location {- if (vphoneAuthorized(self)) {- CLLocation *location = vphoneLocation();- if (location) return location;- }- return [self vphone_location];-}-@end--static void vphoneSwizzle(SEL original, SEL replacement) {- Class manager = CLLocationManager.class;- Method originalMethod = class_getInstanceMethod(manager, original);- Method replacementMethod = class_getInstanceMethod(manager, replacement);- if (originalMethod && replacementMethod) method_exchangeImplementations(originalMethod, replacementMethod);-}--__attribute__((constructor)) static void vphoneInstallLocation(void) {- vphoneSwizzle(@selector(startUpdatingLocation), @selector(vphone_startUpdatingLocation));- vphoneSwizzle(@selector(stopUpdatingLocation), @selector(vphone_stopUpdatingLocation));- vphoneSwizzle(@selector(requestLocation), @selector(vphone_requestLocation));- vphoneSwizzle(@selector(location), @selector(vphone_location));-}diff --git a/VPhoneGuestComponents/Makefile b/VPhoneGuestComponents/Makefileindex e76fc1b8..eac21700 100644--- a/VPhoneGuestComponents/Makefile+++ b/VPhoneGuestComponents/Makefile@@ -28,8 +28,6 @@ CAMFIX_SOURCES := $(call find_sources,$(CAMFIX_DIRS))CAMFIX_INPUTS := $(call find_headers,CamFix $(VCAM_HEADER_DIRS)) \$(call find_folders,CamFix $(VCAM_HEADER_DIRS))CAMFIX_INCLUDE_FLAGS := $(addprefix -I,$(call find_folders,CamFix) $(VCAM_HEADER_DIRS))-LOCATIONFIX := $(STAGE)/locationfix/libvlocation.dylib-LOCATIONFIX_SOURCES := $(call find_sources,LocationFix)VCAMCAPTURED := $(STAGE)/vcamcaptured/libvcamcaptured.dylibVCAMCAPTURED_DIRS := VCamCaptured $(VCAM_SHARED_DIRS)VCAMCAPTURED_SOURCES := $(call find_sources,$(VCAMCAPTURED_DIRS))@@ -69,7 +67,7 @@ GPU_DYNAMIC_LOOKUP_SYMS := \-Wl,-U,_MTLMetalFunctionCreate \-Wl,-U,_MTLMetalLibInsertFunction \-Wl,-U,_MTLWriteMetalLibToMemoryBuffer-ARTIFACTS := $(CAMFIX) $(LOCATIONFIX) $(VCAMCAPTURED) $(LAUNCHHOOK) $(SYSTEMHOOK) $(GPU_PLUGIN)+ARTIFACTS := $(CAMFIX) $(VCAMCAPTURED) $(LAUNCHHOOK) $(SYSTEMHOOK) $(GPU_PLUGIN)PLISTS := $(STAGE)/camfix/libcamfix.plist $(STAGE)/vcamcaptured/libvcamcaptured.plistGPU_PROVENANCE := $(STAGE)/gpu/README.md@@ -83,7 +81,7 @@ gpu: $(GPU_PLUGIN)package: all@rm -f $(ARCHIVE)- @/usr/bin/tar -cf $(ARCHIVE) -C $(STAGE) camfix locationfix vcamcaptured launchhook systemhook gpu+ @/usr/bin/tar -cf $(ARCHIVE) -C $(STAGE) camfix vcamcaptured launchhook systemhook gpu@echo "Packaged $(ARCHIVE)"test-loader-links:@@ -103,7 +101,7 @@ test-vcam-dataplane:-framework CoreGraphics@$(OUT)/VCamDataPlaneTests-$(STAGE)/camfix $(STAGE)/locationfix $(STAGE)/vcamcaptured $(STAGE)/launchhook $(STAGE)/systemhook $(STAGE)/gpu:+$(STAGE)/camfix $(STAGE)/vcamcaptured $(STAGE)/launchhook $(STAGE)/systemhook $(STAGE)/gpu:@mkdir -p $@$(CAMFIX): $(CAMFIX_SOURCES) $(CAMFIX_INPUTS) | $(STAGE)/camfix@@ -115,13 +113,6 @@ $(CAMFIX): $(CAMFIX_SOURCES) $(CAMFIX_INPUTS) | $(STAGE)/camfix-framework CoreGraphics -framework QuartzCore@codesign --force --sign - $@-$(LOCATIONFIX): $(LOCATIONFIX_SOURCES) LocationFix | $(STAGE)/locationfix- $(CLANG) $(COMMON_FLAGS) -dynamiclib \- -install_name /usr/lib/libvlocation.dylib \- -o $@ $(LOCATIONFIX_SOURCES) \- -framework Foundation -framework CoreLocation- @codesign --force --sign - $@-$(VCAMCAPTURED): $(VCAMCAPTURED_SOURCES) $(VCAMCAPTURED_INPUTS) | $(STAGE)/vcamcaptured$(CLANG) $(COMMON_FLAGS) $(VCAMCAPTURED_INCLUDE_FLAGS) -dynamiclib \-install_name @rpath/libvcamcaptured.dylib \diff --git a/VPhoneGuestComponents/README.md b/VPhoneGuestComponents/README.mdindex 43432766..85875929 100644--- a/VPhoneGuestComponents/README.md+++ b/VPhoneGuestComponents/README.md@@ -8,14 +8,13 @@ tweak filter plists, and the GPU provenance note:| --- | --- || Camera app hook | `camfix/libcamfix.dylib`, `camfix/libcamfix.plist` || Camera daemon hook | `vcamcaptured/libvcamcaptured.dylib`, `vcamcaptured/libvcamcaptured.plist` |-| CoreLocation app hook | `locationfix/libvlocation.dylib` || Launchd hook | `launchhook/launchdhook-vphone.dylib` || Process injection bridge | `systemhook/SystemHook-vphone.dylib` || iOS 27 app registrar | `vpregister/vpregister` || PCC GPU driver | `gpu/README.md` (source and extraction flow; no Apple binary) |The archive is a local build artifact, not a VM bootstrap. `cfw install` places-the launchd hook, SystemHook, camera hooks, and location hook in `/usr/lib`, and the+the launchd hook, SystemHook, and camera hooks in `/usr/lib`, and thevphoned environment update replaces changed copies in a running guest. SystemHookloads `libvcamcaptured.dylib` into `/usr/libexec/cameracaptured` and`libcamfix.dylib` into apps that have AVFoundation loaded; neither camera hook@@ -30,11 +29,6 @@ ElleKit owns tweak selection and loading. It logs PID and executable path to`/var/mobile/Library/Caches/vphone-systemhook.log`, falling back to the app'sown `Library/Caches` when sandboxed.`DISABLE_TWEAKS=1` and the safe-mode flags skip injection.-SystemHook also loads `libvlocation.dylib` into newly started apps. When-`/var/mobile/Library/Caches/vphone-location.json` exists, the hook supplies its-coordinate through `CLLocationManager` for authorized clients. A missing state-file leaves native location in place. Apps already running when the library is-installed must be relaunched to load it.Irisin installs ElleKit's own `TweakLoader.dylib` in the selected bootstrap.The required GPU bundle is extracted from the selected PCC firmware by`vphone-cli fw prepare` and copied into the VM during JB installation. Nodiff --git a/VPhoneGuestComponents/SystemHook/SystemHook-vphone.c b/VPhoneGuestComponents/SystemHook/SystemHook-vphone.cindex cf30ae11..14f4d5fc 100644--- a/VPhoneGuestComponents/SystemHook/SystemHook-vphone.c+++ b/VPhoneGuestComponents/SystemHook/SystemHook-vphone.c@@ -139,7 +139,6 @@ static int vpExecve(const char *path, char *const argv[], char *const envp[]) {// They need no tweak loader: each installs its own Objective-C hooks.#define VP_CAMERA_DAEMON_HOOK "/usr/lib/libvcamcaptured.dylib"#define VP_CAMERA_APP_HOOK "/usr/lib/libcamfix.dylib"-#define VP_LOCATION_APP_HOOK "/usr/lib/libvlocation.dylib"#define VP_AVFOUNDATION "/System/Library/Frameworks/AVFoundation.framework/AVFoundation"// A missing library is expected and stays quiet; anything else is logged.@@ -196,8 +195,6 @@ __attribute__((constructor)) static void vpLogProcess(void) {}if (!vpInBootstrap && !vpIsAppPath(path))return;- if (vpIsAppPath(path))- vpLoadLibrary("location-hook", VP_LOCATION_APP_HOOK);if (vpIsAppPath(path) && dlopen(VP_AVFOUNDATION, RTLD_LAZY | RTLD_NOLOAD))vpLoadLibrary("camera-hook", VP_CAMERA_APP_HOOK);const char *root = getenv("VPHONE_JB_ROOT");diff --git a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swiftindex 9a6ac85c..bb7d9044 100644--- a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swift+++ b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swift@@ -11,6 +11,5 @@ public enum VPhoneGuestEnvironment {"SystemHook-vphone.dylib","libvcamcaptured.dylib","libcamfix.dylib",- "libvlocation.dylib",]}