Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

chore: moved to xcode project

Lakrea082eb027ac
diff --git a/Package.swift b/Package.swift
deleted file mode 100644
index c72635a6..00000000
--- a/Package.swift
+++ /dev/null
@@ -1,334 +0,0 @@
-// swift-tools-version:6.0
-
-import PackageDescription
-
-let package = Package(
- name: "vphone-cli",
- platforms: [
- .macOS(.v15),
- ],
- products: [
- .library(name: "VPhoneAPIKit", targets: ["VPhoneAPIKit"]),
- .library(name: "VPhoneVirtualMachineKit", targets: ["VPhoneVirtualMachineKit"]),
- ],
- // Resolved by SwiftPM, not carried as submodules. Every one of these was a
- // `.package(path: "vendor/…")` over a checkout this repository pinned by
- // commit, which meant a `git submodule update` before any build and a tree
- // that could sit at an unreleased commit — MachOKit was four commits past
- // 0.46.1, Dynamic two past 1.2.0. A URL and a version says the same thing
- // in one line, and `Package.resolved` records exactly what was built.
- dependencies: [
- .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.8.2"),
- .package(url: "https://github.com/mhdhejazi/Dynamic.git", from: "1.2.0"),
- // Was the one that could not be a version, because its CoreCapstone
- // target carried `.unsafeFlags(["-Wno-shorten-64-to-32"])` and SwiftPM
- // refuses unsafe flags in a dependency resolved by version. 0.1.3
- // writes the same flag through `CSetting.disableWarning`, which is not
- // unsafe, so this is `from:` like the rest and `Package.resolved`
- // records a version rather than whatever `main` pointed at that day.
- // Start at 0.1.3 and not lower: 0.1.1 and 0.1.2 tag a commit that is
- // not an ancestor of `main` and does not carry the fix.
- .package(url: "https://github.com/Lakr233/libcapstone-spm.git", from: "0.1.3"),
- .package(url: "https://github.com/Lakr233/libimg4-spm.git", from: "0.1.1"),
- .package(url: "https://github.com/Lakr233/libarchive.xcframework.git", from: "0.1.1"),
- .package(url: "https://github.com/p-x9/MachOKit.git", from: "0.52.2"),
- // libimobiledevice, its glue, libplist, libusbmuxd, libtatsu and
- // OpenSSL, as prebuilt xcframeworks. This is what replaces
- // pymobiledevice3: the restore backend's whole dependency stack
- // arrives through SwiftPM instead of a pip install into a venv, and
- // the C targets below include its headers directly.
- .package(url: "https://github.com/Lakr233/AppleMobileDeviceLibrary.git", from: "1.0.1790070576"),
- // 2.84+ links libswiftCompatibilitySpan when built with Swift 6.4.
- // 2.83 keeps the guest binary self-contained on older iOS bases.
- .package(url: "https://github.com/apple/swift-nio.git", exact: "2.83.0"),
- ],
- targets: [
- .target(name: "VPhoneAPIKit", path: "Sources/VPhoneAPIKit"),
- .target(
- name: "FirmwarePatcher",
- dependencies: [
- .product(name: "Capstone", package: "libcapstone-spm"),
- .product(name: "Img4tool", package: "libimg4-spm"),
- .product(name: "MachOKit", package: "MachOKit"),
- // The cryptex patcher re-signs what it rewrites. That used to be
- // three `runProcess("/opt/homebrew/bin/ldid", …)` calls, which is
- // the one thing in this package that made `Scripts/check_aux.sh` fail.
- "VPhoneSign",
- // And it unpacks three archives onto the volume it is building,
- // which were the last three `runProcess("/usr/bin/tar", …)` calls
- // anywhere in the package.
- "VPhoneArchive",
- "VPhoneCore",
- ],
- path: "Sources/FirmwarePatcher",
- ),
- .target(
- name: "VPhoneCore",
- dependencies: [
- .product(name: "ArgumentParser", package: "swift-argument-parser"),
- ],
- path: "Sources/VPhoneCore",
- linkerSettings: [
- .linkedFramework("Virtualization"),
- ],
- ),
- // Archive reading and writing: the one place that knows how ownership,
- // permissions and path safety differ between unpacking onto a mounted
- // guest volume and unpacking into a host temp directory. Replaces
- // gtar, bsdtar, unzip and zstd, which between them were four external
- // programs and, for anything .zst, a Homebrew install.
- .target(
- name: "VPhoneArchive",
- dependencies: [
- .product(name: "LibArchive", package: "libarchive.xcframework"),
- "VPhoneCore",
- ],
- path: "Sources/VPhoneArchive",
- ),
- // Ad-hoc and PKCS#12 Mach-O code signing, byte for byte what ldid
- // writes. It replaces ldid, which is the only program this project
- // shipped that links Homebrew (libcrypto.3, libplist-2.0.4) and so
- // the only one that failed `Scripts/check_aux.sh`. Nothing here is outside
- // the system frameworks: CryptoKit for the hashes, Security for the
- // PKCS#12 and the CMS.
- .target(
- name: "VPhoneSign",
- path: "Sources/VPhoneSign",
- linkerSettings: [
- .linkedFramework("Security"),
- ],
- ),
- // libirecovery 1.3.1, vendored. It talks to iBoot/iBSS over USB, which
- // is the half of a restore that `idevicerestore` does not get from
- // libimobiledevice, and it is not in AppleMobileDeviceLibrary. Upstream
- // ships it as an autotools project, so the only things here that are
- // not upstream's own bytes are config.h — which says what `./configure`
- // would have concluded on macOS — and this stanza.
- //
- // The backend is IOKit, not libusb: on a host whose SDK has
- // IOKit/usb/IOUSBLib.h, upstream's configure.ac picks IOKit and never
- // looks for libusb. That is deliberate here too, because a libusb
- // backend would mean a Homebrew dylib in the link, and `Scripts/check_aux.sh`
- // exists to keep those out.
- .target(
- name: "MobileRecoveryCore",
- dependencies: [
- // libplist, libimobiledevice-glue (collection.h, thread.h) and
- // libusbmuxd, as prebuilt xcframeworks.
- .product(name: "AppleMobileDeviceLibrary", package: "AppleMobileDeviceLibrary"),
- ],
- path: "Sources/MobileRecoveryCore",
- // Upstream's LGPL-2.1 text. It ships with the source; it does not
- // compile, so SwiftPM has to be told it is not an input.
- exclude: ["COPYING"],
- publicHeadersPath: "Include",
- cSettings: [
- // config.h sits beside libirecovery.c rather than in Include/,
- // so it stays out of the module's umbrella and no dependent
- // ever sees a PACKAGE_VERSION it did not ask for.
- .headerSearchPath("."),
- .define("HAVE_CONFIG_H", to: "1"),
- // Upstream's `--enable-static --disable-shared` case, which is
- // what a SwiftPM target is: IRECV_API collapses to nothing
- // instead of a dllexport or a visibility attribute.
- .define("IRECV_STATIC", to: "1"),
- ],
- linkerSettings: [
- .linkedFramework("IOKit"),
- .linkedFramework("CoreFoundation"),
- ],
- ),
- // idevicerestore, vendored. This is the restore backend itself — the
- // thing scripts/pymobiledevice3_bridge.py has been standing in for,
- // and the last reason this repository has a venv. Upstream is a
- // program; here it is a library, built with IDEVICERESTORE_NOMAIN so
- // its main(), getopt table and signal handling are excluded, and
- // driven through Sources/MobileRestoreCore/Include/vphone_restore_bridge.h.
- //
- // Two files in this target are not upstream's and both say so at the
- // top: config.h, which is what ./configure would have written, and the
- // libzip stub. libzip is the one PKG_CHECK_MODULES dependency with no
- // counterpart here, and linking Homebrew's copy would put an absolute
- // path in the closure that `Scripts/check_aux.sh` gate 1 rejects. It is only
- // reachable when reading a .ipsw archive or re-signing a .bbfw, and
- // this project restores from an extracted directory onto a device with
- // no baseband — zip.h has the full argument.
- .target(
- name: "MobileRestoreCore",
- dependencies: [
- // <libirecovery.h>: DFU and recovery over USB.
- "MobileRecoveryCore",
- // libimobiledevice, its glue, libplist, libusbmuxd, libtatsu.
- .product(name: "AppleMobileDeviceLibrary", package: "AppleMobileDeviceLibrary"),
- ],
- path: "Sources/MobileRestoreCore",
- // Upstream's LGPL-2.1 text, which ships with the source and does
- // not compile.
- exclude: ["COPYING"],
- publicHeadersPath: "Include",
- cSettings: [
- // Reaches config.h and the libzip stub, both of which sit
- // beside the .c files rather than in Include/ — Include/ is
- // the generated module's umbrella, and neither a second
- // PACKAGE_VERSION nor a fake <zip.h> belongs in a header a
- // dependent imports. Include/ holds the bridge header alone.
- .headerSearchPath("."),
- .define("HAVE_CONFIG_H", to: "1"),
- .define("IRECV_STATIC", to: "1"),
- ],
- linkerSettings: [
- // Both from /usr/lib: libcurl.4.dylib for the TSS request and
- // the firmware download, libz.1.dylib for the gzipped .shsh
- // and the compressed BuildManifest members. These two are on
- // check_aux.sh's system whitelist; nothing else is linked.
- .linkedLibrary("curl"),
- .linkedLibrary("z"),
- ],
- ),
- // The Swift face of the two C targets above, and what actually
- // replaces scripts/pymobiledevice3_bridge.py: probe for a DFU/recovery
- // endpoint, fetch a SHSH blob, drive a restore. Three of the Python's
- // four commands — `usbmux-list` had no call site anywhere in this
- // repository and is not ported.
- //
- // It links libz because it has to undo one thing idevicerestore does:
- // `-t/--shsh` writes a GZIPPED binary plist, and the `.shsh` this
- // project has always written beside a VM is a plain one. /usr/lib/
- // libz.1.dylib is on check_aux.sh's system whitelist.
- .target(
- name: "VPhoneRestore",
- dependencies: [
- "MobileRecoveryCore",
- "MobileRestoreCore",
- ],
- path: "Sources/VPhoneRestore",
- linkerSettings: [
- .linkedLibrary("z"),
- ],
- ),
- // Everything that touches a running guest: the machine, its window and
- // menus, the vsock channel and the host device bridges. It is a library
- // so the only executable holding the private virtualization
- // entitlements can stay as small as an argument parse and an
- // NSApplication run loop.
- .target(
- name: "VPhoneVirtualMachineKit",
- dependencies: [
- .product(name: "Dynamic", package: "Dynamic"),
- .product(name: "NIOCore", package: "swift-nio"),
- .product(name: "NIOPosix", package: "swift-nio"),
- "VPhoneCore",
- ],
- path: "Sources/VPhoneVirtualMachineKit",
- linkerSettings: [
- .linkedFramework("Virtualization"),
- .linkedFramework("AppKit"),
- .linkedFramework("SwiftUI"),
- .linkedFramework("CoreLocation"),
- .linkedFramework("AVFoundation"),
- ],
- ),
- // The only binary signed with Sources/vphone.entitlements.
- .executableTarget(
- name: "vphone-vm",
- dependencies: [
- .product(name: "ArgumentParser", package: "swift-argument-parser"),
- "VPhoneCore",
- "VPhoneVirtualMachineKit",
- ],
- path: "Sources/VPhoneVM",
- // Swift 6.4 may autolink compatibility dylibs for generic code in
- // dependencies even when this executable has no symbol references.
- // Strip those unused load commands so the shipped app remains
- // independent of the build machine's Swift toolchain.
- linkerSettings: [.unsafeFlags(["-Xlinker", "-dead_strip_dylibs"])],
- ),
- // The user-facing entry point. Note it depends on neither VPhoneVirtualMachineKit
- // nor any of the five frameworks above: it never builds a machine, it
- // starts vphone-vm. Adding a dependency on the kit here would quietly
- // undo the split, so don't. VPhoneArchive is fine and is why `vm export`
- // still works here: it sits above VPhoneCore and pulls in neither
- // Virtualization nor AppKit.
- //
- // VPhoneRestore is the line that ends the venv: `restore` and
- // `vm create` reach it directly instead of spawning a Python.
- // It is also what finally puts libirecovery, idevicerestore, libcurl
- // and libz inside .build/vphone-cli.app, where `Scripts/check_aux.sh` gate 1
- // can see them.
- .executableTarget(
- name: "vphone-cli",
- dependencies: [
- .product(name: "ArgumentParser", package: "swift-argument-parser"),
- "FirmwarePatcher",
- "VPhoneArchive",
- "VPhoneCore",
- "VPhoneRestore",
- ],
- path: "Sources/VPhoneCLI",
- ),
- .executableTarget(
- name: "vphone-archive",
- dependencies: [
- .product(name: "ArgumentParser", package: "swift-argument-parser"),
- "VPhoneArchive",
- "VPhoneCore",
- ],
- path: "Sources/VPhoneArchiveCLI",
- ),
- // The SUDO_ASKPASS program, and the probe behind `VPhoneSudo.route()`.
- // No ArgumentParser and no VPhoneCore: it is two verbs, it runs while
- // sudo waits on its stdout, and `VPhoneSudo` in VPhoneCore shells out
- // to it rather than linking it — a dependency the other way round would
- // put AppKit under vphone-cli.
- .executableTarget(
- name: "vphone-ask-for-permission",
- path: "Sources/VPhoneAskForPermission",
- ),
- // `vphone-amfi-allow` is NOT here, and cannot be: SwiftPM emits arm64
- // and it has to be arm64e to read amfid's ObjC runtime. `Scripts/build.sh`
- // compiles it with clang; see the header of its one C file.
- //
- // A `vphone-letmein` target stood here too: a C program that wrote
- // amfid's __TEXT to open a short window for vphone-vm. It cannot work on
- // a host where `vm.cs_system_enforcement` is 1 — the dirtied page is
- // exactly what gets amfid SIGKILLed. `vphone-amfi-allow` replaces it by
- // writing one byte of amfid's *heap* instead, which that sysctl does not
- // police. See "SIP/AMFI Relaxation" in README.md.
- .testTarget(
- name: "FirmwarePatcherTests",
- dependencies: ["FirmwarePatcher"],
- path: "Tests/FirmwarePatcherTests",
- exclude: ["Fixtures"],
- ),
- .testTarget(
- name: "VPhoneCoreTests",
- dependencies: ["VPhoneCore"],
- path: "Tests/VPhoneCoreTests",
- ),
- .testTarget(
- name: "VPhoneArchiveTests",
- dependencies: ["VPhoneArchive"],
- path: "Tests/VPhoneArchiveTests",
- ),
- .testTarget(
- name: "VPhoneSignTests",
- dependencies: ["VPhoneSign"],
- path: "Tests/VPhoneSignTests",
- // Mach-O files to sign and the C they were built from. Excluded
- // rather than declared as resources: the tests reach them through
- // `#filePath`, so they need to be on disk and not in a bundle,
- // and left in place SwiftPM would try to compile the .c and refuse
- // the target for mixing languages.
- exclude: ["Fixtures"],
- ),
- // Everything here runs without a device attached: argument parsing,
- // the restore-tree rules, the .shsh naming and the C struct the
- // options turn into. What needs a phone in DFU is not tested, and
- // saying so is better than a test that only looks like one.
- .testTarget(
- name: "VPhoneRestoreTests",
- dependencies: ["VPhoneRestore"],
- path: "Tests/VPhoneRestoreTests",
- ),
- ],
-)
diff --git a/Scripts/VPhoned/Daemon/IcliCommand.swift b/Scripts/VPhoned/Daemon/IcliCommand.swift
deleted file mode 100644
index 1c517808..00000000
--- a/Scripts/VPhoned/Daemon/IcliCommand.swift
+++ /dev/null
@@ -1,115 +0,0 @@
-import Darwin
-import Foundation
-
-/// Invokes the pinned guest icli binary with an argument vector, never a shell.
-/// The caller explicitly opted into the host API via --api-listen.
-enum IcliCommand {
- static let queue = DispatchQueue(label: "vphoned.icli.commands", qos: .userInitiated)
-
- static func execute(_ params: [String: Any]) throws -> [String: Any] {
- guard let arguments = params["argv"] as? [String], !arguments.isEmpty,
- arguments.count <= 64,
- arguments.allSatisfy({ !$0.contains("\0") && $0.utf8.count <= 4096 })
- else { throw GuestAPIError.invalidRequest("argv must be 1–64 command arguments") }
- guard FileManager.default.isExecutableFile(atPath: "/usr/bin/icli") else {
- throw GuestAPIError.operationFailed("icli is not installed in this guest image")
- }
- let input: Data
- if let encoded = params["stdin_base64"] as? String {
- guard let decoded = Data(base64Encoded: encoded) else {
- throw GuestAPIError.invalidRequest("stdin_base64 is invalid")
- }
- input = decoded
- } else {
- input = Data((params["stdin"] as? String ?? "").utf8)
- }
- guard input.count <= 1 << 20 else {
- throw GuestAPIError.invalidRequest("stdin exceeds 1 MiB")
- }
-
- let directory = FileManager.default.temporaryDirectory
- .appendingPathComponent("vphoned-icli-" + UUID().uuidString, isDirectory: true)
- try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: false)
- defer { try? FileManager.default.removeItem(at: directory) }
- let inputURL = directory.appendingPathComponent("stdin")
- let outputURL = directory.appendingPathComponent("stdout")
- let errorURL = directory.appendingPathComponent("stderr")
- try input.write(to: inputURL)
- let stdinFD = open(inputURL.path, O_RDONLY | O_NOFOLLOW)
- let stdoutFD = open(outputURL.path, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, 0o600)
- let stderrFD = open(errorURL.path, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, 0o600)
- guard stdinFD >= 0, stdoutFD >= 0, stderrFD >= 0 else {
- if stdinFD >= 0 {
- close(stdinFD)
- }
- if stdoutFD >= 0 {
- close(stdoutFD)
- }
- if stderrFD >= 0 {
- close(stderrFD)
- }
- throw GuestAPIError.operationFailed("Could not prepare icli output")
- }
- defer { close(stdinFD); close(stdoutFD); close(stderrFD) }
-
- var actions: posix_spawn_file_actions_t? = nil
- posix_spawn_file_actions_init(&actions)
- defer { posix_spawn_file_actions_destroy(&actions) }
- posix_spawn_file_actions_adddup2(&actions, stdinFD, STDIN_FILENO)
- posix_spawn_file_actions_adddup2(&actions, stdoutFD, STDOUT_FILENO)
- posix_spawn_file_actions_adddup2(&actions, stderrFD, STDERR_FILENO)
- var argv = (["/usr/bin/icli"] + arguments).map { strdup($0) as UnsafeMutablePointer<CChar>? }
- argv.append(nil)
- defer { for item in argv {
- if let value = item {
- free(value)
- }
- } }
- var pid: pid_t = 0
- let spawnStatus = argv.withUnsafeMutableBufferPointer { pointer in
- posix_spawn(&pid, "/usr/bin/icli", &actions, nil, pointer.baseAddress, environ)
- }
- guard spawnStatus == 0 else {
- throw GuestAPIError.operationFailed("Could not launch icli (errno \(spawnStatus))")
- }
-
- let deadline = ProcessInfo.processInfo.systemUptime + 120
- var status: Int32 = 0
- while true {
- let waited = waitpid(pid, &status, WNOHANG)
- if waited == pid {
- break
- }
- if waited < 0 {
- if errno == EINTR {
- continue
- }
- kill(pid, SIGKILL)
- _ = waitpid(pid, &status, 0)
- throw GuestAPIError.operationFailed("Could not wait for icli")
- }
- if ProcessInfo.processInfo.systemUptime >= deadline {
- kill(pid, SIGKILL)
- _ = waitpid(pid, &status, 0)
- throw GuestAPIError.operationFailed("icli timed out after 120 seconds")
- }
- Thread.sleep(forTimeInterval: 0.05)
- }
- let stdoutSize = try FileManager.default.attributesOfItem(atPath: outputURL.path)[.size] as? NSNumber
- let stderrSize = try FileManager.default.attributesOfItem(atPath: errorURL.path)[.size] as? NSNumber
- guard (stdoutSize?.int64Value ?? 0) <= 64 << 20,
- (stderrSize?.int64Value ?? 0) <= 1 << 20
- else {
- throw GuestAPIError.operationFailed("icli output exceeded the API limit")
- }
- let stdout = try Data(contentsOf: outputURL, options: .mappedIfSafe)
- let stderr = try Data(contentsOf: errorURL, options: .mappedIfSafe)
- let parsed = try? JSONSerialization.jsonObject(with: stdout, options: [.fragmentsAllowed])
- let code = (status & 0x7F) == 0 ? Int((status >> 8) & 0xFF) : -Int(status & 0x7F)
- return [
- "exit_code": code,
- "output": parsed ?? String(decoding: stdout, as: UTF8.self),
- "stderr": String(decoding: stderr, as: UTF8.self),
- ]
- }
-}
diff --git a/Scripts/VPhoned/Package.swift b/Scripts/VPhoned/Package.swift
deleted file mode 100644
index 8c1ccce0..00000000
--- a/Scripts/VPhoned/Package.swift
+++ /dev/null
@@ -1,50 +0,0 @@
-// swift-tools-version:6.0
-import Foundation
-import PackageDescription
-
-let directory = URL(fileURLWithPath: #filePath).deletingLastPathComponent()
-let nativeSources = ["unarchive.m", "vphoned_install.m", "vphoned_keychain.m", "vphoned_vcam.m", "vphoned_native.m"]
-let gitHash = ProcessInfo.processInfo.environment["GIT_HASH"] ?? "unknown"
-
-let package = Package(
- name: "vphoned",
- platforms: [.iOS(.v15)],
- dependencies: [
- .package(url: "https://github.com/owngoal-dev/icli.git", exact: "0.6.1"),
- .package(url: "https://github.com/apple/swift-nio.git", exact: "2.83.0"),
- ],
- targets: [
- .target(
- name: "VphonedNative",
- path: ".",
- sources: nativeSources,
- publicHeadersPath: "Include",
- cSettings: [
- .headerSearchPath("."),
- .headerSearchPath("Vendor/LibArchive"),
- .define("VPHONED_BUILD_HASH", to: "\"\(gitHash)\""),
- .unsafeFlags(["-fobjc-arc"]),
- ],
- linkerSettings: [
- .linkedLibrary("archive"),
- .linkedLibrary("sqlite3"),
- .linkedFramework("Foundation"),
- .linkedFramework("Security"),
- .linkedFramework("CoreServices"),
- ],
- ),
- .executableTarget(
- name: "vphoned",
- dependencies: [
- "VphonedNative",
- .product(name: "IcliKit", package: "icli"),
- .product(name: "NIOCore", package: "swift-nio"),
- .product(name: "NIOHTTP1", package: "swift-nio"),
- .product(name: "NIOPosix", package: "swift-nio"),
- .product(name: "NIOWebSocket", package: "swift-nio"),
- ],
- path: "Daemon",
- linkerSettings: [.unsafeFlags(["-Xlinker", "-dead_strip_dylibs"])],
- ),
- ],
-)
diff --git a/Scripts/build.sh b/Scripts/build.sh
deleted file mode 100755
index a1fbf590..00000000
--- a/Scripts/build.sh
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/bin/zsh
-# vphone-tier: build
-# build.sh — Build, sign, and bundle vphone-cli and its guest binaries.
-#
-# This is the bootstrap step that a running binary cannot do for itself:
-# it compiles the vphone-cli binary, signs it with the PV=3 entitlements,
-# wraps it in the .app bundle used for GUI boot, and cross-compiles + signs
-# vphoned and icli. Everything else in the project is driven by the
-# resulting `vphone-cli` binary — this script is the only build entrypoint.
-#
-# Usage:
-# ./Scripts/build.sh # build + sign + bundle + guest binaries
-set -euo pipefail
-
-SCRIPT_DIR="${0:A:h}"
-PROJECT_ROOT="${SCRIPT_DIR:h}"
-cd "$PROJECT_ROOT"
-
-# Five host binaries, and only ONE of them is entitled. vphone-cli is the
-# user-facing entry point and carries nothing, so it always launches; vphone-vm
-# holds the private virtualization keys and is what amfid can refuse;
-# vphone-archive unpacks and packs without gtar, bsdtar, unzip or zstd;
-# vphone-ask-for-permission is the SUDO_ASKPASS helper; vphone-amfi-allow is
-# what gets vphone-vm past amfid.
-#
-# The host setup guide shows how to run the helper for both signed vphone-vm
-# copies. It is a per-build step because their cdhashes change when signed.
-BINARY=".build/release/vphone-cli"
-VM_BINARY=".build/release/vphone-vm"
-ARCHIVE_BINARY=".build/release/vphone-archive"
-ASKPASS_BINARY=".build/release/vphone-ask-for-permission"
-# Not built by `swift build`: SwiftPM emits arm64 and this one has to be arm64e
-# to walk amfid's ObjC runtime. See the header of its C file.
-AMFI_BINARY=".build/release/vphone-amfi-allow"
-AMFI_SOURCE="Sources/VPhoneAMFIAllow/vphone-amfi-allow.c"
-BUNDLE=".build/vphone-cli.app"
-BUNDLE_BIN="${BUNDLE}/Contents/MacOS/vphone-cli"
-BUNDLE_VM="${BUNDLE}/Contents/MacOS/vphone-vm"
-BUNDLE_ARCHIVE="${BUNDLE}/Contents/MacOS/vphone-archive"
-BUNDLE_ASKPASS="${BUNDLE}/Contents/MacOS/vphone-ask-for-permission"
-BUNDLE_AMFI="${BUNDLE}/Contents/MacOS/vphone-amfi-allow"
-INFO_PLIST="Sources/Info.plist"
-ENTITLEMENTS="Sources/vphone.entitlements"
-GIT_HASH="$(git rev-parse --verify --short HEAD 2>/dev/null || echo unknown)"
-
-for arg in "$@"; do
- case "$arg" in
- -h|--help) echo "Usage: $0"; exit 0 ;;
- *) echo "Unknown option: $arg" >&2; exit 1 ;;
- esac
-done
-
-# --- Build + sign the binary ---
-echo "=== Building vphone-cli (${GIT_HASH}) ==="
-swift build -c release --jobs "${SWIFT_JOBS:-4}"
-
-# vphone-amfi-allow, which SwiftPM cannot produce: it reads amfid's ObjC runtime
-# and so must match amfid's own slice, which is arm64e. Plain clang, two system
-# frameworks, no Xcode.app and nothing on PATH beyond the toolchain that just
-# built everything else.
-echo "=== Building vphone-amfi-allow (arm64e) ==="
-clang -arch arm64e -O2 \
- -framework CoreFoundation -framework Security \
- -o "$AMFI_BINARY" "$AMFI_SOURCE"
-# An arm64 build would compile and link and then fail at run time with nothing
-# to say, because task_for_pid on an arm64e amfid from an arm64 tool cannot read
-# the pointer-authenticated slot it is looking for. Assert the slice.
-if ! file "$AMFI_BINARY" | grep -q arm64e; then
- echo "Error: ${AMFI_BINARY} is not arm64e." >&2
- exit 1
-fi
-
-# Only vphone-vm gets the entitlements. Signing vphone-cli with them too would
-# put us straight back where we started: the entry point itself unable to
-# launch without an AMFI bypass already in place.
-echo "=== Signing ==="
-codesign --force --sign - --entitlements "$ENTITLEMENTS" "$VM_BINARY"
-codesign --force --sign - "$BINARY"
-codesign --force --sign - "$ARCHIVE_BINARY"
-codesign --force --sign - "$ASKPASS_BINARY"
-codesign --force --sign - "$AMFI_BINARY"
-echo " signed: vphone-vm (entitled), vphone-cli, vphone-archive,"
-echo " vphone-ask-for-permission, vphone-amfi-allow"
-
-# An unentitled vphone-vm is worse than a broken one: it launches perfectly,
-# which convinces vphone-cli's AMFI probe that nothing is wrong, and only fails
-# later when it tries to create a PV=3 machine. A bare `swift build` leaves
-# exactly that state behind. Catch it at the source.
-if ! codesign -d --entitlements - --xml "$VM_BINARY" 2>/dev/null \
- | grep -q 'com.apple.private.virtualization'; then
- echo "Error: ${VM_BINARY} is not entitled after signing." >&2
- echo " It would still launch, and would still fail to create a VM." >&2
- exit 1
-fi
-
-# --- Bundle (.app used for GUI boot) ---
-# The .app is never opened through Launch Services — every caller runs a binary
-# inside it directly. It exists so the process that becomes an NSApplication
-# has a bundle: icon, LSUIElement, and the location usage strings. That process
-# is vphone-vm, which is why it, and not vphone-cli, is CFBundleExecutable.
-echo "=== Bundling ${BUNDLE} ==="
-mkdir -p "${BUNDLE}/Contents/MacOS" "${BUNDLE}/Contents/Resources"
-cp -f "$BINARY" "$BUNDLE_BIN"
-cp -f "$VM_BINARY" "$BUNDLE_VM"
-cp -f "$ARCHIVE_BINARY" "$BUNDLE_ARCHIVE"
-cp -f "$ASKPASS_BINARY" "$BUNDLE_ASKPASS"
-cp -f "$AMFI_BINARY" "$BUNDLE_AMFI"
-cp -f "$INFO_PLIST" "${BUNDLE}/Contents/Info.plist"
-if [[ "$GIT_HASH" != unknown ]]; then
- /usr/libexec/PlistBuddy -c "Add :VPhoneBuildHash string ${GIT_HASH}" "${BUNDLE}/Contents/Info.plist"
-fi
-cp -f "Sources/AppIcon.icns" "${BUNDLE}/Contents/Resources/AppIcon.icns"
-rm -f "${BUNDLE}/Contents/Resources/signcert.p12"
-# The bundle is built over whatever is already there, so these two are removed
-# although nothing copies either one any more: bundles built before VPhoneSign
-# replaced ldid carry the Homebrew ldid, the only thing in here linking
-# libcrypto.3 and libplist-2.0.4 and so the only thing failing gate 1; bundles
-# built before the AMFI bypass became the user's own business carry
-# vphone-letmein, which patched amfid's __TEXT — a write the kernel kills amfid
-# for wherever vm.cs_system_enforcement is 1. Both have to go before the seal
-# below, not after — removing nested code from a sealed bundle is what makes
-# `codesign -v` report it as modified.
-rm -f "${BUNDLE}/Contents/MacOS/ldid" "${BUNDLE}/Contents/MacOS/vphone-letmein"
-# Order matters: vphone-vm is CFBundleExecutable, so signing it seals the whole
-# bundle, and everything beside it in Contents/MacOS counts as nested code.
-# Sign the nested binaries FIRST or the seal captures them in an earlier state
-# and `codesign -v` on the bundle reports "nested code is modified or invalid".
-codesign --force --sign - "$BUNDLE_BIN"
-codesign --force --sign - "$BUNDLE_ARCHIVE"
-codesign --force --sign - "$BUNDLE_ASKPASS"
-codesign --force --sign - "$BUNDLE_AMFI"
-codesign --force --sign - --entitlements "$ENTITLEMENTS" "$BUNDLE_VM"
-echo " bundled → ${BUNDLE}"
-
-# --- Guest binaries (cross-compiled for iOS) ---
-# Build vphoned and its icli dependency here so a distributed app can install
-# CFW without Xcode or an iPhoneOS SDK on the destination host.
-IOS_SDK="$(xcrun --sdk iphoneos --show-sdk-path)" \
- || { echo "Error: iPhoneOS SDK is required on the build machine" >&2; exit 1; }
-mkdir -p .build/guest
-echo "=== Building vphoned (arm64, iphoneos) ==="
-GIT_HASH="$GIT_HASH" swift build --package-path Scripts/VPhoned \
- --scratch-path .build/vphoned-swiftpm --triple arm64-apple-ios15.0 \
- --sdk "$IOS_SDK" -c release --product vphoned \
- --jobs "${SWIFT_JOBS:-4}"
-GUEST_BIN_DIR="$(swift build --package-path Scripts/VPhoned \
- --scratch-path .build/vphoned-swiftpm --triple arm64-apple-ios15.0 \
- --sdk "$IOS_SDK" -c release --show-bin-path)"
-cp -f "$GUEST_BIN_DIR/vphoned" .build/guest/vphoned
-
-echo "=== Building icli (arm64, iphoneos) ==="
-ICLI_PACKAGE=".build/vphoned-swiftpm/checkouts/icli"
-swift build --package-path "$ICLI_PACKAGE" \
- --scratch-path .build/icli-guest-swiftpm --triple arm64-apple-ios15.0 \
- --sdk "$IOS_SDK" -c release --product icli \
- --jobs "${SWIFT_JOBS:-4}"
-ICLI_BIN_DIR="$(swift build --package-path "$ICLI_PACKAGE" \
- --scratch-path .build/icli-guest-swiftpm --triple arm64-apple-ios15.0 \
- --sdk "$IOS_SDK" -c release --show-bin-path)"
-cp -f "$ICLI_BIN_DIR/icli" .build/guest/icli
-# vphoned.signed is the copy the host pushes into a running guest over vsock.
-echo "=== Signing vphoned ==="
-cp .build/guest/vphoned .build/vphoned
-"$BINARY" sign \
- --entitlements Scripts/VPhoned/entitlements.plist --merge \
- .build/vphoned
-cp .build/vphoned .build/vphoned.signed
-echo " signed → .build/vphoned.signed"
-
-# The restored PCC System volume supplies the GPU driver but cloudOS 26.4
-# omits the compiler plugin needed by MTLCompilerService. Build our guest
-# implementation and ship it compressed for fw prepare to merge.
-echo "=== Building PCC GPU compiler plugin (arm64e, iphoneos) ==="
-make -C Siblings gpu
-GPU_PLUGIN=".build/siblings/stage/gpu/libAppleParavirtCompilerPluginIOGPUFamily.dylib"
-if ! file "$GPU_PLUGIN" | grep -q arm64e; then
- echo "Error: ${GPU_PLUGIN} is not arm64e." >&2
- exit 1
-fi
-codesign -v "$GPU_PLUGIN"
-mkdir -p .build/guest/gpu-plugin-archive
-cp -f "$GPU_PLUGIN" .build/guest/gpu-plugin-archive/
-"$ARCHIVE_BINARY" create --file .build/guest/gpu-compiler-plugin.tar.zst \
- --directory .build/guest/gpu-plugin-archive --zstd
-
-# --- Bundle the standalone runtime mini-repo into Contents/Resources ---
-RES="${BUNDLE}/Contents/Resources"
-echo "=== Bundling runtime assets → ${RES} ==="
-# The bundle is built over whatever is already there, so ${RES}/tools and
-# ${RES}/requirements.txt are still removed although nothing creates either any
-# more: bundles built before `cfw flip-snapshot` replaced the snapshot-rename
-# script carry an empty tools/, and bundles built before the restore backend
-# moved in-process carry a pip requirements list the app would never read.
-# The bundle is built over whatever is already there, so these are removed
-# although nothing creates any of them any more. ${RES}/tools and
-# requirements.txt date from the Python restore bridge. ${RES}/.tools held a
-# Homebrew-linked `trustcache` that nothing ever invoked — it was the only file
-# in the bundle pulling in /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib,
-# and the only reason the dependency gate had anything left to find. The trust
-# cache itself is generated by /System/Library/SecurityResearch's cryptexctl.
-rm -rf "${RES}/scripts" "${RES}/guest" "${RES}/tools" "${RES}/.tools" \
- "${RES}/gpu" "${RES}/vphoned.signed" "${RES}/requirements.txt" "${RES}/debs.list"
-mkdir -p "${RES}/scripts"
-# An ALLOWLIST, from each script's own `# vphone-tier:` line. This used to be a
-# list of exclusions, which meant anything new shipped by default — and so the
-# .app carried build.sh, check_aux.sh and the old setup_tools.sh, which once
-# ran `brew install`. See Scripts/dist_manifest.sh for the three tiers.
-zsh Scripts/dist_manifest.sh | sed '/^vphoned\//d' | rsync -a --files-from=- Scripts/ "${RES}/scripts/"
-mkdir -p "${RES}/scripts/vphoned"
-cp -f Scripts/VPhoned/vphoned.plist Scripts/VPhoned/entitlements.plist "${RES}/scripts/vphoned/"
-# Only vphoned and icli ship into the guest; old build outputs may still contain
-# binaries for the removed bootstrap and must not leak into the bundle.
-mkdir -p "${RES}/guest"
-cp -f .build/guest/vphoned "${RES}/guest/vphoned"
-cp -f .build/guest/icli "${RES}/guest/icli"
-mkdir -p "${RES}/gpu"
-cp -f .build/guest/gpu-compiler-plugin.tar.zst "${RES}/gpu/compiler-plugin.tar.zst"
-[[ -f .build/vphoned.signed ]] && cp -f .build/vphoned.signed "${RES}/vphoned.signed" || true
-# The compatibility guide is the only documentation `fw prepare` reads at runtime.
-# Remove an old bundled README so it cannot silently become a stale data source.
-rm -f "${RES}/README.md"
-rm -rf "${RES}/docs"
-mkdir -p "${RES}/docs/guides"
-cp -f Documents/Guides/compatibility.md "${RES}/docs/guides/compatibility.md"
-echo " bundled: scripts/ (dist tier), guest/vphoned, guest/icli, gpu/compiler-plugin.tar.zst, vphoned.signed, compatibility.md"
-
-# Re-sign: codesign seals Contents/Resources at sign time, so the earlier
-# bundle-step signature (made before these assets existed) is now stale —
-# re-signing here reseals against the final Resources tree.
-echo "=== Re-signing bundled binaries (resealing Resources) ==="
-# Nested first, main executable last — see the bundling step above.
-codesign --force --sign - "$BUNDLE_BIN"
-codesign --force --sign - "$BUNDLE_ARCHIVE"
-codesign --force --sign - "$BUNDLE_ASKPASS"
-codesign --force --sign - "$BUNDLE_AMFI"
-codesign --force --sign - --entitlements "$ENTITLEMENTS" "$BUNDLE_VM"
-codesign -v "$BUNDLE_VM" \
- || { echo "Error: the bundle seal did not verify after signing." >&2; exit 1; }
-echo " resealed OK"
-
-echo ""
-echo "=== Build complete ==="
-echo " vphone-cli : ${BINARY} (no entitlements — always launches)"
-echo " vphone-vm : ${VM_BINARY} (entitled — amfid may refuse it)"
-echo " vphone-archive : ${ARCHIVE_BINARY}"
-echo " vphone-ask-for-permission : ${ASKPASS_BINARY}"
-echo " vphone-amfi-allow : ${AMFI_BINARY} (arm64e)"
-echo " bundle : ${BUNDLE}"
-echo " vphoned : .build/vphoned.signed"
-echo ""
-echo "Run: ${BINARY} --help"
-echo "If vphone-vm is killed the moment it launches, amfid refused its entitlements."
-echo "Allow the new vphone-vm signatures after each build; see Documents/Guides/host-setup.md."
diff --git a/Scripts/check_aux.sh b/Scripts/check_aux.sh
index 0053b648..265d9098 100755
--- a/Scripts/check_aux.sh
+++ b/Scripts/check_aux.sh
@@ -168,12 +168,9 @@ check_closure() {
while IFS= read -r obj; do queue+=("$obj"); done < <(
find "$root" -type f -perm -u+x 2>/dev/null \
| while IFS= read -r f; do
- # Resources/guest holds the iOS guest daemon and related resources,
- # plus vphoned.signed for a live install. They are arm64
- # iphoneos Mach-Os; they never run on this host and their link lines
- # say nothing about whether this .app is self-contained.
- [[ "$f" == */Contents/Resources/guest/* ]] && continue
- [[ "${f:t}" == "vphoned.signed" ]] && continue
+ # These three iOS Mach-Os are shipped under Contents/MacOS as guest
+ # payload. Their link lines do not describe host dependencies.
+ [[ "${f:t}" == "vphoned" || "${f:t}" == "vphoned.signed" || "${f:t}" == "icli" ]] && continue
file "$f" 2>/dev/null | grep -q "Mach-O" && print -r -- "$f"
done
)
diff --git a/Sources/VPhoneAskForPermission/main.swift b/Sources/VPhoneAskForPermission/main.swift
deleted file mode 100644
index bce05175..00000000
--- a/Sources/VPhoneAskForPermission/main.swift
+++ /dev/null
@@ -1,138 +0,0 @@
-import AppKit
-import Foundation
-
-// vphone-ask-for-permission — the one place this project asks for a password.
-//
-// It is a SUDO_ASKPASS program. `sudo -A` runs it, passes its own prompt as
-// argv[1], and reads the password from stdout; nothing else in the pipeline
-// ever holds it. That matters, because the thing this replaces wrote a shell
-// script to a temp file that echoed $SUDO_PASSWORD, which put the password in
-// a spawned process's environment where `ps -E` shows it to any process of the
-// same user.
-//
-// It is also the probe: `--probe` reports how privilege can be obtained on
-// this host, so the caller knows whether to run plain `sudo` (Touch ID or a
-// live timestamp will handle it) or `sudo -A` (this program will).
-//
-// Note on Touch ID: authenticating the user here, with LocalAuthentication,
-// would prove who is at the keyboard and grant nothing — LAContext does not
-// hand out privilege. The only Touch ID that helps is pam_tid inside sudo's
-// own PAM stack, so that is what `--probe` looks for.
-
-// MARK: - Touch ID for sudo
-
-enum VPhoneSudoTouchID {
- /// The two files sudo's PAM stack reads. `sudo_local` is the supported
- /// place since Sonoma — `/etc/pam.d/sudo` itself is replaced on update,
- /// which is why Apple added the include.
- static let configurationFiles = ["/etc/pam.d/sudo_local", "/etc/pam.d/sudo"]
-
- /// Whether any of them enables `pam_tid.so` on a line that is not
- /// commented out. sudo's PAM files comment with `#`.
- static var isConfigured: Bool {
- configurationFiles.contains { path in
- guard let text = try? String(contentsOfFile: path, encoding: .utf8) else { return false }
- return text.split(separator: "\n").contains { line in
- let trimmed = line.trimmingCharacters(in: .whitespaces)
- return !trimmed.hasPrefix("#") && trimmed.contains("pam_tid.so")
- }
- }
- }
-}
-
-// MARK: - A live sudo timestamp
-
-enum VPhoneSudoTimestamp {
- /// `sudo -n true` succeeds when a timestamp is still valid, and fails
- /// without prompting when it is not. It is the only way to ask "would
- /// sudo prompt?" without risking a prompt.
- static var isValid: Bool {
- let process = Process()
- process.executableURL = URL(fileURLWithPath: "/usr/bin/sudo")
- process.arguments = ["-n", "true"]
- process.standardOutput = FileHandle.nullDevice
- process.standardError = FileHandle.nullDevice
- do {
- try process.run()
- } catch {
- return false
- }
- process.waitUntilExit()
- return process.terminationStatus == 0
- }
-}
-
-// MARK: - The dialog
-
-enum VPhonePasswordPrompt {
- /// A modal password dialog, or nil if the user cancelled.
- ///
- /// Runs on an NSApplication with an accessory activation policy: no Dock
- /// tile, no menu bar, but the panel still comes to the front, which a bare
- /// `runModal` from a command-line tool does not.
- @MainActor
- static func ask(prompt: String) -> String? {
- let app = NSApplication.shared
- app.setActivationPolicy(.accessory)
- app.activate(ignoringOtherApps: true)
-
- let alert = NSAlert()
- alert.messageText = "vphone needs administrator privileges"
- alert.informativeText = prompt
- alert.alertStyle = .informational
- alert.addButton(withTitle: "Authenticate")
- alert.addButton(withTitle: "Cancel")
-
- let field = NSSecureTextField(frame: NSRect(x: 0, y: 0, width: 280, height: 24))
- field.placeholderString = "Password"
- alert.accessoryView = field
- alert.window.initialFirstResponder = field
-
- guard alert.runModal() == .alertFirstButtonReturn else { return nil }
- return field.stringValue
- }
-}
-
-// MARK: - Entry point
-
-/// What sudo shows when it asks. sudo hands its own prompt in argv[1]; this is
-/// only the fallback for a direct run.
-let defaultPrompt = "Enter the password for \(NSUserName()) to continue."
-
-let arguments = Array(CommandLine.arguments.dropFirst())
-
-if arguments.first == "--probe" {
- // Three routes, most to least convenient. The caller reads the first word.
- if VPhoneSudoTimestamp.isValid {
- print("timestamp")
- } else if VPhoneSudoTouchID.isConfigured {
- print("touchid")
- } else {
- print("askpass")
- }
- exit(0)
-}
-
-if arguments.first == "--help" || arguments.first == "-h" {
- print("""
- usage:
- vphone-ask-for-permission [prompt] Ask for a password, print it on stdout.
- This is the SUDO_ASKPASS interface:
- sudo -A runs it and passes its prompt.
- vphone-ask-for-permission --probe Print how privilege can be obtained
- here: timestamp | touchid | askpass.
- """)
- exit(0)
-}
-
-let prompt = arguments.first.map { $0.isEmpty ? defaultPrompt : $0 } ?? defaultPrompt
-
-let password = MainActor.assumeIsolated { VPhonePasswordPrompt.ask(prompt: prompt) }
-guard let password else {
- // sudo reads a non-zero exit as "the user declined" and stops asking.
- exit(1)
-}
-
-// sudo wants the password and a newline, and nothing else on stdout.
-FileHandle.standardOutput.write(Data((password + "\n").utf8))
-exit(0)
diff --git a/Sources/VPhoneCore/VPhoneSudo.swift b/Sources/VPhoneCore/VPhoneSudo.swift
deleted file mode 100644
index b69df09e..00000000
--- a/Sources/VPhoneCore/VPhoneSudo.swift
+++ /dev/null
@@ -1,128 +0,0 @@
-import Foundation
-
-// MARK: - Asking for root, once, in one place
-
-/// How this project becomes root.
-///
-/// Three things needed it and each had grown its own answer: the create
-/// orchestrator wrote a throwaway askpass script that echoed `$SUDO_PASSWORD`
-/// (which put the password in a spawned process's environment, where `ps -E`
-/// shows it to anything running as the same user), `cfw install` re-execs
-/// itself under sudo, and the AMFI allow step is a plain `sudo` line a human
-/// was expected to paste. This is the one place now.
-///
-/// Nothing here holds a password. On a terminal sudo reads it from the tty
-/// itself; in a window session `vphone-ask-for-permission` collects it and
-/// writes it straight down sudo's askpass pipe. Neither path lets it reach
-/// this process, a file, or an environment variable.
-public enum VPhoneSudo {
- /// What this host will do when sudo is asked for a password.
- /// The raw values are the words `vphone-ask-for-permission --probe` prints;
- /// keep the two in step.
- public enum Route: String, Sendable {
- /// A previous sudo is still within its timestamp. Nothing will prompt.
- case timestamp
- /// `pam_tid.so` is in sudo's PAM stack: the prompt is Touch ID.
- case touchID = "touchid"
- /// Neither, so something has to ask for a password.
- case askpass
- }
-
- /// The helper that renders the password dialog. Resolved as a sibling of
- /// the running image, never through `PATH`, the same rule `vphone-vm`
- /// follows — a bypass planted earlier on `PATH` must not be able to answer
- /// a question about privilege.
- public static var helper: URL {
- VPhoneResources.siblingExecutable("vphone-ask-for-permission")
- }
-
- /// Which of the three applies right now.
- ///
- /// Asks the helper, so the detection lives in exactly one place. If the
- /// helper is missing or unreadable this reports `.askpass`, which is the
- /// answer that makes the caller do the most work rather than the least.
- public static func route() -> Route {
- guard FileManager.default.isExecutableFile(atPath: helper.path),
- let result = try? VPhoneProcessRunner.runCapturing(helper, ["--probe"]),
- result.succeeded,
- let value = Route(rawValue: result.stdout.trimmingCharacters(in: .whitespacesAndNewlines))
- else { return .askpass }
- return value
- }
-
- /// Refresh the sudo timestamp, prompting however this host allows, so that
- /// the commands that follow do not each prompt again.
- ///
- /// `reason` is shown to the user. Say what is about to happen in terms of
- /// the thing they asked for, not in terms of sudo.
- @discardableResult
- public static func authorize(reason: String, echo: Bool = true) throws -> Route {
- let route = route()
- if route == .timestamp {
- return route
- }
-
- if echo {
- print("[sudo] \(reason)")
- }
-
- let sudo = URL(fileURLWithPath: "/usr/bin/sudo")
-
- // With Touch ID, or on a terminal, sudo does its own prompting and owns
- // the tty while it does — `runForeground` exists for exactly that, and
- // it is the better path because the password never leaves sudo.
- if route == .touchID || isatty(STDIN_FILENO) != 0 {
- let status = try VPhoneProcessRunner.runForeground(sudo, ["-v"])
- guard status == 0 else { throw VPhoneSudoError.declined }
- return route
- }
-
- // No tty — launched from a window session. sudo cannot prompt, so the
- // helper does, and hands the answer back down sudo's own askpass pipe.
- guard FileManager.default.isExecutableFile(atPath: helper.path) else {
- throw VPhoneSudoError.helperMissing(path: helper.path)
- }
- var env = ProcessInfo.processInfo.environment
- env["SUDO_ASKPASS"] = helper.path
- let status = try VPhoneProcessRunner.runStreaming(sudo, ["-A", "-v"], env: env, echo: echo)
- guard status == 0 else { throw VPhoneSudoError.declined }
- return route
- }
-
- /// Run one command as root, prompting first if that is needed.
- @discardableResult
- public static func run(
- _ executable: URL,
- _ arguments: [String],
- reason: String,
- cwd: URL? = nil,
- echo: Bool = true,
- ) throws -> Int32 {
- try authorize(reason: reason, echo: echo)
- return try VPhoneProcessRunner.runForeground(
- URL(fileURLWithPath: "/usr/bin/sudo"),
- ["--", executable.path] + arguments,
- cwd: cwd,
- )
- }
-}
-
-// MARK: - Errors
-
-public enum VPhoneSudoError: Error, CustomStringConvertible {
- case declined
- case helperMissing(path: String)
-
- public var description: String {
- switch self {
- case .declined:
- "Administrator authorisation was declined."
- case let .helperMissing(path):
- """
- vphone-ask-for-permission is not next to this binary (looked at \(path)).
- It is built by `Scripts/build.sh`; without it there is no way to ask for a \
- password from a window session with no terminal.
- """
- }
- }
-}
diff --git a/VPhone.xcworkspace/contents.xcworkspacedata b/VPhone.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..bdcc87b8
--- /dev/null
+++ b/VPhone.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "group:VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:VPhoneKit/VPhoneKit.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:VPhoneDaemon/VPhoneDaemon.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:VPhoneExecutable/VPhoneEscalator/VPhoneEscalator.xcodeproj">
+ </FileRef>
+</Workspace>
diff --git a/Package.resolved b/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved
similarity index 88%
rename from Package.resolved
rename to VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 121fa463..7ecc72f2 100644
--- a/Package.resolved
+++ b/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -1,13 +1,13 @@
{
- "originHash" : "c91e50c349f2dafdea83e42d7561095edcba4ccc05afe62daac1f951bf2d4436",
+ "originHash" : "1de27e729fcb6338110f5bcd0bee0f3630087d45462f3e4d5e75e9be0ff1add0",
"pins" : [
{
"identity" : "applemobiledevicelibrary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Lakr233/AppleMobileDeviceLibrary.git",
"state" : {
- "revision" : "98751dcfdd2257afe6529bd8aa688be27743af98",
- "version" : "1.0.1790070576"
+ "revision" : "553a0bf1b55812b1a08c727b1a3084e88871343b",
+ "version" : "1.0.1790243523"
}
},
{
@@ -19,6 +19,15 @@
"version" : "1.2.0"
}
},
+ {
+ "identity" : "icli",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/owngoal-dev/icli.git",
+ "state" : {
+ "revision" : "c3407df5f160919b5eb7d2fefb5a5c21351314fb",
+ "version" : "0.6.1"
+ }
+ },
{
"identity" : "libarchive.xcframework",
"kind" : "remoteSourceControl",
@@ -78,8 +87,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
- "revision" : "6a52f3251125d74daf04fcbd5e6f08a75d074382",
- "version" : "1.8.2"
+ "revision" : "46989693916f56d1186bd59ac15124caef896560",
+ "version" : "1.3.1"
}
},
{
@@ -114,8 +123,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
- "revision" : "7b847a3b7008b2dc2f47ca3110d8c782fb2e5c7e",
- "version" : "1.3.0"
+ "revision" : "a66de878e87ef5a3d5d390e0f6d9002aa5541a43",
+ "version" : "1.7.0"
}
},
{
diff --git a/Scripts/VPhoned/entitlements.plist b/VPhoneDaemon/Configuration/entitlements.plist
similarity index 100%
rename from Scripts/VPhoned/entitlements.plist
rename to VPhoneDaemon/Configuration/entitlements.plist
diff --git a/Scripts/VPhoned/vphoned.plist b/VPhoneDaemon/Configuration/vphoned.plist
similarity index 100%
rename from Scripts/VPhoned/vphoned.plist
rename to VPhoneDaemon/Configuration/vphoned.plist
diff --git a/Scripts/VPhoned/Daemon/APIWire.swift b/VPhoneDaemon/Daemon/APIWire.swift
similarity index 100%
rename from Scripts/VPhoned/Daemon/APIWire.swift
rename to VPhoneDaemon/Daemon/APIWire.swift
diff --git a/Scripts/VPhoned/Daemon/GuestAPI.swift b/VPhoneDaemon/Daemon/GuestAPI.swift
similarity index 99%
rename from Scripts/VPhoned/Daemon/GuestAPI.swift
rename to VPhoneDaemon/Daemon/GuestAPI.swift
index 90b1e9a4..394a78a7 100644
--- a/Scripts/VPhoned/Daemon/GuestAPI.swift
+++ b/VPhoneDaemon/Daemon/GuestAPI.swift
@@ -57,7 +57,6 @@ enum GuestAPI {
"keychain",
"ipa_install",
"camera",
- "icli",
],
]
}
@@ -66,8 +65,6 @@ enum GuestAPI {
switch method {
case "device.snapshot":
return try collectDeviceSnapshot()
- case "icli.execute":
- return try IcliCommand.execute(params)
case "device.screen":
return screenInfo()
case "apps.list":
diff --git a/Scripts/VPhoned/Daemon/GuestEventPublisher.swift b/VPhoneDaemon/Daemon/GuestEventPublisher.swift
similarity index 100%
rename from Scripts/VPhoned/Daemon/GuestEventPublisher.swift
rename to VPhoneDaemon/Daemon/GuestEventPublisher.swift
diff --git a/Scripts/VPhoned/Daemon/GuestFileTransfer.swift b/VPhoneDaemon/Daemon/GuestFileTransfer.swift
similarity index 91%
rename from Scripts/VPhoned/Daemon/GuestFileTransfer.swift
rename to VPhoneDaemon/Daemon/GuestFileTransfer.swift
index 276e62aa..18d1e226 100644
--- a/Scripts/VPhoned/Daemon/GuestFileTransfer.swift
+++ b/VPhoneDaemon/Daemon/GuestFileTransfer.swift
@@ -16,7 +16,7 @@ enum GuestFileTransfer {
static func download(path: String, fileIO: NonBlockingFileIO, channel: Channel) {
let fd = open(path, O_RDONLY)
guard fd >= 0 else {
- GuestHTTPHandler.send(APIWire.error("File could not be opened", status: 404), on: channel)
+ GuestHyperTextHandler.send(APIWire.error("File could not be opened", status: 404), on: channel)
return
}
let handle = NIOFileHandle(_deprecatedTakingOwnershipOfDescriptor: fd)
@@ -54,7 +54,7 @@ enum GuestFileTransfer {
}
} catch {
try? handle.close()
- GuestHTTPHandler.send(APIWire.error(String(describing: error), status: 400), on: channel)
+ GuestHyperTextHandler.send(APIWire.error(String(describing: error), status: 400), on: channel)
}
}
}
@@ -118,10 +118,10 @@ final class GuestFileUpload: @unchecked Sendable {
throw GuestAPIError.operationFailed("Could not replace destination file")
}
try onCommit?(destination)
- GuestHTTPHandler.send(.json(["result": ["path": destination, "size": offset]]), on: channel)
+ GuestHyperTextHandler.send(.json(["result": ["path": destination, "size": offset]]), on: channel)
} catch {
unlink(temporary)
- GuestHTTPHandler.send(APIWire.error(String(describing: error), status: 500), on: channel)
+ GuestHyperTextHandler.send(APIWire.error(String(describing: error), status: 500), on: channel)
}
}
}
diff --git a/Scripts/VPhoned/Daemon/GuestHTTPHandler.swift b/VPhoneDaemon/Daemon/GuestHyperTextHandler.swift
similarity index 96%
rename from Scripts/VPhoned/Daemon/GuestHTTPHandler.swift
rename to VPhoneDaemon/Daemon/GuestHyperTextHandler.swift
index b4ab1470..742d6a40 100644
--- a/Scripts/VPhoned/Daemon/GuestHTTPHandler.swift
+++ b/VPhoneDaemon/Daemon/GuestHyperTextHandler.swift
@@ -4,7 +4,7 @@ import NIOCore
import NIOHTTP1
import NIOPosix
-final class GuestHTTPHandler: ChannelInboundHandler, RemovableChannelHandler, @unchecked Sendable {
+final class GuestHyperTextHandler: ChannelInboundHandler, RemovableChannelHandler, @unchecked Sendable {
typealias InboundIn = HTTPServerRequestPart
typealias OutboundOut = HTTPServerResponsePart
@@ -134,8 +134,7 @@ final class GuestHTTPHandler: ChannelInboundHandler, RemovableChannelHandler, @u
request = APIRequest(method: method, params: params, id: nil)
}
let job = HTTPJob(channel: channel, request: request, hub: hub)
- let queue = request.method == "icli.execute" ? IcliCommand.queue : GuestAPI.queue
- queue.async { job.run() }
+ GuestAPI.queue.async { job.run() }
} catch {
Self.send(APIWire.error(String(describing: error)), on: channel)
}
@@ -166,7 +165,6 @@ final class GuestHTTPHandler: ChannelInboundHandler, RemovableChannelHandler, @u
private static func route(_ verb: HTTPMethod, path: String) throws -> String {
switch (verb, path) {
case (.GET, "/v1/device"): "device.snapshot"
- case (.POST, "/v1/icli/execute"): "icli.execute"
case (.GET, "/v1/device/screen"): "device.screen"
case (.GET, "/v1/apps"): "apps.list"
case (.POST, "/v1/apps/launch"): "apps.launch"
@@ -247,6 +245,6 @@ private final class HTTPJob: @unchecked Sendable {
if reply.status == 200 {
hub.broadcast(name: "operation.completed", data: ["method": request.method])
}
- GuestHTTPHandler.send(reply, on: channel)
+ GuestHyperTextHandler.send(reply, on: channel)
}
}
diff --git a/Scripts/VPhoned/Daemon/GuestWebSocketHandler.swift b/VPhoneDaemon/Daemon/GuestWebSocketHandler.swift
similarity index 95%
rename from Scripts/VPhoned/Daemon/GuestWebSocketHandler.swift
rename to VPhoneDaemon/Daemon/GuestWebSocketHandler.swift
index e747978e..51a52765 100644
--- a/Scripts/VPhoned/Daemon/GuestWebSocketHandler.swift
+++ b/VPhoneDaemon/Daemon/GuestWebSocketHandler.swift
@@ -26,8 +26,7 @@ final class GuestWebSocketHandler: ChannelInboundHandler, @unchecked Sendable {
do {
let request = try APIWire.decode(Data(bytes))
let job = WebSocketJob(channel: context.channel, request: request, hub: hub)
- let queue = request.method == "icli.execute" ? IcliCommand.queue : GuestAPI.queue
- queue.async { job.run() }
+ GuestAPI.queue.async { job.run() }
} catch {
let reply = APIReply.json(["type": "response", "id": NSNull(),
"error": ["code": "bad_request", "message": String(describing: error)]])
diff --git a/Scripts/VPhoned/Daemon/OpenAPIDocument.swift b/VPhoneDaemon/Daemon/OpenAPIDocument.swift
similarity index 92%
rename from Scripts/VPhoned/Daemon/OpenAPIDocument.swift
rename to VPhoneDaemon/Daemon/OpenAPIDocument.swift
index ce35b32a..26718925 100644
--- a/Scripts/VPhoned/Daemon/OpenAPIDocument.swift
+++ b/VPhoneDaemon/Daemon/OpenAPIDocument.swift
@@ -14,7 +14,6 @@ enum OpenAPIDocument {
"servers": [{"url": "/"}],
"paths": {
"/v1/health": {"get": {"operationId": "health", "responses": {"200": {"description": "Daemon is running"}}}},
- "/v1/icli/execute": {"post": {"operationId": "icli.execute", "description": "Run icli inside the guest with argv, optional stdin or stdin_base64. Returns exit_code, output and stderr.", "requestBody": {"$ref": "#/components/requestBodies/IcliCommand"}, "responses": {"200": {"$ref": "#/components/responses/Result"}}}},
"/v1/device": {"get": {"operationId": "device.snapshot", "responses": {"200": {"$ref": "#/components/responses/Result"}}}},
"/v1/device/screen": {"get": {"operationId": "device.screen", "responses": {"200": {"$ref": "#/components/responses/Result"}}}},
"/v1/apps": {"get": {"operationId": "apps.list", "responses": {"200": {"$ref": "#/components/responses/Result"}}}},
@@ -70,8 +69,7 @@ enum OpenAPIDocument {
"Error": {"type": "object", "required": ["code", "message"], "properties": {"code": {"type": "string"}, "message": {"type": "string"}}}
},
"requestBodies": {
- "Parameters": {"content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}},
- "IcliCommand": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["argv"], "properties": {"argv": {"type": "array", "minItems": 1, "maxItems": 64, "items": {"type": "string"}}, "stdin": {"type": "string"}, "stdin_base64": {"type": "string", "contentEncoding": "base64"}}}}}}
+ "Parameters": {"content": {"application/json": {"schema": {"type": "object", "additionalProperties": true}}}}
},
"responses": {"Result": {"description": "A Response envelope with result or error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Response"}}}}}
},
diff --git a/Scripts/VPhoned/Daemon/main.swift b/VPhoneDaemon/Daemon/main.swift
similarity index 96%
rename from Scripts/VPhoned/Daemon/main.swift
rename to VPhoneDaemon/Daemon/main.swift
index 8c255e65..5fbdee43 100644
--- a/Scripts/VPhoned/Daemon/main.swift
+++ b/VPhoneDaemon/Daemon/main.swift
@@ -19,7 +19,7 @@ do {
let server = try ServerBootstrap(group: group)
.serverChannelOption(ChannelOptions.backlog, value: 128)
.childChannelInitializer { channel in
- let http = GuestHTTPHandler(hub: hub, fileIO: fileIO)
+ let http = GuestHyperTextHandler(hub: hub, fileIO: fileIO)
let upgrader = NIOWebSocketServerUpgrader(
maxFrameSize: 1 << 20,
shouldUpgrade: { channel, request in
diff --git a/Scripts/VPhoned/Include/VphonedNative.h b/VPhoneDaemon/Native/Include/VphonedNative.h
similarity index 100%
rename from Scripts/VPhoned/Include/VphonedNative.h
rename to VPhoneDaemon/Native/Include/VphonedNative.h
diff --git a/VPhoneDaemon/Native/Include/module.modulemap b/VPhoneDaemon/Native/Include/module.modulemap
new file mode 100644
index 00000000..c1433931
--- /dev/null
+++ b/VPhoneDaemon/Native/Include/module.modulemap
@@ -0,0 +1,4 @@
+module VphonedNative {
+ header "VphonedNative.h"
+ export *
+}
diff --git a/Scripts/VPhoned/Vendor/LibArchive/archive.h b/VPhoneDaemon/Native/Vendor/LibArchive/archive.h
similarity index 100%
rename from Scripts/VPhoned/Vendor/LibArchive/archive.h
rename to VPhoneDaemon/Native/Vendor/LibArchive/archive.h
diff --git a/Scripts/VPhoned/Vendor/LibArchive/archive_entry.h b/VPhoneDaemon/Native/Vendor/LibArchive/archive_entry.h
similarity index 100%
rename from Scripts/VPhoned/Vendor/LibArchive/archive_entry.h
rename to VPhoneDaemon/Native/Vendor/LibArchive/archive_entry.h
diff --git a/Scripts/VPhoned/unarchive.h b/VPhoneDaemon/Native/unarchive.h
similarity index 100%
rename from Scripts/VPhoned/unarchive.h
rename to VPhoneDaemon/Native/unarchive.h
diff --git a/Scripts/VPhoned/unarchive.m b/VPhoneDaemon/Native/unarchive.m
similarity index 100%
rename from Scripts/VPhoned/unarchive.m
rename to VPhoneDaemon/Native/unarchive.m
diff --git a/Scripts/VPhoned/vphoned_install.h b/VPhoneDaemon/Native/vphoned_install.h
similarity index 100%
rename from Scripts/VPhoned/vphoned_install.h
rename to VPhoneDaemon/Native/vphoned_install.h
diff --git a/Scripts/VPhoned/vphoned_install.m b/VPhoneDaemon/Native/vphoned_install.m
similarity index 99%
rename from Scripts/VPhoned/vphoned_install.m
rename to VPhoneDaemon/Native/vphoned_install.m
index 2296faf0..8369031a 100644
--- a/Scripts/VPhoned/vphoned_install.m
+++ b/VPhoneDaemon/Native/vphoned_install.m
@@ -469,7 +469,7 @@ static NSDictionary *vp_construct_environment_variables_for_container_path(
static NSSet<NSString *> *vp_immutable_app_bundle_identifiers(void) {
NSMutableSet<NSString *> *systemAppIdentifiers = [NSMutableSet set];
- LSEnumerator *enumerator = [LSEnumerator enumeratorForApplicationProxiesWithOptions:0];
+ LSEnumerator *enumerator = [(id)NSClassFromString(@"LSEnumerator") enumeratorForApplicationProxiesWithOptions:0];
LSApplicationProxy *appProxy = nil;
while ((appProxy = [enumerator nextObject])) {
if (appProxy.installed && ![appProxy.bundleURL.path hasPrefix:@"/private/var/containers"]) {
@@ -541,7 +541,7 @@ static NSMutableDictionary *vp_registration_dictionary(
static BOOL vp_register_path(NSString *path, BOOL unregister, BOOL forceSystem) {
if (path.length == 0) return NO;
- LSApplicationWorkspace *workspace = [LSApplicationWorkspace defaultWorkspace];
+ LSApplicationWorkspace *workspace = [(id)NSClassFromString(@"LSApplicationWorkspace") defaultWorkspace];
if (unregister && ![[NSFileManager defaultManager] fileExistsAtPath:path]) {
LSApplicationProxy *app = [LSApplicationProxy applicationProxyForIdentifier:path];
if (app.bundleURL.path.length > 0) {
diff --git a/Scripts/VPhoned/vphoned_keychain.h b/VPhoneDaemon/Native/vphoned_keychain.h
similarity index 100%
rename from Scripts/VPhoned/vphoned_keychain.h
rename to VPhoneDaemon/Native/vphoned_keychain.h
diff --git a/Scripts/VPhoned/vphoned_keychain.m b/VPhoneDaemon/Native/vphoned_keychain.m
similarity index 100%
rename from Scripts/VPhoned/vphoned_keychain.m
rename to VPhoneDaemon/Native/vphoned_keychain.m
diff --git a/Scripts/VPhoned/vphoned_native.m b/VPhoneDaemon/Native/vphoned_native.m
similarity index 100%
rename from Scripts/VPhoned/vphoned_native.m
rename to VPhoneDaemon/Native/vphoned_native.m
diff --git a/Scripts/VPhoned/vphoned_response.h b/VPhoneDaemon/Native/vphoned_response.h
similarity index 100%
rename from Scripts/VPhoned/vphoned_response.h
rename to VPhoneDaemon/Native/vphoned_response.h
diff --git a/Scripts/VPhoned/vphoned_vcam.h b/VPhoneDaemon/Native/vphoned_vcam.h
similarity index 100%
rename from Scripts/VPhoned/vphoned_vcam.h
rename to VPhoneDaemon/Native/vphoned_vcam.h
diff --git a/Scripts/VPhoned/vphoned_vcam.m b/VPhoneDaemon/Native/vphoned_vcam.m
similarity index 100%
rename from Scripts/VPhoned/vphoned_vcam.m
rename to VPhoneDaemon/Native/vphoned_vcam.m
diff --git a/Siblings/VPRegister/vpregister.m b/VPhoneDaemon/VPRegister/vpregister.m
similarity index 100%
rename from Siblings/VPRegister/vpregister.m
rename to VPhoneDaemon/VPRegister/vpregister.m
diff --git a/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.pbxproj b/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..33db0b13
--- /dev/null
+++ b/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.pbxproj
@@ -0,0 +1,450 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 71;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ C10000000000000000000011 /* libVphonedNative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C10000000000000000000001 /* libVphonedNative.a */; };
+ C10000000000000000000012 /* IcliKit in Frameworks */ = {isa = PBXBuildFile; productRef = C10000000000000000000061 /* IcliKit */; };
+ C10000000000000000000013 /* NIOCore in Frameworks */ = {isa = PBXBuildFile; productRef = C10000000000000000000062 /* NIOCore */; };
+ C10000000000000000000014 /* NIOHTTP1 in Frameworks */ = {isa = PBXBuildFile; productRef = C10000000000000000000063 /* NIOHTTP1 */; };
+ C10000000000000000000015 /* NIOPosix in Frameworks */ = {isa = PBXBuildFile; productRef = C10000000000000000000064 /* NIOPosix */; };
+ C10000000000000000000016 /* NIOWebSocket in Frameworks */ = {isa = PBXBuildFile; productRef = C10000000000000000000065 /* NIOWebSocket */; };
+ C10000000000000000000017 /* LibArchive in Frameworks */ = {isa = PBXBuildFile; productRef = C10000000000000000000066 /* LibArchive */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ C10000000000000000000021 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = C100000000000000000000F0 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = C10000000000000000000081;
+ remoteInfo = VphonedNative;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ C10000000000000000000001 /* libVphonedNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVphonedNative.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ C10000000000000000000002 /* vphoned */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = vphoned; sourceTree = BUILT_PRODUCTS_DIR; };
+ C10000000000000000000003 /* vpregister */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = vpregister; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFileSystemSynchronizedRootGroup section */
+ C10000000000000000000031 /* Native */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Native; sourceTree = "<group>"; };
+ C10000000000000000000032 /* Daemon */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Daemon; sourceTree = "<group>"; };
+ C10000000000000000000033 /* Configuration */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Configuration; sourceTree = "<group>"; };
+ C10000000000000000000034 /* VPRegister */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPRegister; sourceTree = "<group>"; };
+/* End PBXFileSystemSynchronizedRootGroup section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ C10000000000000000000041 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ C10000000000000000000042 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C10000000000000000000011 /* libVphonedNative.a in Frameworks */,
+ C10000000000000000000012 /* IcliKit in Frameworks */,
+ C10000000000000000000013 /* NIOCore in Frameworks */,
+ C10000000000000000000014 /* NIOHTTP1 in Frameworks */,
+ C10000000000000000000015 /* NIOPosix in Frameworks */,
+ C10000000000000000000016 /* NIOWebSocket in Frameworks */,
+ C10000000000000000000017 /* LibArchive in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ C10000000000000000000043 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ C10000000000000000000051 = {
+ isa = PBXGroup;
+ children = (
+ C10000000000000000000031 /* Native */,
+ C10000000000000000000032 /* Daemon */,
+ C10000000000000000000033 /* Configuration */,
+ C10000000000000000000034 /* VPRegister */,
+ C10000000000000000000052 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ C10000000000000000000052 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ C10000000000000000000001 /* libVphonedNative.a */,
+ C10000000000000000000002 /* vphoned */,
+ C10000000000000000000003 /* vpregister */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ C10000000000000000000081 /* VphonedNative */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C10000000000000000000091 /* Build configuration list for PBXNativeTarget "VphonedNative" */;
+ buildPhases = (
+ C100000000000000000000A1 /* Sources */,
+ C10000000000000000000041 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ fileSystemSynchronizedGroups = (
+ C10000000000000000000031 /* Native */,
+ );
+ name = VphonedNative;
+ productName = VphonedNative;
+ productReference = C10000000000000000000001 /* libVphonedNative.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ C10000000000000000000082 /* vphoned */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C10000000000000000000092 /* Build configuration list for PBXNativeTarget "vphoned" */;
+ buildPhases = (
+ C100000000000000000000A2 /* Sources */,
+ C10000000000000000000042 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ C10000000000000000000022 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ C10000000000000000000032 /* Daemon */,
+ );
+ name = vphoned;
+ packageProductDependencies = (
+ C10000000000000000000061 /* IcliKit */,
+ C10000000000000000000062 /* NIOCore */,
+ C10000000000000000000063 /* NIOHTTP1 */,
+ C10000000000000000000064 /* NIOPosix */,
+ C10000000000000000000065 /* NIOWebSocket */,
+ C10000000000000000000066 /* LibArchive */,
+ );
+ productName = vphoned;
+ productReference = C10000000000000000000002 /* vphoned */;
+ productType = "com.apple.product-type.tool";
+ };
+ C10000000000000000000083 /* vpregister */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C10000000000000000000094 /* Build configuration list for PBXNativeTarget "vpregister" */;
+ buildPhases = (
+ C100000000000000000000A3 /* Sources */,
+ C10000000000000000000043 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ fileSystemSynchronizedGroups = (
+ C10000000000000000000034 /* VPRegister */,
+ );
+ name = vpregister;
+ productName = vpregister;
+ productReference = C10000000000000000000003 /* vpregister */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ C100000000000000000000F0 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 2700;
+ };
+ buildConfigurationList = C10000000000000000000093 /* Build configuration list for PBXProject "VPhoneDaemon" */;
+ compatibilityVersion = "Xcode 16.0";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = C10000000000000000000051;
+ packageReferences = (
+ C10000000000000000000071 /* XCRemoteSwiftPackageReference "icli" */,
+ C10000000000000000000072 /* XCRemoteSwiftPackageReference "swift-nio" */,
+ C10000000000000000000073 /* XCRemoteSwiftPackageReference "libarchive.xcframework" */,
+ );
+ productRefGroup = C10000000000000000000052 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ C10000000000000000000081 /* VphonedNative */,
+ C10000000000000000000082 /* vphoned */,
+ C10000000000000000000083 /* vpregister */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ C100000000000000000000A1 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ C100000000000000000000A2 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ C100000000000000000000A3 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ C10000000000000000000022 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = C10000000000000000000081 /* VphonedNative */;
+ targetProxy = C10000000000000000000021 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ C100000000000000000000B1 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ DEFINES_MODULE = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "VPHONED_BUILD_HASH=\\\"unknown\\\"",
+ );
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/Native",
+ "$(PROJECT_DIR)/Native/Include",
+ "$(PROJECT_DIR)/Native/Vendor/LibArchive",
+ );
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ C100000000000000000000B2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ DEFINES_MODULE = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "VPHONED_BUILD_HASH=\\\"unknown\\\"",
+ );
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/Native",
+ "$(PROJECT_DIR)/Native/Include",
+ "$(PROJECT_DIR)/Native/Vendor/LibArchive",
+ );
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ C100000000000000000000B3 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ DEFINES_MODULE = YES;
+ HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Native/Include";
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ C100000000000000000000B4 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ DEFINES_MODULE = YES;
+ HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Native/Include";
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ C100000000000000000000B5 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGNING_ALLOWED = NO;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = iphoneos;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ C100000000000000000000B6 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_MODULES = YES;
+ CODE_SIGNING_ALLOWED = NO;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = iphoneos;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ C100000000000000000000B7 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64e;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = vpregister;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ C100000000000000000000B8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64e;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = vpregister;
+ SDKROOT = iphoneos;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C10000000000000000000091 /* Build configuration list for PBXNativeTarget "VphonedNative" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C100000000000000000000B1 /* Debug */,
+ C100000000000000000000B2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C10000000000000000000092 /* Build configuration list for PBXNativeTarget "vphoned" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C100000000000000000000B3 /* Debug */,
+ C100000000000000000000B4 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C10000000000000000000093 /* Build configuration list for PBXProject "VPhoneDaemon" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C100000000000000000000B5 /* Debug */,
+ C100000000000000000000B6 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C10000000000000000000094 /* Build configuration list for PBXNativeTarget "vpregister" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C100000000000000000000B7 /* Debug */,
+ C100000000000000000000B8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+
+/* Begin XCRemoteSwiftPackageReference section */
+ C10000000000000000000071 /* XCRemoteSwiftPackageReference "icli" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/owngoal-dev/icli.git";
+ requirement = {
+ kind = exactVersion;
+ version = 0.6.1;
+ };
+ };
+ C10000000000000000000072 /* XCRemoteSwiftPackageReference "swift-nio" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/apple/swift-nio.git";
+ requirement = {
+ kind = exactVersion;
+ version = 2.83.0;
+ };
+ };
+ C10000000000000000000073 /* XCRemoteSwiftPackageReference "libarchive.xcframework" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Lakr233/libarchive.xcframework.git";
+ requirement = {
+ kind = exactVersion;
+ version = 0.1.1;
+ };
+ };
+/* End XCRemoteSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ C10000000000000000000061 /* IcliKit */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = C10000000000000000000071 /* XCRemoteSwiftPackageReference "icli" */;
+ productName = IcliKit;
+ };
+ C10000000000000000000062 /* NIOCore */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = C10000000000000000000072 /* XCRemoteSwiftPackageReference "swift-nio" */;
+ productName = NIOCore;
+ };
+ C10000000000000000000063 /* NIOHTTP1 */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = C10000000000000000000072 /* XCRemoteSwiftPackageReference "swift-nio" */;
+ productName = NIOHTTP1;
+ };
+ C10000000000000000000064 /* NIOPosix */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = C10000000000000000000072 /* XCRemoteSwiftPackageReference "swift-nio" */;
+ productName = NIOPosix;
+ };
+ C10000000000000000000065 /* NIOWebSocket */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = C10000000000000000000072 /* XCRemoteSwiftPackageReference "swift-nio" */;
+ productName = NIOWebSocket;
+ };
+ C10000000000000000000066 /* LibArchive */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = C10000000000000000000073 /* XCRemoteSwiftPackageReference "libarchive.xcframework" */;
+ productName = LibArchive;
+ };
+/* End XCSwiftPackageProductDependency section */
+ };
+ rootObject = C100000000000000000000F0 /* Project object */;
+}
diff --git a/Scripts/VPhoned/Package.resolved b/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
similarity index 91%
rename from Scripts/VPhoned/Package.resolved
rename to VPhoneDaemon/VPhoneDaemon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
index be1ea763..fb7222b2 100644
--- a/Scripts/VPhoned/Package.resolved
+++ b/VPhoneDaemon/VPhoneDaemon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -1,5 +1,5 @@
{
- "originHash" : "09ad0ce748c80361eb4b3727cde34aa0ac0436eea4e4dfd3c163dd37e803897c",
+ "originHash" : "c5727c1f3616a5e260c03cfb3f864a169a2b87fa2d8eed64ef143ee8be072b09",
"pins" : [
{
"identity" : "icli",
@@ -42,8 +42,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
- "revision" : "7b847a3b7008b2dc2f47ca3110d8c782fb2e5c7e",
- "version" : "1.3.0"
+ "revision" : "a66de878e87ef5a3d5d390e0f6d9002aa5541a43",
+ "version" : "1.7.0"
}
},
{
diff --git a/VPhoneDaemon/VPhoneDaemon.xcodeproj/xcshareddata/xcschemes/vphoned.xcscheme b/VPhoneDaemon/VPhoneDaemon.xcodeproj/xcshareddata/xcschemes/vphoned.xcscheme
new file mode 100644
index 00000000..b6a36db2
--- /dev/null
+++ b/VPhoneDaemon/VPhoneDaemon.xcodeproj/xcshareddata/xcschemes/vphoned.xcscheme
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "2700"
+ version = "1.7">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES"
+ buildArchitectures = "Automatic">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "C10000000000000000000082"
+ BuildableName = "vphoned"
+ ReferencedContainer = "container:VPhoneDaemon.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ shouldAutocreateTestPlan = "YES">
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES"
+ viewDebuggingEnabled = "No"
+ queueDebuggingEnabled = "No">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "C10000000000000000000082"
+ BuildableName = "vphoned"
+ ReferencedContainer = "container:VPhoneDaemon.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "C10000000000000000000082"
+ BuildableName = "vphoned"
+ ReferencedContainer = "container:VPhoneDaemon.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Sources/FirmwarePatcher/ARM64/ARM64Constants.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/ARM64/ARM64Constants.swift
similarity index 100%
rename from Sources/FirmwarePatcher/ARM64/ARM64Constants.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/ARM64/ARM64Constants.swift
diff --git a/Sources/FirmwarePatcher/ARM64/ARM64Disassembler.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/ARM64/ARM64Disassembler.swift
similarity index 100%
rename from Sources/FirmwarePatcher/ARM64/ARM64Disassembler.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/ARM64/ARM64Disassembler.swift
diff --git a/Sources/FirmwarePatcher/ARM64/ARM64Encoder.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/ARM64/ARM64Encoder.swift
similarity index 100%
rename from Sources/FirmwarePatcher/ARM64/ARM64Encoder.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/ARM64/ARM64Encoder.swift
diff --git a/Sources/FirmwarePatcher/ARM64/ARM64Inst.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/ARM64/ARM64Inst.swift
similarity index 100%
rename from Sources/FirmwarePatcher/ARM64/ARM64Inst.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/ARM64/ARM64Inst.swift
diff --git a/Sources/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift
diff --git a/Sources/FirmwarePatcher/Binary/BinaryBuffer.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/BinaryBuffer.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Binary/BinaryBuffer.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/BinaryBuffer.swift
diff --git a/Sources/FirmwarePatcher/Binary/IM4PHandler.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/IM4PHandler.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Binary/IM4PHandler.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/IM4PHandler.swift
diff --git a/Sources/FirmwarePatcher/Binary/InPlaceRewrite.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/InPlaceRewrite.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Binary/InPlaceRewrite.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/InPlaceRewrite.swift
diff --git a/Sources/FirmwarePatcher/Binary/MachOParser.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/MachOParser.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Binary/MachOParser.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/MachOParser.swift
diff --git a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift
similarity index 99%
rename from Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift
index f0fded1c..52b6be6b 100644
--- a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift
@@ -17,8 +17,8 @@
import CryptoKit
import Foundation
import Img4tool
-import VPhoneArchive
-import VPhoneCore
+import VPhoneArchiveKit
+import VPhoneCoreKit
/// Patcher for the Filesystem payload.
public final class CryptexFilesystemPatcher: Patcher {
diff --git a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherAEA.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherAEA.swift
similarity index 97%
rename from Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherAEA.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherAEA.swift
index 9df66823..8274b6b9 100644
--- a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherAEA.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherAEA.swift
@@ -10,7 +10,7 @@
// of macOS.
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
extension Data {
init?(fromHexString hex: String) {
@@ -45,7 +45,7 @@ extension CryptexFilesystemPatcher {
// straight-line code on one thread, and this is the only step in it
// that touches the network. A semaphore here is the smallest thing that
// works; making the pipeline async would mean threading it through
- // every caller up to the CLI for one HTTPS GET.
+ // every caller up to the Command for one HTTPS GET.
return try vphoneRunBlocking { try await VPhoneAEA.symmetricKey(of: path) }
}
diff --git a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift
diff --git a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherFileOps.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherFileOps.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherFileOps.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherFileOps.swift
diff --git a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift
similarity index 95%
rename from Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift
index 855741ee..316e1ee1 100644
--- a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift
@@ -5,7 +5,7 @@
// launchd_cache_loader patches, vphoned, and its LaunchDaemon.
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
import VPhoneSign
extension CryptexFilesystemPatcher {
@@ -85,10 +85,6 @@ extension CryptexFilesystemPatcher {
),
)
try setMode(0o755, at: targetBin)
- let icli = try VPhoneGuestBinaries.resolve("icli")
- let targetIcli = target.appending(path: "/usr/bin/icli")
- try FileManager.default.copyItem(at: icli, to: targetIcli)
- try setMode(0o755, at: targetIcli)
}
/// Copy in the prebuilt guest daemon.
@@ -97,7 +93,7 @@ extension CryptexFilesystemPatcher {
/// sources shipped inside the .app — which meant installing CFW onto a VM
/// required Xcode and the iPhoneOS SDK on a machine whose only job is to run
/// that VM. vphoned is cross-compiled at build time now
- /// (`Scripts/build.sh`) and staged into the bundle.
+ /// by the Xcode guest target and staged into the bundle.
func stageVphoned(to vphonedBin: URL) throws {
let prebuilt = try VPhoneGuestBinaries.resolve("vphoned")
try FileManager.default.copyItem(at: prebuilt, to: vphonedBin)
diff --git a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherManifest.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherManifest.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherManifest.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherManifest.swift
diff --git a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherProcess.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherProcess.swift
similarity index 98%
rename from Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherProcess.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherProcess.swift
index 812b0ca4..659b2714 100644
--- a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherProcess.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherProcess.swift
@@ -2,7 +2,7 @@
//
// Split out of CryptexFilesystemPatcher.swift. Every external tool the merge drives — hdiutil,
// diskutil, ipsw, aa, cryptexctl, apfs_sealvolume — runs through runProcess, and ProcessError
-// is what it throws. What no longer runs through it: tar (VPhoneArchive), and chmod, chown, ln
+// is what it throws. What no longer runs through it: tar (VPhoneArchiveKit), and chmod, chown, ln
// and find (CryptexFilesystemPatcherFileOps.swift).
//
// There used to be a `sudo: Bool` parameter here that spawned `/usr/bin/whoami` and matched
diff --git a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherSealing.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherSealing.swift
similarity index 99%
rename from Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherSealing.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherSealing.swift
index 9f16ebb7..27c5cd7a 100644
--- a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherSealing.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherSealing.swift
@@ -54,7 +54,7 @@ extension CryptexFilesystemPatcher {
private func identifyApfsSealvolume() throws -> URL {
let iosVersion = try getProductVersion()
- // VPHONE_SEAL_DIR (set by the CLI's `fw prepare`/`fw patch`) must agree with
+ // VPHONE_SEAL_DIR (set by the Command's `fw prepare`/`fw patch`) must agree with
// wherever fw_prepare.sh's download_apfs_sealvolume() wrote the file; unset
// (manual development flow) falls back to the historical repo-relative `.tools/`.
let sealDir = ProcessInfo.processInfo.environment["VPHONE_SEAL_DIR"].map { URL(fileURLWithPath: $0) }
diff --git a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsDropbear.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsDropbear.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsDropbear.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsDropbear.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareMachLookupExceptions.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachLookupExceptions.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareMachLookupExceptions.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachLookupExceptions.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareCacheLoader+Results.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+Results.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareCacheLoader+Results.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+Results.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareCacheLoader+StringAnchor.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareCacheLoader+StringAnchor.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareCacheLoader.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareCacheLoader.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareDiskImage+DynamicMetadata.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage+DynamicMetadata.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareDiskImage+DynamicMetadata.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage+DynamicMetadata.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareDiskImage.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareDiskImage.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareJetsam.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsam.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareJetsam.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsam.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareJetsamDiscovery.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsamDiscovery.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareJetsamDiscovery.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsamDiscovery.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareMobileActivation+Anchoring.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation+Anchoring.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareMobileActivation+Anchoring.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation+Anchoring.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareMobileActivation.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareMobileActivation.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareSeputil.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Sep/CustomFirmwareSeputil.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareSeputil.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Sep/CustomFirmwareSeputil.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareWatchDog.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareWatchDog.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareWatchDogDiscovery.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogDiscovery.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareWatchDogDiscovery.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogDiscovery.swift
diff --git a/Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareWatchDogSymbolTargets.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogSymbolTargets.swift
similarity index 100%
rename from Sources/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareWatchDogSymbolTargets.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogSymbolTargets.swift
diff --git a/Sources/FirmwarePatcher/DeviceTree/DeviceTreeNodeAdditions.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeNodeAdditions.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DeviceTree/DeviceTreeNodeAdditions.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeNodeAdditions.swift
diff --git a/Sources/FirmwarePatcher/DeviceTree/DeviceTreePatchDefinitions.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatchDefinitions.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DeviceTree/DeviceTreePatchDefinitions.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatchDefinitions.swift
diff --git a/Sources/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift
diff --git a/Sources/FirmwarePatcher/DeviceTree/DeviceTreePropertyPatches.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePropertyPatches.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DeviceTree/DeviceTreePropertyPatches.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePropertyPatches.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheChunkSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheChunkSet.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheChunkSet.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheChunkSet.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheError.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheError.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheError.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheError.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheLocalSymbolTable.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheLocalSymbolTable.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheLocalSymbolTable.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheLocalSymbolTable.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheSymbolResolver.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheSymbolResolver.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/DyldSharedCacheSymbolResolver.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheSymbolResolver.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheCameraPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheCameraPatcher.swift
similarity index 99%
rename from Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheCameraPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheCameraPatcher.swift
index 7583c7ff..bd8833cb 100644
--- a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheCameraPatcher.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheCameraPatcher.swift
@@ -50,7 +50,7 @@
// already the replacement is recognised as such and rewritten inertly, so a
// second install re-attests rather than throwing.
//
-// CLI contract preserved from the Python
+// Command contract preserved from the Python
// --------------------------------------
//
// cfw.py patch-camera-dsc <chunks_dir> <dsc_header> [--dry-run] [--force]
@@ -63,7 +63,7 @@
// unsuffixed chunk inside it, which the Python needed only because `ipsw` wants
// a file rather than a directory. `applyAll` therefore takes the directory
// alone and finds the header itself; `symbolCacheURL` still lets a caller name
-// the header separately, which is the only part of the two-argument shape a CLI
+// the header separately, which is the only part of the two-argument shape a Command
// wrapper has to keep accepting.
//
// `--avf-only` is `applyAVFAuthorizationOnly`: the composition mode for a chunk
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher+MachOStringSites.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher+MachOStringSites.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher+MachOStringSites.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher+MachOStringSites.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMaxSlidePatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMaxSlidePatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMaxSlidePatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMaxSlidePatcher.swift
diff --git a/Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift
diff --git a/Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootArgs.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootArgs.swift
similarity index 100%
rename from Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootArgs.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootArgs.swift
diff --git a/Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift
similarity index 100%
rename from Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift
diff --git a/Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchImage4Callback.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchImage4Callback.swift
similarity index 100%
rename from Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchImage4Callback.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchImage4Callback.swift
diff --git a/Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchPanicBypass.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchPanicBypass.swift
similarity index 100%
rename from Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchPanicBypass.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchPanicBypass.swift
diff --git a/Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift
similarity index 100%
rename from Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift
diff --git a/Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchSerialLabels.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchSerialLabels.swift
similarity index 100%
rename from Sources/FirmwarePatcher/IBoot/BasePatches/IBootPatchSerialLabels.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchSerialLabels.swift
diff --git a/Sources/FirmwarePatcher/IBoot/IBootJailbreakPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootJailbreakPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/IBoot/IBootJailbreakPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootJailbreakPatcher.swift
diff --git a/Sources/FirmwarePatcher/IBoot/IBootPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/IBoot/IBootPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootPatcher.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchApfsGraft.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsGraft.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchApfsGraft.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsGraft.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchApfsMount.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchApfsMount.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchApfsSeal.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSeal.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchApfsSeal.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSeal.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchApfsSnapshot.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSnapshot.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchApfsSnapshot.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSnapshot.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchDebugger.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDebugger.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchDebugger.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDebugger.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchDyldPolicy.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDyldPolicy.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchDyldPolicy.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDyldPolicy.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchExcGuard.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchExcGuard.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchExcGuard.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchExcGuard.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchLaunchConstraints.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchLaunchConstraints.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchLaunchConstraints.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchLaunchConstraints.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchPostValidation.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchPostValidation.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchSandbox.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchSandbox.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift
diff --git a/Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchBsdInit.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Startup/KernelPatchBsdInit.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/BasePatches/KernelPatchBsdInit.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Startup/KernelPatchBsdInit.swift
diff --git a/Sources/FirmwarePatcher/Kernel/ExperimentalPatches/KernelExperimentalPatchHvVmmRename.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/ExperimentalPatches/KernelExperimentalPatchHvVmmRename.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/ExperimentalPatches/KernelExperimentalPatchHvVmmRename.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/ExperimentalPatches/KernelExperimentalPatchHvVmmRename.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchAmfiExecve.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchAmfiExecve.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchAmfiExecve.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchAmfiExecve.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchAmfiTrustcache.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchAmfiTrustcache.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchAmfiTrustcache.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchAmfiTrustcache.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchCredLabel.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchCredLabel.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchCredLabel.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchCredLabel.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchHookCredLabel.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchHookCredLabel.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchHookCredLabel.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchHookCredLabel.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchLoadDylinker.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchLoadDylinker.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchLoadDylinker.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchLoadDylinker.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchPostValidation.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchPostValidation.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchPostValidation.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/CodeSigning/KernelJailbreakPatchPostValidation.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Drivers/KernelJailbreakPatchIomfbSwap.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Drivers/KernelJailbreakPatchIomfbSwap.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Drivers/KernelJailbreakPatchIomfbSwap.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Drivers/KernelJailbreakPatchIomfbSwap.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Drivers/KernelJailbreakPatchNvram.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Drivers/KernelJailbreakPatchNvram.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Drivers/KernelJailbreakPatchNvram.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Drivers/KernelJailbreakPatchNvram.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Frida/KernelJailbreakPatchThreadSetState.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Frida/KernelJailbreakPatchThreadSetState.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Frida/KernelJailbreakPatchThreadSetState.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Frida/KernelJailbreakPatchThreadSetState.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Frida/KernelJailbreakPatchVmMapDelete.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Frida/KernelJailbreakPatchVmMapDelete.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Frida/KernelJailbreakPatchVmMapDelete.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Frida/KernelJailbreakPatchVmMapDelete.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchPortToMap.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchPortToMap.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchPortToMap.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchPortToMap.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchSharedRegion.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchSharedRegion.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchSharedRegion.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchSharedRegion.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchVmFault.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchVmFault.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchVmFault.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchVmFault.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchVmProtect.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchVmProtect.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchVmProtect.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Memory/KernelJailbreakPatchVmProtect.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchKcall10.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchKcall10.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchKcall10.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchKcall10.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchProcPidinfo.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchProcPidinfo.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchProcPidinfo.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchProcPidinfo.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchSpawnPersona.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchSpawnPersona.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchSpawnPersona.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchSpawnPersona.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchSyscallmask.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchSyscallmask.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchSyscallmask.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchSyscallmask.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchTaskConversion.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchTaskConversion.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchTaskConversion.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchTaskConversion.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchTaskForPid.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchTaskForPid.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchTaskForPid.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchTaskForPid.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchThidCrash.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchThidCrash.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchThidCrash.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Process/KernelJailbreakPatchThidCrash.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchContainerUpcall.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchContainerUpcall.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchContainerUpcall.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchContainerUpcall.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchExecPolicyKill.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchExecPolicyKill.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchExecPolicyKill.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchExecPolicyKill.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchFpfsScopedOpen.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchFpfsScopedOpen.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchFpfsScopedOpen.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchFpfsScopedOpen.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchIoucMacf.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchIoucMacf.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchIoucMacf.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchIoucMacf.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchIoucSandbox.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchIoucSandbox.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchIoucSandbox.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchIoucSandbox.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchMacMount.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchMacMount.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchMacMount.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchMacMount.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchProcSecurity.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchProcSecurity.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchProcSecurity.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchProcSecurity.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchSandboxExtended.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchSandboxExtended.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchSandboxExtended.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Sandbox/KernelJailbreakPatchSandboxExtended.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchBsdInitAuth.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchBsdInitAuth.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchBsdInitAuth.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchBsdInitAuth.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchDiskImages2.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchDiskImages2.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchDiskImages2.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchDiskImages2.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchDounmount.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchDounmount.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchDounmount.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchDounmount.swift
diff --git a/Sources/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchSecureRoot.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchSecureRoot.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchSecureRoot.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/JailbreakPatches/Storage/KernelJailbreakPatchSecureRoot.swift
diff --git a/Sources/FirmwarePatcher/Kernel/KernelExperimentalPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelExperimentalPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/KernelExperimentalPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelExperimentalPatcher.swift
diff --git a/Sources/FirmwarePatcher/Kernel/KernelJailbreakPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelJailbreakPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/KernelJailbreakPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelJailbreakPatcher.swift
diff --git a/Sources/FirmwarePatcher/Kernel/KernelJailbreakPatcherBase.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelJailbreakPatcherBase.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/KernelJailbreakPatcherBase.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelJailbreakPatcherBase.swift
diff --git a/Sources/FirmwarePatcher/Kernel/KernelPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/KernelPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcher.swift
diff --git a/Sources/FirmwarePatcher/Kernel/KernelPatcherBase.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Kernel/KernelPatcherBase.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift
diff --git a/Sources/FirmwarePatcher/Manifest/FirmwareManifest.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Manifest/FirmwareManifest.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Manifest/FirmwareManifest.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Manifest/FirmwareManifest.swift
diff --git a/Sources/FirmwarePatcher/Manifest/ManifestHashPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Manifest/ManifestHashPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Manifest/ManifestHashPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Manifest/ManifestHashPatcher.swift
diff --git a/Sources/FirmwarePatcher/PatchInfrastructure/PatchRecord.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchInfrastructure/PatchRecord.swift
similarity index 100%
rename from Sources/FirmwarePatcher/PatchInfrastructure/PatchRecord.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchInfrastructure/PatchRecord.swift
diff --git a/Sources/FirmwarePatcher/PatchInfrastructure/PatcherError.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchInfrastructure/PatcherError.swift
similarity index 100%
rename from Sources/FirmwarePatcher/PatchInfrastructure/PatcherError.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchInfrastructure/PatcherError.swift
diff --git a/Sources/FirmwarePatcher/PatchInfrastructure/PatcherProtocol.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchInfrastructure/PatcherProtocol.swift
similarity index 100%
rename from Sources/FirmwarePatcher/PatchInfrastructure/PatcherProtocol.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchInfrastructure/PatcherProtocol.swift
diff --git a/Sources/FirmwarePatcher/Pipeline/FirmwarePipeline.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipeline.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Pipeline/FirmwarePipeline.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipeline.swift
diff --git a/Sources/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift
diff --git a/Sources/FirmwarePatcher/Pipeline/FirmwarePipelineDiscovery.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineDiscovery.swift
similarity index 100%
rename from Sources/FirmwarePatcher/Pipeline/FirmwarePipelineDiscovery.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineDiscovery.swift
diff --git a/Sources/FirmwarePatcher/TXM/TXMDevPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/TXM/TXMDevPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift
diff --git a/Sources/FirmwarePatcher/TXM/TXMPatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift
similarity index 100%
rename from Sources/FirmwarePatcher/TXM/TXMPatcher.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift
diff --git a/Tests/FirmwarePatcherTests/Fixtures/DylibInjection/hello.m b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTestFixtures/DylibInjection/hello.m
similarity index 100%
rename from Tests/FirmwarePatcherTests/Fixtures/DylibInjection/hello.m
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTestFixtures/DylibInjection/hello.m
diff --git a/Tests/FirmwarePatcherTests/Fixtures/DylibInjection/swizzle.m b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTestFixtures/DylibInjection/swizzle.m
similarity index 100%
rename from Tests/FirmwarePatcherTests/Fixtures/DylibInjection/swizzle.m
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTestFixtures/DylibInjection/swizzle.m
diff --git a/Tests/FirmwarePatcherTests/ARM64EncoderTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/ARM64EncoderTests.swift
similarity index 100%
rename from Tests/FirmwarePatcherTests/ARM64EncoderTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/ARM64EncoderTests.swift
diff --git a/Tests/FirmwarePatcherTests/CryptexFileOpsTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/CryptexFileOpsTests.swift
similarity index 100%
rename from Tests/FirmwarePatcherTests/CryptexFileOpsTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/CryptexFileOpsTests.swift
diff --git a/Tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwareManifestSelectionTests.swift
similarity index 100%
rename from Tests/FirmwarePatcherTests/FirmwareManifestSelectionTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwareManifestSelectionTests.swift
diff --git a/Tests/FirmwarePatcherTests/FirmwarePatcherTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwarePatcherTests.swift
similarity index 98%
rename from Tests/FirmwarePatcherTests/FirmwarePatcherTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwarePatcherTests.swift
index 63169007..c89a6b28 100644
--- a/Tests/FirmwarePatcherTests/FirmwarePatcherTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwarePatcherTests.swift
@@ -441,6 +441,8 @@ struct IBootPatcherIdempotencyTests {
struct IM4PPayloadParityTests {
@Test func `ibss IM 4 P payload matches raw and JB patcher finds nonce patch`() throws {
let baseDir = URL(fileURLWithPath: #filePath)
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
@@ -460,6 +462,8 @@ struct IM4PPayloadParityTests {
@Test func `saving IBSSIM 4 P round trips payload`() throws {
let baseDir = URL(fileURLWithPath: #filePath)
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
@@ -483,6 +487,8 @@ struct IM4PPayloadParityTests {
@Test func `saving TXMIM 4 P preserves PAYP trailer`() throws {
let baseDir = URL(fileURLWithPath: #filePath)
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
diff --git a/Tests/FirmwarePatcherTests/MachOParserBoundsTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/MachOParserBoundsTests.swift
similarity index 100%
rename from Tests/FirmwarePatcherTests/MachOParserBoundsTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/MachOParserBoundsTests.swift
diff --git a/Tests/FirmwarePatcherTests/PatchComparisonTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/PatchComparisonTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift
index 863f1fb8..d841c73f 100644
--- a/Tests/FirmwarePatcherTests/PatchComparisonTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift
@@ -51,6 +51,8 @@ private struct TXMDevReference: Decodable {
// MARK: - Test helpers
private let baseDir = URL(fileURLWithPath: #filePath)
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
diff --git a/Tests/FirmwarePatcherTests/VerboseJailbreakDebug.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/VerboseJailbreakDebug.swift
similarity index 94%
rename from Tests/FirmwarePatcherTests/VerboseJailbreakDebug.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/VerboseJailbreakDebug.swift
index b93d8353..80c54c45 100644
--- a/Tests/FirmwarePatcherTests/VerboseJailbreakDebug.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/VerboseJailbreakDebug.swift
@@ -5,6 +5,8 @@ import Testing
struct VerboseJailbreakDebug {
@Test func `debug failing patches`() throws {
let baseDir = URL(fileURLWithPath: #filePath)
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
diff --git a/Tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareCacheLoaderTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareCacheLoaderTests.swift
index cc612465..7a729a23 100644
--- a/Tests/FirmwarePatcherTests/CustomFirmwareCacheLoaderTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareCacheLoaderTests.swift
@@ -32,6 +32,8 @@ private enum CacheLoaderFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// The read-only reference binary.
static var pristine: URL? {
diff --git a/Tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareDaemonsTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareDaemonsTests.swift
index 651d7de6..5eaf4eb3 100644
--- a/Tests/FirmwarePatcherTests/CustomFirmwareDaemonsTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareDaemonsTests.swift
@@ -88,6 +88,8 @@ enum CustomFirmwareDaemonsFixtures {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
static let buildManifest = repositoryRoot.appending(path: "ipsws/ref_extract/iphone/BuildManifest.plist")
static let cfwInputArchive = repositoryRoot.appending(path: "scripts/resources/cfw_input.tar.zst")
diff --git a/Tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareDiskImageTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareDiskImageTests.swift
index 62c9355b..8f232af2 100644
--- a/Tests/FirmwarePatcherTests/CustomFirmwareDiskImageTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareDiskImageTests.swift
@@ -42,6 +42,8 @@ private enum DiskImagesFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// The read-only reference tree of standalone Mach-O binaries.
static var pristineDirectory: URL? {
diff --git a/Tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareJetsamTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareJetsamTests.swift
index 669c0178..fb1c9323 100644
--- a/Tests/FirmwarePatcherTests/CustomFirmwareJetsamTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareJetsamTests.swift
@@ -31,8 +31,10 @@ enum JetsamFixture {
/// The package root, derived from this file rather than the working
/// directory, which `swift test` does not promise.
static let repositoryRoot = URL(filePath: #filePath)
+ .deletingLastPathComponent() // CustomFirmware
.deletingLastPathComponent() // FirmwarePatcherTests
- .deletingLastPathComponent() // tests
+ .deletingLastPathComponent() // VPhoneCommand
+ .deletingLastPathComponent() // VPhoneExecutable
.deletingLastPathComponent() // <root>
/// The real, ad-hoc signed, thin arm64e `/sbin/launchd`.
diff --git a/Tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMachOTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMachOTests.swift
index 54a28255..4c8a4087 100644
--- a/Tests/FirmwarePatcherTests/CustomFirmwareMachOTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMachOTests.swift
@@ -40,8 +40,10 @@ enum MachOFixture {
/// The package root, derived from this file rather than the working
/// directory, which `swift test` does not promise.
static let repositoryRoot = URL(filePath: #filePath)
+ .deletingLastPathComponent() // CustomFirmware
.deletingLastPathComponent() // FirmwarePatcherTests
- .deletingLastPathComponent() // tests
+ .deletingLastPathComponent() // VPhoneCommand
+ .deletingLastPathComponent() // VPhoneExecutable
.deletingLastPathComponent() // <root>
/// The tree of untouched Mach-Os, overridable the way every other CFW
@@ -546,7 +548,7 @@ struct CustomFirmwareInjectDylibTests {
/// command actually makes dyld run the swizzle before main().
@Test func `injected Objective-C swizzle changes hello world output`() throws {
let fixtures = MachOFixture.repositoryRoot
- .appending(path: "Tests/FirmwarePatcherTests/Fixtures/DylibInjection")
+ .appending(path: "VPhoneExecutable/VPhoneCommand/FirmwarePatcherTestFixtures/DylibInjection")
let directory = FileManager.default.temporaryDirectory
.appending(path: "DylibInjection-\(UUID().uuidString)")
try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
diff --git a/Tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMobileActivationTests.swift
similarity index 100%
rename from Tests/FirmwarePatcherTests/CustomFirmwareMobileActivationTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMobileActivationTests.swift
diff --git a/Tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwarePlistPatchTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwarePlistPatchTests.swift
index 4d55d6a9..f90fcf0f 100644
--- a/Tests/FirmwarePatcherTests/CustomFirmwarePlistPatchTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwarePlistPatchTests.swift
@@ -87,11 +87,13 @@ enum CustomFirmwarePlistPatchGolden {
// MARK: - Fixtures
enum CustomFirmwarePatchFixtures {
- /// Tests/FirmwarePatcherTests/<this file> → repo root.
+ /// VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/<this file> → repo root.
static let repoRoot = URL(filePath: #filePath)
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// A real Apple SystemVersion.plist, in XML, with a real ProductBuildVersion.
static let systemVersionPlist = URL(filePath: "/System/Library/CoreServices/SystemVersion.plist")
diff --git a/Tests/FirmwarePatcherTests/CustomFirmwareSeputilTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareSeputilTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/CustomFirmwareSeputilTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareSeputilTests.swift
index ae632993..a4c0470e 100644
--- a/Tests/FirmwarePatcherTests/CustomFirmwareSeputilTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareSeputilTests.swift
@@ -3,7 +3,7 @@
// Two independent references, and every claim below is measured against one of
// them rather than against a number written down by hand:
//
-// * `scripts/patchers/cfw_patch_seputil.py`, driven through the exact CLI
+// * `scripts/patchers/cfw_patch_seputil.py`, driven through the exact Command
// `scripts/cfw_install.sh` called — `cfw.py patch-seputil <binary>`. That
// Python is gone; what it produced on this fixture is frozen in
// ``SeputilGolden`` below, digest by digest, so the comparison survives it.
@@ -46,6 +46,8 @@ private enum SeputilFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
static let binaryName = "seputil"
diff --git a/Tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareWatchDogTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareWatchDogTests.swift
index 0117007a..6bdd9f92 100644
--- a/Tests/FirmwarePatcherTests/CustomFirmwareWatchDogTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareWatchDogTests.swift
@@ -30,8 +30,10 @@ enum WatchdogdFixture {
/// The package root, derived from this file rather than the working
/// directory, which `swift test` does not promise.
static let repositoryRoot = URL(filePath: #filePath)
+ .deletingLastPathComponent() // CustomFirmware
.deletingLastPathComponent() // FirmwarePatcherTests
- .deletingLastPathComponent() // tests
+ .deletingLastPathComponent() // VPhoneCommand
+ .deletingLastPathComponent() // VPhoneExecutable
.deletingLastPathComponent() // <root>
static let pristineDirectory = repositoryRoot.appending(path: "ipsws/ref_extract/macho_pristine")
diff --git a/Tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheCameraPatcherTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheCameraPatcherTests.swift
index 133734fb..34ce04de 100644
--- a/Tests/FirmwarePatcherTests/DyldSharedCacheCameraPatcherTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheCameraPatcherTests.swift
@@ -149,6 +149,8 @@ private enum CameraFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// The read-only reference cache.
static var pristine: URL? {
diff --git a/Tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheFoundationTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheFoundationTests.swift
index 36b3d2b4..66c79e2d 100644
--- a/Tests/FirmwarePatcherTests/DyldSharedCacheFoundationTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheFoundationTests.swift
@@ -249,6 +249,8 @@ private enum DyldSharedCacheFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// The read-only reference cache.
static var pristine: URL? {
diff --git a/Tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift
index 72fbdca8..faf3cda6 100644
--- a/Tests/FirmwarePatcherTests/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheHypervisorVirtualMachinePatcherTests.swift
@@ -258,6 +258,8 @@ private enum HypervisorVirtualMachineFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// The read-only reference cache.
static var pristine: URL? {
diff --git a/Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheIOMFBForceKernTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheIOMFBForceKernTests.swift
index 8285a2fd..1daf7141 100644
--- a/Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBForceKernTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheIOMFBForceKernTests.swift
@@ -292,6 +292,8 @@ private enum ForceKernFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
static let imagePath =
"/System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer"
diff --git a/Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheIOMFBSwapEndTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheIOMFBSwapEndTests.swift
index faa15b6f..02b54011 100644
--- a/Tests/FirmwarePatcherTests/DyldSharedCacheIOMFBSwapEndTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheIOMFBSwapEndTests.swift
@@ -108,6 +108,8 @@ private enum SwapEndFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// The read-only reference cache. Never written to.
static var pristine: URL? {
diff --git a/Tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheLSDEmbeddedRegTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheLSDEmbeddedRegTests.swift
index 1d63a386..89d1b078 100644
--- a/Tests/FirmwarePatcherTests/DyldSharedCacheLSDEmbeddedRegTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheLSDEmbeddedRegTests.swift
@@ -87,6 +87,8 @@ private enum LSDRegFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// The read-only reference cache.
static var pristine: URL? {
diff --git a/Tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheLockdownModePatcherTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheLockdownModePatcherTests.swift
index ef5f62fe..25eecebb 100644
--- a/Tests/FirmwarePatcherTests/DyldSharedCacheLockdownModePatcherTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheLockdownModePatcherTests.swift
@@ -80,6 +80,8 @@ private enum LockdownFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// The read-only reference cache.
static var pristine: URL? {
diff --git a/Tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheMaxSlidePatcherTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheMaxSlidePatcherTests.swift
index ec007a8d..8ca043a6 100644
--- a/Tests/FirmwarePatcherTests/DyldSharedCacheMaxSlidePatcherTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheMaxSlidePatcherTests.swift
@@ -2,7 +2,7 @@
//
// There is no `codesign -v` for a dyld shared cache chunk and no second
// implementation of this patch anywhere. The only independent reference was
-// `scripts/patchers/cfw_patch_dsc_maxslide.py`, driven through the CLI the
+// `scripts/patchers/cfw_patch_dsc_maxslide.py`, driven through the Command the
// install scripts use: `cfw.py patch-dsc-maxslide <dir> [--dry-run] [--force]`.
// That Python has been removed, so what it produced is frozen in
// `FrozenReference` below — for the real cache, and for each of the five
@@ -143,6 +143,8 @@ private enum MaxSlideFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
static let mainChunkName = "dyld_shared_cache_arm64e"
diff --git a/Tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheXPCLWCRPatcherTests.swift
similarity index 99%
rename from Tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swift
rename to VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheXPCLWCRPatcherTests.swift
index 01c09188..9b48b5c3 100644
--- a/Tests/FirmwarePatcherTests/DyldSharedCacheXPCLWCRPatcherTests.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheXPCLWCRPatcherTests.swift
@@ -87,6 +87,8 @@ private enum LWCRFixture {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
+ .deletingLastPathComponent()
/// The read-only reference cache.
static var pristine: URL? {
diff --git a/Sources/VPhoneArchiveCLI/main.swift b/VPhoneExecutable/VPhoneCommand/Sources/Archive/VPhoneArchiveCommand.swift
similarity index 96%
rename from Sources/VPhoneArchiveCLI/main.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Archive/VPhoneArchiveCommand.swift
index 435fd920..27da47a4 100644
--- a/Sources/VPhoneArchiveCLI/main.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Archive/VPhoneArchiveCommand.swift
@@ -1,4 +1,4 @@
-// vphone-archive — unpacking and packing, without four external programs.
+// vphone-cli archive — unpacking and packing, without external programs.
//
// Replaces gtar, bsdtar, unzip and zstd. The last of those is the reason this
// exists at all: neither the system tar nor GNU tar can read a .zst without a
@@ -6,17 +6,16 @@
// in /usr/lib or in the SDK. The libarchive this links has it compiled in, so
// a machine with no Homebrew can still install CFW.
//
-// The shell scripts call this while they are still shell; vphone-cli calls the
-// same library in-process. One implementation either way.
+// This command calls the statically linked archive library in-process.
import ArgumentParser
import Foundation
-import VPhoneArchive
-import VPhoneCore
+import VPhoneArchiveKit
+import VPhoneCoreKit
-struct VPhoneArchiveCLI: ParsableCommand {
+struct VPhoneArchiveCommand: ParsableCommand {
static let configuration = CommandConfiguration(
- commandName: "vphone-archive",
+ commandName: "archive",
abstract: "Unpack and pack archives",
discussion: """
The compressor is detected when reading, so there is no --zstd to pass
@@ -319,5 +318,3 @@ struct Fingerprint: ParsableCommand {
print("identical (\(first.entries.count) entries)")
}
}
-
-VPhoneArchiveCLI.main()
diff --git a/Sources/VPhoneCLI/VPhoneCustomFirmwareDyldSharedCacheVerbsCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift
similarity index 99%
rename from Sources/VPhoneCLI/VPhoneCustomFirmwareDyldSharedCacheVerbsCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift
index 2964618b..61816eb0 100644
--- a/Sources/VPhoneCLI/VPhoneCustomFirmwareDyldSharedCacheVerbsCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift
@@ -1,4 +1,4 @@
-// VPhoneCustomFirmwareDyldSharedCacheVerbsCLI.swift — `cfw` verbs for the dyld-shared-cache patchers.
+// VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift — `cfw` verbs for the dyld-shared-cache patchers.
//
// Each command here is a thin face over a type in `FirmwarePatcher/DSC/Patchers/`,
// and each one answers to the same verb name, the same positional arguments and
diff --git a/Sources/VPhoneCLI/VPhoneCustomFirmwareInstaller.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareInstaller.swift
similarity index 92%
rename from Sources/VPhoneCLI/VPhoneCustomFirmwareInstaller.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareInstaller.swift
index 0c988f50..952f73e3 100644
--- a/Sources/VPhoneCLI/VPhoneCustomFirmwareInstaller.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareInstaller.swift
@@ -2,7 +2,7 @@ import ArgumentParser
import Darwin
import FirmwarePatcher
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
import VPhoneSign
/// Host-side JB system installation. The VM must be off: all writes go to its
@@ -24,15 +24,7 @@ struct VPhoneCustomFirmwareInstaller {
bundle: URL,
resources: VPhoneResources,
forceDyldSharedCacheMaxSlide: Bool,
- rootPopup: Bool,
- environment: [String: String] = [:],
- verbose: Bool = true,
) throws -> Int32 {
- let exe = VPhoneResources.runningExecutable()
- var args = ["cfw", "install-root", bundle.path, "--resources", resources.base.path]
- if forceDyldSharedCacheMaxSlide {
- args.append("--force-dsc-maxslide")
- }
if geteuid() == 0 {
try VPhoneCustomFirmwareInstaller(
bundle: bundle,
@@ -41,33 +33,18 @@ struct VPhoneCustomFirmwareInstaller {
).run()
return 0
}
- if rootPopup {
- var env = environment
- env["SUDO_USER"] = NSUserName()
- env["SUDO_UID"] = String(getuid())
- return try VPhoneProcessRunner.runWithAdminPrivileges(
- exe,
- args,
- env: env,
- echo: verbose,
- )
- }
- var env = ProcessInfo.processInfo.environment
- env.merge(environment) { _, new in new }
- args.insert(contentsOf: ["-E", exe.path], at: 0)
- if env["SUDO_ASKPASS"] != nil {
- args.insert("-A", at: 0)
- }
- return try VPhoneProcessRunner.runForeground(
- URL(fileURLWithPath: "/usr/bin/sudo"),
- args,
- env: env,
- echo: verbose,
- )
+ throw ValidationError("CFW installation needs root. Run this command with sudo.")
}
func run() throws {
guard geteuid() == 0 else { throw ValidationError("CFW install requires administrator privileges") }
+ let invokingUser = VPhoneInvokingUser.current
+ defer {
+ if let invokingUser {
+ do { try invokingUser.restoreOwnership(at: bundle) }
+ catch { fputs("warning: could not restore VM ownership: \(error)\n", stderr) }
+ }
+ }
let diskImage = bundle.appendingPathComponent("Disk.img")
guard fm.fileExists(atPath: diskImage.path) else {
throw ValidationError("Disk.img is missing: \(diskImage.path)")
@@ -124,12 +101,6 @@ struct VPhoneCustomFirmwareInstaller {
_ = try tool("/usr/bin/hdiutil", ["detach", baseDisk], quiet: true)
try fm.removeItem(at: work)
try VPhoneAPFSSnapshot.rename(imageAt: diskImage)
- if let uid = ProcessInfo.processInfo.environment["SUDO_UID"].flatMap(UInt32.init) {
- let signed = bundle.appendingPathComponent(".vphoned.signed")
- if fm.fileExists(atPath: signed.path) {
- _ = chown(signed.path, uid, gid_t.max)
- }
- }
print("[+] JB system install complete; vphoned is installed, no package bootstrap was staged")
}
@@ -290,8 +261,6 @@ struct VPhoneCustomFirmwareInstaller {
try VPhoneSigner.sign(fileAt: staged,
options: .init(entitlements: entitlements, mergesExisting: true))
try replace(staged, at: system.appendingPathComponent("usr/bin/vphoned"), mode: 0o755)
- let icli = try VPhoneGuestBinaries.resolve("icli")
- try replace(icli, at: system.appendingPathComponent("usr/bin/icli"), mode: 0o755)
let signed = bundle.appendingPathComponent(".vphoned.signed")
if fm.fileExists(atPath: signed.path) {
try fm.removeItem(at: signed)
diff --git a/Sources/VPhoneCLI/VPhoneCustomFirmwareMachOVerbsCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift
similarity index 99%
rename from Sources/VPhoneCLI/VPhoneCustomFirmwareMachOVerbsCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift
index bb412e4e..c7116ef0 100644
--- a/Sources/VPhoneCLI/VPhoneCustomFirmwareMachOVerbsCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift
@@ -1,4 +1,4 @@
-// VPhoneCustomFirmwareMachOVerbsCLI.swift — `cfw` verbs for the standalone Mach-O patchers.
+// VPhoneCustomFirmwareMachOVerbsCommand.swift — `cfw` verbs for the standalone Mach-O patchers.
//
// Six faces over `FirmwarePatcher/CustomFirmware/ExecutablePatches/`, replacing
// `"$PYTHON3" scripts/patchers/cfw.py <verb> <binary>` in `cfw_install*.sh`,
@@ -23,7 +23,7 @@
// the binary on the next line, which rebuilds the signature whole.
//
// STDOUT. Each library type already prints its own progress, so — as with
-// `patch-build-version` and friends in VPhoneCustomFirmwarePatchCLI.swift — these commands
+// `patch-build-version` and friends in VPhoneCustomFirmwarePatchCommand.swift — these commands
// print nothing of their own. The Python writes every line to stdout, so the
// log closure is `print` even for the two types whose default is stderr.
//
diff --git a/Sources/VPhoneCLI/VPhoneCustomFirmwarePatchCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwarePatchCommand.swift
similarity index 99%
rename from Sources/VPhoneCLI/VPhoneCustomFirmwarePatchCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwarePatchCommand.swift
index c4770453..d4e18770 100644
--- a/Sources/VPhoneCLI/VPhoneCustomFirmwarePatchCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwarePatchCommand.swift
@@ -1,4 +1,4 @@
-// VPhoneCustomFirmwarePatchCLI.swift — the `cfw` subcommands that replace the Python patchers.
+// VPhoneCustomFirmwarePatchCommand.swift — the `cfw` subcommands that replace the Python patchers.
//
// Each one is a thin face over a type in `FirmwarePatcher/CustomFirmware/`. The Python they
// replace (`scripts/patchers/cfw.py` and friends) was removed once the
diff --git a/Sources/VPhoneCLI/VPhoneFirmwareAEACLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareAEACommand.swift
similarity index 97%
rename from Sources/VPhoneCLI/VPhoneFirmwareAEACLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareAEACommand.swift
index 63f14e3e..0821f0c2 100644
--- a/Sources/VPhoneCLI/VPhoneFirmwareAEACLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareAEACommand.swift
@@ -1,4 +1,4 @@
-// VPhoneFirmwareAEACLI.swift — `fw aea-key` and the two `fw im4p` verbs.
+// VPhoneFirmwareAEACommand.swift — `fw aea-key` and the two `fw im4p` verbs.
//
// These are the shapes `ipsw` was called in from the CFW installers and from
// fw_prepare.sh, and they are the last of them. `ipsw` is a fine program —
@@ -15,7 +15,7 @@ import ArgumentParser
import FirmwarePatcher
import Foundation
import Img4tool
-import VPhoneCore
+import VPhoneCoreKit
// MARK: - aea-key
diff --git a/Sources/VPhoneCLI/VPhoneFirmwareCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareCommand.swift
similarity index 99%
rename from Sources/VPhoneCLI/VPhoneFirmwareCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareCommand.swift
index f74cf64d..02c3ea6b 100644
--- a/Sources/VPhoneCLI/VPhoneFirmwareCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareCommand.swift
@@ -1,7 +1,7 @@
import ArgumentParser
import FirmwarePatcher
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
struct VPhoneFirmwareCommand: ParsableCommand {
static let configuration = CommandConfiguration(
diff --git a/Sources/VPhoneCLI/VPhoneFirmwareDownloadCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareDownloadCommand.swift
similarity index 98%
rename from Sources/VPhoneCLI/VPhoneFirmwareDownloadCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareDownloadCommand.swift
index e981347d..a86835a4 100644
--- a/Sources/VPhoneCLI/VPhoneFirmwareDownloadCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareDownloadCommand.swift
@@ -1,4 +1,4 @@
-// VPhoneFirmwareDownloadCLI.swift — `fw urls` and `fw seal-tool`.
+// VPhoneFirmwareDownloadCommand.swift — `fw urls` and `fw seal-tool`.
//
// The last two shapes `ipsw` was called in from scripts/fw_prepare.sh:
//
@@ -17,7 +17,7 @@ import ArgumentParser
import FirmwarePatcher
import Foundation
import Img4tool
-import VPhoneCore
+import VPhoneCoreKit
// MARK: - urls
diff --git a/Sources/VPhoneCLI/VPhoneFirmwarePreparer.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwarePreparer.swift
similarity index 94%
rename from Sources/VPhoneCLI/VPhoneFirmwarePreparer.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwarePreparer.swift
index c3dadf8f..a8f251b7 100644
--- a/Sources/VPhoneCLI/VPhoneFirmwarePreparer.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwarePreparer.swift
@@ -1,8 +1,8 @@
import Darwin
import FirmwarePatcher
import Foundation
-import VPhoneArchive
-import VPhoneCore
+import VPhoneArchiveKit
+import VPhoneCoreKit
/// Builds one restore tree from two IPSWs without a shell or a second full
/// copy of either source archive. All extraction and merging happens in one
@@ -90,15 +90,10 @@ enum VPhoneFirmwarePreparer {
)
}
- let archive = resources.gpuCompilerPluginArchive
- guard fm.fileExists(atPath: archive.path) else { throw Error.missingComponent(archive) }
- let unpacked = staging.appendingPathComponent("compiler-plugin")
- try fm.createDirectory(at: unpacked, withIntermediateDirectories: true)
+ let source = resources.gpuCompilerPlugin
+ guard fm.fileExists(atPath: source.path) else { throw Error.missingComponent(source) }
print("[*] Merging bundled GPU compiler plugin...")
- try VPhoneArchiveExtractor.extract(archive, into: unpacked, options: .intoHostDirectory)
let pluginName = "libAppleParavirtCompilerPluginIOGPUFamily.dylib"
- let source = unpacked.appendingPathComponent(pluginName)
- guard fm.fileExists(atPath: source.path) else { throw Error.missingComponent(source) }
let destinationPlugin = VPhonePCCGPUDriver.stagedBundle(in: phoneTree).appendingPathComponent(pluginName)
if fm.fileExists(atPath: destinationPlugin.path) {
try fm.removeItem(at: destinationPlugin)
diff --git a/Sources/VPhoneCLI/VPhoneFirmwareSourceSelection.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareSourceSelection.swift
similarity index 97%
rename from Sources/VPhoneCLI/VPhoneFirmwareSourceSelection.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareSourceSelection.swift
index 88293055..acf2aa10 100644
--- a/Sources/VPhoneCLI/VPhoneFirmwareSourceSelection.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneFirmwareSourceSelection.swift
@@ -1,5 +1,5 @@
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
enum VPhoneFirmwareSourceSelection {
private static var isTTY: Bool {
diff --git a/Sources/VPhoneCLI/VPhoneHostAutomationProbe.swift b/VPhoneExecutable/VPhoneCommand/Sources/Host/VPhoneHostAutomationProbe.swift
similarity index 100%
rename from Sources/VPhoneCLI/VPhoneHostAutomationProbe.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Host/VPhoneHostAutomationProbe.swift
diff --git a/Sources/VPhoneCLI/VPhoneHostPreflight.swift b/VPhoneExecutable/VPhoneCommand/Sources/Host/VPhoneHostPreflight.swift
similarity index 92%
rename from Sources/VPhoneCLI/VPhoneHostPreflight.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Host/VPhoneHostPreflight.swift
index 614b2b38..db09d53a 100644
--- a/Sources/VPhoneCLI/VPhoneHostPreflight.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Host/VPhoneHostPreflight.swift
@@ -1,9 +1,9 @@
import ArgumentParser
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
/// The launch gate shared by direct boot and VM-library boot. It checks the
-/// entitled companion itself, so an unentitled CLI starting successfully does
+/// entitled companion itself, so an unentitled Command starting successfully does
/// not give a false positive.
enum VPhoneHostPreflight {
static func check() throws -> VPhoneGuestLaunchPlanner {
@@ -26,6 +26,7 @@ struct VPhoneHostCommand: ParsableCommand {
)
}
+
struct VPhoneHostPreflightCommand: ParsableCommand {
static let configuration = CommandConfiguration(
commandName: "preflight",
diff --git a/Sources/VPhoneCLI/VPhonePCCGPURecovery.swift b/VPhoneExecutable/VPhoneCommand/Sources/Host/VPhonePCCGPURecovery.swift
similarity index 99%
rename from Sources/VPhoneCLI/VPhonePCCGPURecovery.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Host/VPhonePCCGPURecovery.swift
index 455bcf13..d5f457e1 100644
--- a/Sources/VPhoneCLI/VPhonePCCGPURecovery.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Host/VPhonePCCGPURecovery.swift
@@ -1,5 +1,5 @@
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
import VPhoneRestore
/// Restores the selected cloudOS firmware with this project's own VM and
diff --git a/Sources/VPhoneCLI/VPhoneRestoreCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/Restore/VPhoneRestoreCommand.swift
similarity index 93%
rename from Sources/VPhoneCLI/VPhoneRestoreCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Restore/VPhoneRestoreCommand.swift
index e3ea5fa7..1522a3f6 100644
--- a/Sources/VPhoneCLI/VPhoneRestoreCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Restore/VPhoneRestoreCommand.swift
@@ -1,6 +1,6 @@
import ArgumentParser
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
import VPhoneRestore
// MARK: - Verbosity → restore logging
@@ -163,13 +163,13 @@ struct VPhoneRecoveryProbeCommand: ParsableCommand {
struct VPhoneCustomFirmwareCommand: ParsableCommand {
static let configuration = CommandConfiguration(
commandName: "cfw",
- abstract: "Custom-firmware install (host-mount; VM must be off; re-execs sudo)",
+ abstract: "Custom-firmware install (host-mount; VM must be off)",
subcommands: [
VPhoneCustomFirmwareInstallCommand.self,
VPhoneCustomFirmwareInstallRootCommand.self,
VPhoneCustomFirmwareFlipSnapshotCommand.self,
// The per-step patchers the installers used to reach through
- // scripts/patchers/cfw.py for — see VPhoneCustomFirmwarePatchCLI.swift.
+ // scripts/patchers/cfw.py for — see VPhoneCustomFirmwarePatchCommand.swift.
VPhoneCustomFirmwareCryptexPathsCommand.self,
VPhoneCustomFirmwareInjectDaemonsCommand.self,
VPhoneCustomFirmwareInjectDaemonCommand.self,
@@ -231,33 +231,21 @@ struct VPhoneCustomFirmwareInstallCommand: ParsableCommand {
help: "Zero the dyld cache maxSlide on non-27 bases (opt-in DSC-map fit)",
)
var forceDyldSharedCacheMaxSlide = false
- @Flag(
- name: .customLong("root-popup"),
- help: "Elevate via macOS's native authentication dialog (osascript) instead of the sudo re-exec",
- )
- var rootPopup = false
@Flag(
name: .customLong("keep-artifacts"),
help: "Keep the extracted firmware after install (default: removed to save space)",
)
var keepArtifacts = false
- @Option(name: .shortAndLong, help: "Resource base override (default: inferred from the running binary path)")
- var projectRoot: String?
- @Flag(name: .customShort("v"), help: "Increase verbosity: -v tool detail, -vv guest serial, -vvv internal trace")
- var verboseCount: Int
func run() throws {
- let v = max(VPhoneVerbosity.info, VPhoneVerbosity(count: verboseCount))
let name = try VPhoneVirtualMachineSelection.resolveExisting(name, in: lib.library)
let bundle = try lib.library.bundle(named: name)
- let resources = projectRoot.map { VPhoneResources(base: URL(fileURLWithPath: $0)) } ?? .resolve()
+ let resources = VPhoneResources.resolve()
let code = try VPhoneCustomFirmwareInstaller.elevate(
bundle: bundle.url,
resources: resources,
forceDyldSharedCacheMaxSlide: forceDyldSharedCacheMaxSlide,
- rootPopup: rootPopup,
- verbose: v.showsToolDetail,
)
if code == 0 {
if let info = try? VPhoneRestoreInfo.recordVariant("jb", toBundle: bundle), info.variant != nil {
diff --git a/Sources/VPhoneCLI/VPhoneSignCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/Signing/VPhoneSignCommand.swift
similarity index 98%
rename from Sources/VPhoneCLI/VPhoneSignCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Signing/VPhoneSignCommand.swift
index 5f80e57c..750d7b31 100644
--- a/Sources/VPhoneCLI/VPhoneSignCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/Signing/VPhoneSignCommand.swift
@@ -1,4 +1,4 @@
-// VPhoneSignCLI.swift — `sign` and `dump-entitlements`, which replace ldid.
+// VPhoneSignCommand.swift — `sign` and `dump-entitlements`, which replace ldid.
//
// ldid is the one program this project shipped that links Homebrew
// (libcrypto.3, libplist-2.0.4), and so the one thing that failed the
diff --git a/Sources/VPhoneCLI/VPhoneProgressBar.swift b/VPhoneExecutable/VPhoneCommand/Sources/Support/VPhoneProgressBar.swift
similarity index 100%
rename from Sources/VPhoneCLI/VPhoneProgressBar.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/Support/VPhoneProgressBar.swift
diff --git a/Sources/VPhoneCLI/VPhoneCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/VPhoneCommand.swift
similarity index 93%
rename from Sources/VPhoneCLI/VPhoneCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/VPhoneCommand.swift
index ec8468b8..371521a0 100644
--- a/Sources/VPhoneCLI/VPhoneCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/VPhoneCommand.swift
@@ -1,27 +1,28 @@
import ArgumentParser
import FirmwarePatcher
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
-struct VPhoneCLI: ParsableCommand {
+struct VPhoneCommand: ParsableCommand {
static let configuration = CommandConfiguration(
commandName: "vphone-cli",
abstract: "Boot a virtual iPhone or patch firmware with the Swift pipeline",
subcommands: [
- VPhoneBootCLI.self, PatchFirmwareCLI.self, PatchComponentCLI.self, VPhoneVirtualMachineCommand.self,
+ VPhoneBootCommand.self, PatchFirmwareCommand.self, PatchComponentCommand.self, VPhoneVirtualMachineCommand.self,
VPhoneFirmwareCommand.self, VPhoneRestoreCommand.self, VPhoneRecoveryProbeCommand.self,
VPhoneCustomFirmwareCommand.self,
VPhoneHostCommand.self,
VPhoneSignCommand.self, VPhoneDumpEntitlementsCommand.self,
+ VPhoneArchiveCommand.self,
],
- defaultSubcommand: VPhoneBootCLI.self,
+ defaultSubcommand: VPhoneBootCommand.self,
)
}
-// VPhoneBootCLI now lives in VPhoneCore, shared with vphone-vm. This binary
+// VPhoneBootCommand now lives in VPhoneCoreKit, shared with vphone-vm. This binary
// only forwards it — see main.swift.
-struct PatchFirmwareCLI: ParsableCommand {
+struct PatchFirmwareCommand: ParsableCommand {
static let configuration = CommandConfiguration(
commandName: "patch-firmware",
abstract: "Patch boot-chain firmware in a VM directory using the Swift pipeline",
@@ -78,7 +79,7 @@ struct PatchFirmwareCLI: ParsableCommand {
}
}
-struct PatchComponentCLI: ParsableCommand {
+struct PatchComponentCommand: ParsableCommand {
enum ComponentOption: String, CaseIterable, ExpressibleByArgument {
case txm
case kernelBase = "kernel-base"
diff --git a/Sources/VPhoneCLI/VPhoneVirtualMachineCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCommand.swift
similarity index 99%
rename from Sources/VPhoneCLI/VPhoneVirtualMachineCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCommand.swift
index e1516f50..065ac7b3 100644
--- a/Sources/VPhoneCLI/VPhoneVirtualMachineCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCommand.swift
@@ -1,6 +1,6 @@
import ArgumentParser
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
// MARK: - Command group
diff --git a/Sources/VPhoneCLI/VPhoneVirtualMachineCreateCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift
similarity index 81%
rename from Sources/VPhoneCLI/VPhoneVirtualMachineCreateCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift
index ba61c98f..694ae076 100644
--- a/Sources/VPhoneCLI/VPhoneVirtualMachineCreateCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift
@@ -1,6 +1,6 @@
import ArgumentParser
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
struct VPhoneVirtualMachineCreateCommand: ParsableCommand {
static let configuration = CommandConfiguration(
@@ -17,8 +17,6 @@ struct VPhoneVirtualMachineCreateCommand: ParsableCommand {
@Option(help: "GPU driver bundle from the same cloudOS build, for offline AEA recovery")
var gpuDriverBundle: String?
@Option(name: .shortAndLong, help: "Disk size (GB)") var diskSize: UInt64 = 64
- @Option(name: .shortAndLong, help: "sudo password for the CFW host-mount install (via askpass; never logged)")
- var sudoPassword: String?
@Flag(
name: .customLong("force-dsc-maxslide"),
help: "Zero the dyld cache maxSlide on non-27 bases (opt-in DSC-map fit)",
@@ -29,23 +27,16 @@ struct VPhoneVirtualMachineCreateCommand: ParsableCommand {
help: "Opt in to Frida Stalker kernel relaxations",
)
var frida = false
- @Flag(
- name: .customLong("root-popup"),
- help: "Elevate the CFW host-mount via macOS's native authentication dialog (osascript) instead of a sudo prompt",
- )
- var rootPopup = false
@Flag(
name: .customLong("keep-artifacts"),
help: "Keep the prepared restore tree after installation. Source IPSWs are always kept.",
)
var keepArtifacts = false
- @Option(name: .shortAndLong, help: "Resource base override (default: inferred from the running binary path)")
- var projectRoot: String?
@Flag(name: .customShort("v"), help: "Increase verbosity: -v tool detail, -vv guest serial, -vvv internal trace")
var verboseCount: Int
func run() throws {
- let resources = projectRoot.map { VPhoneResources(base: URL(fileURLWithPath: $0)) } ?? .resolve()
+ let resources = VPhoneResources.resolve()
// Resolved up front: a create boots the guest four times, and this is
// also where a missing vphone-vm should be reported — before any of the
// long-running download and patch work, not after it.
@@ -65,10 +56,8 @@ struct VPhoneVirtualMachineCreateCommand: ParsableCommand {
iphoneSource: sources.iphoneSource,
cloudosSource: sources.cloudosSource,
gpuDriverBundle: gpuDriverBundle.map { URL(fileURLWithPath: ($0 as NSString).expandingTildeInPath) },
- sudoPassword: sudoPassword,
forceDyldSharedCacheMaxSlide: forceDyldSharedCacheMaxSlide,
enableFrida: frida,
- rootPopup: rootPopup,
diskSizeGB: diskSize,
verbosity: VPhoneVerbosity(count: verboseCount),
keepArtifacts: keepArtifacts,
diff --git a/Sources/VPhoneCLI/VPhoneVirtualMachineCreateOptions.swift b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCreateOptions.swift
similarity index 85%
rename from Sources/VPhoneCLI/VPhoneVirtualMachineCreateOptions.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCreateOptions.swift
index 99dfe5f6..1e0d3794 100644
--- a/Sources/VPhoneCLI/VPhoneVirtualMachineCreateOptions.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCreateOptions.swift
@@ -1,5 +1,5 @@
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
// MARK: - Create Options
@@ -9,10 +9,8 @@ public extension VPhoneVirtualMachineCreator {
public var iphoneSource: String?
public var cloudosSource: String?
public var gpuDriverBundle: URL?
- public var sudoPassword: String?
public var forceDyldSharedCacheMaxSlide: Bool
public var enableFrida: Bool
- public var rootPopup: Bool
public var cpuCount: UInt
public var memoryMB: UInt64
public var diskSizeGB: UInt64
@@ -24,10 +22,8 @@ public extension VPhoneVirtualMachineCreator {
iphoneSource: String? = nil,
cloudosSource: String? = nil,
gpuDriverBundle: URL? = nil,
- sudoPassword: String? = nil,
forceDyldSharedCacheMaxSlide: Bool = false,
enableFrida: Bool = false,
- rootPopup: Bool = false,
cpuCount: UInt = 8,
memoryMB: UInt64 = 8192,
diskSizeGB: UInt64 = 64,
@@ -38,10 +34,8 @@ public extension VPhoneVirtualMachineCreator {
self.iphoneSource = iphoneSource
self.cloudosSource = cloudosSource
self.gpuDriverBundle = gpuDriverBundle
- self.sudoPassword = sudoPassword
self.forceDyldSharedCacheMaxSlide = forceDyldSharedCacheMaxSlide
self.enableFrida = enableFrida
- self.rootPopup = rootPopup
self.cpuCount = cpuCount
self.memoryMB = memoryMB
self.diskSizeGB = diskSizeGB
diff --git a/Sources/VPhoneCLI/VPhoneVirtualMachineCreator.swift b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCreator.swift
similarity index 82%
rename from Sources/VPhoneCLI/VPhoneVirtualMachineCreator.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCreator.swift
index 4130c905..0c55e7d2 100644
--- a/Sources/VPhoneCLI/VPhoneVirtualMachineCreator.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineCreator.swift
@@ -1,7 +1,7 @@
import ArgumentParser
import FirmwarePatcher
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
import VPhoneRestore
// MARK: - VPhoneVirtualMachineCreationError
@@ -16,7 +16,6 @@ private enum VPhoneVirtualMachineCreationError: Error, CustomStringConvertible {
case recoveryTimeout
case restoreUpdateFailed(String)
case cfwInstallFailed(Int32)
- case sudoPasswordRequired
case bootAnalysisPanic
case bootAnalysisExited(Int32)
case bootAnalysisTimeout
@@ -42,9 +41,6 @@ private enum VPhoneVirtualMachineCreationError: Error, CustomStringConvertible {
"Device restore failed: \(reason)"
case let .cfwInstallFailed(code):
"Custom firmware installation failed (exit code \(code))."
- case .sudoPasswordRequired:
- "Custom firmware installation requires root, but no sudo password is available. "
- + "Pass --sudo-password, or run vm create in an interactive terminal."
case .bootAnalysisPanic:
"Boot analysis failed: the guest panicked."
case let .bootAnalysisExited(code):
@@ -66,13 +62,13 @@ extension VPhoneVirtualMachineCreationError: LocalizedError {
/// Native `vm create` pipeline: prepare, patch, restore, install JB system
/// files, and verify that the guest daemon connects on first boot.
///
-/// Lives in the EXECUTABLE target rather than VPhoneCore because it composes
+/// Lives in the EXECUTABLE target rather than VPhoneCoreKit because it composes
/// `FirmwarePatcher.FirmwarePipeline`, and `FirmwarePatcher` already depends on
-/// `VPhoneCore` (Package.swift) — VPhoneCore importing FirmwarePatcher back
+/// `VPhoneCoreKit` (Package.swift) — VPhoneCoreKit importing FirmwarePatcher back
/// would be a package dependency cycle. The regex/ECID primitives this type
-/// needs to be independently unit-testable live in VPhoneCore instead, as
+/// needs to be independently unit-testable live in VPhoneCoreKit instead, as
/// `VPhoneBootPatterns`, where `VPhoneCoreTests` (which depends only on
-/// VPhoneCore) can reach them.
+/// VPhoneCoreKit) can reach them.
public struct VPhoneVirtualMachineCreator {
private let library: VPhoneLibrary
private let resources: VPhoneResources
@@ -96,6 +92,7 @@ public struct VPhoneVirtualMachineCreator {
public func run(_ options: Options) throws {
let v = options.verbosity
+ let invokingUser = VPhoneInvokingUser.current
// Fail fast on a nested-VM host — PV=3 guest boot can't nest, and the whole
// create pipeline (download + patch + restore) is wasted otherwise. Mirrors
// the host preflight that precedes VM launch.
@@ -104,43 +101,23 @@ public struct VPhoneVirtualMachineCreator {
}
let bundleURL = library.url(forName: options.name)
- if FileManager.default.fileExists(atPath: bundleURL.path) {
- throw VPhoneLibraryError.alreadyExists(name: options.name)
- }
-
- // CFW install re-execs under sudo (host disk mount: mount_apfs + chown
- // 0:0 are root-only). With --sudo-password we feed sudo non-interactively
- // via the askpass helper. Otherwise sudo prompts on the terminal itself —
- // the CFW-install step runs as a foreground job (runForeground) so sudo's
- // process group owns the tty and reads the password directly; our code
- // never sees it.
- var sudoEnvironmentExtras: [String: String] = [:]
- var askpassScript: URL?
+ let ownedOutputs = [bundleURL, resources.ipswCacheDir, resources.sealVolumeCacheDir]
+ var ownershipRestored = false
defer {
- if let askpassScript {
- try? FileManager.default.removeItem(at: askpassScript)
+ if let invokingUser, !ownershipRestored {
+ for output in ownedOutputs {
+ do { try invokingUser.restoreOwnership(at: output) }
+ catch { fputs("warning: could not restore ownership of \(output.path): \(error)\n", stderr) }
+ }
+ try? invokingUser.restoreOwnerOfDirectory(at: library.root)
+ try? invokingUser.restoreOwnerOfDirectory(at: VPhoneResources.userDataRoot())
}
}
- if let password = options.sudoPassword, !password.isEmpty {
- let script = try makeSudoAskpassScript()
- askpassScript = script
- sudoEnvironmentExtras = ["SUDO_ASKPASS": script.path, "SUDO_PASSWORD": password]
- if preloadSudoCredential(env: sudoEnvironmentExtras, verbosity: v) {
- print("[+] sudo credential preloaded via --sudo-password")
- } else {
- print("[!] --sudo-password failed validation; will still try at CFW-install time")
- }
- } else if !options.rootPopup, isatty(FileHandle.standardInput.fileDescriptor) == 0 {
- // A preconfigured passwordless sudo is valid in a non-interactive
- // session. Probe it now so a failure happens before the restore.
- let sudo = try? VPhoneProcessRunner.runCapturing(
- URL(fileURLWithPath: "/usr/bin/sudo"), ["-n", "/usr/bin/true"],
- )
- if sudo?.succeeded != true {
- throw VPhoneVirtualMachineCreationError.sudoPasswordRequired
- }
+ if FileManager.default.fileExists(atPath: bundleURL.path) {
+ throw VPhoneLibraryError.alreadyExists(name: options.name)
}
+
print("\n=== vm new ===")
let spec = VPhoneBundleOperations.NewBundleConfiguration(
name: options.name,
@@ -168,7 +145,6 @@ public struct VPhoneVirtualMachineCreator {
try runCustomFirmwareInstall(
options: options,
bundleURL: bundleURL,
- sudoEnvironmentExtras: sudoEnvironmentExtras,
)
// CFW install is the last consumer of the built restore tree (it copies
@@ -181,6 +157,12 @@ public struct VPhoneVirtualMachineCreator {
print("\n=== First boot check ===")
try runBootAnalysis(bundleURL: bundleURL, verbosity: v)
+ if let invokingUser {
+ for output in ownedOutputs { try invokingUser.restoreOwnership(at: output) }
+ try invokingUser.restoreOwnerOfDirectory(at: library.root)
+ try invokingUser.restoreOwnerOfDirectory(at: VPhoneResources.userDataRoot())
+ }
+ ownershipRestored = true
print("\n=== Done ===")
print("JB VM created; vphoned connected. Guest user environment is untouched.")
}
@@ -212,35 +194,6 @@ public struct VPhoneVirtualMachineCreator {
return present != 0
}
- // MARK: - sudo askpass
-
- /// Askpass helper: emits `$SUDO_PASSWORD` (set per-invocation in the env).
- /// The password is never written into the script itself.
- private func makeSudoAskpassScript() throws -> URL {
- let url = FileManager.default.temporaryDirectory
- .appendingPathComponent("vphone-sudo-askpass-\(UUID().uuidString)")
- let script = "#!/bin/sh\nprintf '%s\\n' \"${SUDO_PASSWORD:-}\"\n"
- try script.write(to: url, atomically: true, encoding: .utf8)
- try FileManager.default.setAttributes([.posixPermissions: 0o700], ofItemAtPath: url.path)
- return url
- }
-
- /// Validate a sudo credential non-interactively via the askpass env
- /// (`sudo -A -v`). Returns whether it succeeded.
- private func preloadSudoCredential(env extras: [String: String], verbosity v: VPhoneVerbosity) -> Bool {
- var env = ProcessInfo.processInfo.environment
- for (key, value) in extras {
- env[key] = value
- }
- trace("spawn /usr/bin/sudo -A -v (env keys added: \(extras.keys.sorted().joined(separator: ", ")))", v)
- let result = try? VPhoneProcessRunner.runCapturing(
- URL(fileURLWithPath: "/usr/bin/sudo"),
- ["-A", "-v"],
- env: env,
- )
- return result?.succeeded == true
- }
-
// MARK: - fw prepare / fw patch
private func runFWPrepare(options: Options, bundleURL: URL) throws {
@@ -424,16 +377,12 @@ public struct VPhoneVirtualMachineCreator {
private func runCustomFirmwareInstall(
options: Options,
bundleURL: URL,
- sudoEnvironmentExtras: [String: String],
) throws {
let v = options.verbosity
- // --sudo-password (askpass) wins over --root-popup.
- let usePopup = options.rootPopup && sudoEnvironmentExtras["SUDO_ASKPASS"] == nil
trace("native JB CFW install for \(bundleURL.path)", v)
let code = try VPhoneCustomFirmwareInstaller.elevate(
bundle: bundleURL, resources: resources,
forceDyldSharedCacheMaxSlide: options.forceDyldSharedCacheMaxSlide,
- rootPopup: usePopup, environment: sudoEnvironmentExtras,
)
guard code == 0 else { throw VPhoneVirtualMachineCreationError.cfwInstallFailed(code) }
print("[+] JB CFW installed.")
diff --git a/Sources/VPhoneCLI/VPhoneVirtualMachineLaunchCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineLaunchCommand.swift
similarity index 98%
rename from Sources/VPhoneCLI/VPhoneVirtualMachineLaunchCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineLaunchCommand.swift
index d68ac0a1..5d2d9233 100644
--- a/Sources/VPhoneCLI/VPhoneVirtualMachineLaunchCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineLaunchCommand.swift
@@ -1,6 +1,6 @@
import ArgumentParser
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
struct VPhoneVirtualMachineLaunchCommand: ParsableCommand {
static let configuration = CommandConfiguration(
@@ -55,7 +55,7 @@ struct VPhoneVirtualMachineLaunchCommand: ParsableCommand {
_ = try layout.stageVphoned(into: bundle)
}
- var boot = VPhoneBootCLI()
+ var boot = VPhoneBootCommand()
boot.config = bundle.configURL
boot.dfu = dfu
boot.headless = headless
diff --git a/Sources/VPhoneCLI/VPhoneVirtualMachineSelection.swift b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineSelection.swift
similarity index 98%
rename from Sources/VPhoneCLI/VPhoneVirtualMachineSelection.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineSelection.swift
index 92c270e5..70428c8e 100644
--- a/Sources/VPhoneCLI/VPhoneVirtualMachineSelection.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineSelection.swift
@@ -1,5 +1,5 @@
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
enum VPhoneVirtualMachineSelection {
private static var isTTY: Bool {
diff --git a/Sources/VPhoneCLI/VPhoneVirtualMachineTransferCLI.swift b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineTransferCommand.swift
similarity index 98%
rename from Sources/VPhoneCLI/VPhoneVirtualMachineTransferCLI.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineTransferCommand.swift
index c0ddf966..989be3e3 100644
--- a/Sources/VPhoneCLI/VPhoneVirtualMachineTransferCLI.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/VirtualMachine/VPhoneVirtualMachineTransferCommand.swift
@@ -1,7 +1,7 @@
import ArgumentParser
import Foundation
-import VPhoneArchive
-import VPhoneCore
+import VPhoneArchiveKit
+import VPhoneCoreKit
struct VPhoneVirtualMachineCloneCommand: ParsableCommand {
static let configuration = CommandConfiguration(
diff --git a/Sources/VPhoneCLI/main.swift b/VPhoneExecutable/VPhoneCommand/Sources/main.swift
similarity index 87%
rename from Sources/VPhoneCLI/main.swift
rename to VPhoneExecutable/VPhoneCommand/Sources/main.swift
index 85a5bf89..60f76346 100644
--- a/Sources/VPhoneCLI/main.swift
+++ b/VPhoneExecutable/VPhoneCommand/Sources/main.swift
@@ -13,13 +13,13 @@
import ArgumentParser
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
do {
- let command = try VPhoneCLI.parseAsRoot()
+ let command = try VPhoneCommand.parseAsRoot()
switch command {
- case let boot as VPhoneBootCLI:
+ case let boot as VPhoneBootCommand:
// `boot` is a request for a guest, not work this process does. Hand it
// to vphone-vm and report back whatever the guest exits with.
let status = try VPhoneGuestLaunchPlanner().run(boot.bootArguments)
@@ -32,5 +32,5 @@ do {
try runnable.run()
}
} catch {
- VPhoneCLI.exit(withError: error)
+ VPhoneCommand.exit(withError: error)
}
diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.pbxproj b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..c651cb45
--- /dev/null
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.pbxproj
@@ -0,0 +1,816 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 70;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 5036444C30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 5036444D30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 5036444E30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 5036444F30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 5036445030653D1000CAADDF /* Capstone in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000201 /* Capstone */; };
+ 5036445130653D1000CAADDF /* Img4tool in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000202 /* Img4tool */; };
+ 5036445230653D1000CAADDF /* MachOKit in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000203 /* MachOKit */; };
+ 5036445330653D1000CAADDF /* LibArchive in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000205 /* LibArchive */; };
+ 50364C1630653DE900CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 50364C1730653DE900CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 50364C1830653DE900CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 50364C1930653DE900CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 50364C1A30653DE900CAADDF /* Capstone in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000201 /* Capstone */; };
+ 50364C1B30653DE900CAADDF /* Img4tool in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000202 /* Img4tool */; };
+ 50364C1C30653DE900CAADDF /* MachOKit in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000203 /* MachOKit */; };
+ 50364C1D30653DE900CAADDF /* LibArchive in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000205 /* LibArchive */; };
+ 50364C1E30653DE900CAADDF /* libVPhoneSign.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB0000000000000000000032 /* libVPhoneSign.a */; };
+ BB0000000000000000000101 /* Capstone in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000201 /* Capstone */; };
+ BB0000000000000000000102 /* Img4tool in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000202 /* Img4tool */; };
+ BB0000000000000000000103 /* MachOKit in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000203 /* MachOKit */; };
+ BB0000000000000000000104 /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000204 /* ArgumentParser */; };
+ BB0000000000000000000105 /* LibArchive in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000205 /* LibArchive */; };
+ BB0000000000000000000106 /* AppleMobileDeviceLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000206 /* AppleMobileDeviceLibrary */; };
+ BB0000000000000000000107 /* libFirmwarePatcher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB0000000000000000000033 /* libFirmwarePatcher.a */; };
+ BB0000000000000000000108 /* libVPhoneSign.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB0000000000000000000032 /* libVPhoneSign.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ BB0000000000000000000122 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = BB0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = BB0000000000000000000013;
+ remoteInfo = FirmwarePatcher;
+ };
+ BB0000000000000000000124 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = BB0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = BB0000000000000000000012;
+ remoteInfo = VPhoneSign;
+ };
+ BB0000000000000000000126 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = BB0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = BB0000000000000000000013;
+ remoteInfo = FirmwarePatcher;
+ };
+ BB0000000000000000000128 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = BB0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = BB0000000000000000000012;
+ remoteInfo = VPhoneSign;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ BB0000000000000000000031 /* vphone-cli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "vphone-cli"; sourceTree = BUILT_PRODUCTS_DIR; };
+ BB0000000000000000000032 /* libVPhoneSign.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVPhoneSign.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ BB0000000000000000000033 /* libFirmwarePatcher.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libFirmwarePatcher.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ BB0000000000000000000034 /* FirmwarePatcherTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FirmwarePatcherTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ BB0000000000000000000035 /* VPhoneSignTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VPhoneSignTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFileSystemSynchronizedRootGroup section */
+ BB0000000000000000000021 /* Sources */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Sources; sourceTree = "<group>"; };
+ BB0000000000000000000022 /* VPhoneSign */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPhoneSign; sourceTree = "<group>"; };
+ BB0000000000000000000023 /* FirmwarePatcher */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = FirmwarePatcher; sourceTree = "<group>"; };
+ BB0000000000000000000024 /* FirmwarePatcherTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = FirmwarePatcherTests; sourceTree = "<group>"; };
+ BB0000000000000000000025 /* VPhoneSignTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPhoneSignTests; sourceTree = "<group>"; };
+ BB0000000000000000000026 /* VPhoneSignTestFixtures */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPhoneSignTestFixtures; sourceTree = "<group>"; };
+ BB0000000000000000000027 /* FirmwarePatcherTestFixtures */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = FirmwarePatcherTestFixtures; sourceTree = "<group>"; };
+/* End PBXFileSystemSynchronizedRootGroup section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ BB0000000000000000000041 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5036445330653D1000CAADDF /* LibArchive in Frameworks */,
+ 5036445230653D1000CAADDF /* MachOKit in Frameworks */,
+ 5036445130653D1000CAADDF /* Img4tool in Frameworks */,
+ 5036445030653D1000CAADDF /* Capstone in Frameworks */,
+ BB0000000000000000000104 /* ArgumentParser in Frameworks */,
+ 5036444C30653D1000CAADDF /* (null) in Frameworks */,
+ 5036444D30653D1000CAADDF /* (null) in Frameworks */,
+ 5036444E30653D1000CAADDF /* (null) in Frameworks */,
+ 5036444F30653D1000CAADDF /* (null) in Frameworks */,
+ BB0000000000000000000106 /* AppleMobileDeviceLibrary in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BB0000000000000000000042 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BB0000000000000000000043 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BB0000000000000000000101 /* Capstone in Frameworks */,
+ BB0000000000000000000102 /* Img4tool in Frameworks */,
+ BB0000000000000000000103 /* MachOKit in Frameworks */,
+ BB0000000000000000000105 /* LibArchive in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BB0000000000000000000044 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 50364C1A30653DE900CAADDF /* Capstone in Frameworks */,
+ 50364C1C30653DE900CAADDF /* MachOKit in Frameworks */,
+ BB0000000000000000000107 /* libFirmwarePatcher.a in Frameworks */,
+ BB0000000000000000000108 /* libVPhoneSign.a in Frameworks */,
+ 50364C1630653DE900CAADDF /* (null) in Frameworks */,
+ 50364C1730653DE900CAADDF /* (null) in Frameworks */,
+ 50364C1830653DE900CAADDF /* (null) in Frameworks */,
+ 50364C1930653DE900CAADDF /* (null) in Frameworks */,
+ 50364C1B30653DE900CAADDF /* Img4tool in Frameworks */,
+ 50364C1D30653DE900CAADDF /* LibArchive in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BB0000000000000000000045 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 50364C1E30653DE900CAADDF /* libVPhoneSign.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ BB0000000000000000000002 = {
+ isa = PBXGroup;
+ children = (
+ BB0000000000000000000021 /* Sources */,
+ BB0000000000000000000022 /* VPhoneSign */,
+ BB0000000000000000000023 /* FirmwarePatcher */,
+ BB0000000000000000000024 /* FirmwarePatcherTests */,
+ BB0000000000000000000025 /* VPhoneSignTests */,
+ BB0000000000000000000026 /* VPhoneSignTestFixtures */,
+ BB0000000000000000000027 /* FirmwarePatcherTestFixtures */,
+ BB0000000000000000000003 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ BB0000000000000000000003 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ BB0000000000000000000031 /* vphone-cli */,
+ BB0000000000000000000032 /* libVPhoneSign.a */,
+ BB0000000000000000000033 /* libFirmwarePatcher.a */,
+ BB0000000000000000000034 /* FirmwarePatcherTests.xctest */,
+ BB0000000000000000000035 /* VPhoneSignTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ BB0000000000000000000011 /* VPhoneCommand */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BB0000000000000000000081 /* Build configuration list for PBXNativeTarget "VPhoneCommand" */;
+ buildPhases = (
+ BB0000000000000000000051 /* Sources */,
+ BB0000000000000000000041 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ BB0000000000000000000121 /* PBXTargetDependency */,
+ BB0000000000000000000123 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ BB0000000000000000000021 /* Sources */,
+ );
+ name = VPhoneCommand;
+ packageProductDependencies = (
+ BB0000000000000000000204 /* ArgumentParser */,
+ BB0000000000000000000201 /* Capstone */,
+ BB0000000000000000000202 /* Img4tool */,
+ BB0000000000000000000203 /* MachOKit */,
+ BB0000000000000000000205 /* LibArchive */,
+ BB0000000000000000000206 /* AppleMobileDeviceLibrary */,
+ );
+ productName = "vphone-cli";
+ productReference = BB0000000000000000000031 /* vphone-cli */;
+ productType = "com.apple.product-type.tool";
+ };
+ BB0000000000000000000012 /* VPhoneSign */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BB0000000000000000000082 /* Build configuration list for PBXNativeTarget "VPhoneSign" */;
+ buildPhases = (
+ BB0000000000000000000052 /* Sources */,
+ BB0000000000000000000042 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ fileSystemSynchronizedGroups = (
+ BB0000000000000000000022 /* VPhoneSign */,
+ );
+ name = VPhoneSign;
+ productName = VPhoneSign;
+ productReference = BB0000000000000000000032 /* libVPhoneSign.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ BB0000000000000000000013 /* FirmwarePatcher */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BB0000000000000000000083 /* Build configuration list for PBXNativeTarget "FirmwarePatcher" */;
+ buildPhases = (
+ BB0000000000000000000053 /* Sources */,
+ BB0000000000000000000043 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ BB0000000000000000000123 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ BB0000000000000000000023 /* FirmwarePatcher */,
+ );
+ name = FirmwarePatcher;
+ packageProductDependencies = (
+ BB0000000000000000000201 /* Capstone */,
+ BB0000000000000000000202 /* Img4tool */,
+ BB0000000000000000000203 /* MachOKit */,
+ BB0000000000000000000205 /* LibArchive */,
+ );
+ productName = FirmwarePatcher;
+ productReference = BB0000000000000000000033 /* libFirmwarePatcher.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ BB0000000000000000000014 /* FirmwarePatcherTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BB0000000000000000000084 /* Build configuration list for PBXNativeTarget "FirmwarePatcherTests" */;
+ buildPhases = (
+ BB0000000000000000000054 /* Sources */,
+ BB0000000000000000000044 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ BB0000000000000000000125 /* PBXTargetDependency */,
+ BB0000000000000000000127 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ BB0000000000000000000024 /* FirmwarePatcherTests */,
+ );
+ name = FirmwarePatcherTests;
+ packageProductDependencies = (
+ BB0000000000000000000201 /* Capstone */,
+ BB0000000000000000000202 /* Img4tool */,
+ BB0000000000000000000203 /* MachOKit */,
+ BB0000000000000000000205 /* LibArchive */,
+ );
+ productName = FirmwarePatcherTests;
+ productReference = BB0000000000000000000034 /* FirmwarePatcherTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ BB0000000000000000000015 /* VPhoneSignTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BB0000000000000000000085 /* Build configuration list for PBXNativeTarget "VPhoneSignTests" */;
+ buildPhases = (
+ BB0000000000000000000055 /* Sources */,
+ BB0000000000000000000045 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ BB0000000000000000000127 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ BB0000000000000000000025 /* VPhoneSignTests */,
+ );
+ name = VPhoneSignTests;
+ productName = VPhoneSignTests;
+ productReference = BB0000000000000000000035 /* VPhoneSignTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ BB0000000000000000000001 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 2700;
+ };
+ buildConfigurationList = BB0000000000000000000080 /* Build configuration list for PBXProject "VPhoneCommand" */;
+ compatibilityVersion = "Xcode 16.0.Superseded.1";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = BB0000000000000000000002;
+ packageReferences = (
+ BB0000000000000000000171 /* XCRemoteSwiftPackageReference "libcapstone-spm" */,
+ BB0000000000000000000172 /* XCRemoteSwiftPackageReference "libimg4-spm" */,
+ BB0000000000000000000173 /* XCRemoteSwiftPackageReference "MachOKit" */,
+ BB0000000000000000000174 /* XCRemoteSwiftPackageReference "swift-argument-parser" */,
+ BB0000000000000000000175 /* XCRemoteSwiftPackageReference "libarchive.xcframework" */,
+ BB0000000000000000000176 /* XCRemoteSwiftPackageReference "AppleMobileDeviceLibrary" */,
+ );
+ productRefGroup = BB0000000000000000000003 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ BB0000000000000000000011 /* VPhoneCommand */,
+ BB0000000000000000000012 /* VPhoneSign */,
+ BB0000000000000000000013 /* FirmwarePatcher */,
+ BB0000000000000000000014 /* FirmwarePatcherTests */,
+ BB0000000000000000000015 /* VPhoneSignTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ BB0000000000000000000051 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BB0000000000000000000052 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BB0000000000000000000053 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BB0000000000000000000054 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BB0000000000000000000055 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ BB0000000000000000000121 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = BB0000000000000000000013 /* FirmwarePatcher */;
+ targetProxy = BB0000000000000000000122 /* PBXContainerItemProxy */;
+ };
+ BB0000000000000000000123 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = BB0000000000000000000012 /* VPhoneSign */;
+ targetProxy = BB0000000000000000000124 /* PBXContainerItemProxy */;
+ };
+ BB0000000000000000000125 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = BB0000000000000000000013 /* FirmwarePatcher */;
+ targetProxy = BB0000000000000000000126 /* PBXContainerItemProxy */;
+ };
+ BB0000000000000000000127 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = BB0000000000000000000012 /* VPhoneSign */;
+ targetProxy = BB0000000000000000000128 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ BB0000000000000000000061 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/VPhoneRestore/MobileRecoveryCore/Include",
+ "$(PROJECT_DIR)/VPhoneRestore/MobileRestoreCore/Include",
+ );
+ LIBRARY_SEARCH_PATHS = (
+ "$(BUILT_PRODUCTS_DIR)",
+ "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)",
+ "$(SRCROOT)/../../.build/XcodeRestore/Build/Products/$(CONFIGURATION)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lFirmwarePatcher",
+ "-lVPhoneSign",
+ "-lVPhoneRestore",
+ "-lMobileRestoreCore",
+ "-lMobileRecoveryCore",
+ "-lVPhoneCoreKit",
+ "-lVPhoneArchiveKit",
+ "-lcurl",
+ );
+ PRODUCT_MODULE_NAME = VPhoneCommand;
+ PRODUCT_NAME = "vphone-cli";
+ SDKROOT = macosx;
+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION) $(SRCROOT)/../../.build/XcodeRestore/Build/Products/$(CONFIGURATION)";
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ BB0000000000000000000062 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/VPhoneRestore/MobileRecoveryCore/Include",
+ "$(PROJECT_DIR)/VPhoneRestore/MobileRestoreCore/Include",
+ );
+ LIBRARY_SEARCH_PATHS = (
+ "$(BUILT_PRODUCTS_DIR)",
+ "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)",
+ "$(SRCROOT)/../../.build/XcodeRestore/Build/Products/$(CONFIGURATION)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lFirmwarePatcher",
+ "-lVPhoneSign",
+ "-lVPhoneRestore",
+ "-lMobileRestoreCore",
+ "-lMobileRecoveryCore",
+ "-lVPhoneCoreKit",
+ "-lVPhoneArchiveKit",
+ "-lcurl",
+ );
+ PRODUCT_MODULE_NAME = VPhoneCommand;
+ PRODUCT_NAME = "vphone-cli";
+ SDKROOT = macosx;
+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION) $(SRCROOT)/../../.build/XcodeRestore/Build/Products/$(CONFIGURATION)";
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ BB0000000000000000000063 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ ENABLE_TESTABILITY = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = VPhoneSign;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ BB0000000000000000000064 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = VPhoneSign;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ BB0000000000000000000065 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ ENABLE_TESTABILITY = YES;
+ LIBRARY_SEARCH_PATHS = (
+ "$(BUILT_PRODUCTS_DIR)",
+ "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)",
+ "$(SRCROOT)/../../.build/XcodeRestore/Build/Products/$(CONFIGURATION)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneSign",
+ "-lVPhoneCoreKit",
+ "-lVPhoneArchiveKit",
+ );
+ PRODUCT_NAME = FirmwarePatcher;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION) $(SRCROOT)/../../.build/XcodeRestore/Build/Products/$(CONFIGURATION)";
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ BB0000000000000000000066 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ LIBRARY_SEARCH_PATHS = (
+ "$(BUILT_PRODUCTS_DIR)",
+ "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)",
+ "$(SRCROOT)/../../.build/XcodeRestore/Build/Products/$(CONFIGURATION)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneSign",
+ "-lVPhoneCoreKit",
+ "-lVPhoneArchiveKit",
+ );
+ PRODUCT_NAME = FirmwarePatcher;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION) $(SRCROOT)/../../.build/XcodeRestore/Build/Products/$(CONFIGURATION)";
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ BB0000000000000000000067 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ LIBRARY_SEARCH_PATHS = (
+ "$(BUILT_PRODUCTS_DIR)",
+ "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneCoreKit",
+ "-lVPhoneArchiveKit",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.firmwarepatcher.tests;
+ PRODUCT_NAME = FirmwarePatcherTests;
+ SDKROOT = macosx;
+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ BB0000000000000000000068 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ LIBRARY_SEARCH_PATHS = (
+ "$(BUILT_PRODUCTS_DIR)",
+ "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneCoreKit",
+ "-lVPhoneArchiveKit",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.firmwarepatcher.tests;
+ PRODUCT_NAME = FirmwarePatcherTests;
+ SDKROOT = macosx;
+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ BB0000000000000000000069 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/VPhoneSignTests/Fixtures",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.sign.tests;
+ PRODUCT_NAME = VPhoneSignTests;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ BB000000000000000000006A /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(PROJECT_DIR)/VPhoneSignTests/Fixtures",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.sign.tests;
+ PRODUCT_NAME = VPhoneSignTests;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ BB0000000000000000000071 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ BB0000000000000000000072 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ BB0000000000000000000080 /* Build configuration list for PBXProject "VPhoneCommand" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BB0000000000000000000071 /* Debug */,
+ BB0000000000000000000072 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ BB0000000000000000000081 /* Build configuration list for PBXNativeTarget "VPhoneCommand" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BB0000000000000000000061 /* Debug */,
+ BB0000000000000000000062 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ BB0000000000000000000082 /* Build configuration list for PBXNativeTarget "VPhoneSign" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BB0000000000000000000063 /* Debug */,
+ BB0000000000000000000064 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ BB0000000000000000000083 /* Build configuration list for PBXNativeTarget "FirmwarePatcher" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BB0000000000000000000065 /* Debug */,
+ BB0000000000000000000066 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ BB0000000000000000000084 /* Build configuration list for PBXNativeTarget "FirmwarePatcherTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BB0000000000000000000067 /* Debug */,
+ BB0000000000000000000068 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ BB0000000000000000000085 /* Build configuration list for PBXNativeTarget "VPhoneSignTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BB0000000000000000000069 /* Debug */,
+ BB000000000000000000006A /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+
+/* Begin XCRemoteSwiftPackageReference section */
+ BB0000000000000000000171 /* XCRemoteSwiftPackageReference "libcapstone-spm" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Lakr233/libcapstone-spm.git";
+ requirement = {
+ kind = upToNextMajorVersion;
+ minimumVersion = 0.1.3;
+ };
+ };
+ BB0000000000000000000172 /* XCRemoteSwiftPackageReference "libimg4-spm" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Lakr233/libimg4-spm.git";
+ requirement = {
+ kind = upToNextMajorVersion;
+ minimumVersion = 0.1.1;
+ };
+ };
+ BB0000000000000000000173 /* XCRemoteSwiftPackageReference "MachOKit" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/p-x9/MachOKit.git";
+ requirement = {
+ kind = upToNextMajorVersion;
+ minimumVersion = 0.52.2;
+ };
+ };
+ BB0000000000000000000174 /* XCRemoteSwiftPackageReference "swift-argument-parser" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/apple/swift-argument-parser.git";
+ requirement = {
+ kind = exactVersion;
+ version = 1.3.1;
+ };
+ };
+ BB0000000000000000000175 /* XCRemoteSwiftPackageReference "libarchive.xcframework" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Lakr233/libarchive.xcframework.git";
+ requirement = {
+ kind = upToNextMajorVersion;
+ minimumVersion = 0.1.1;
+ };
+ };
+ BB0000000000000000000176 /* XCRemoteSwiftPackageReference "AppleMobileDeviceLibrary" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Lakr233/AppleMobileDeviceLibrary.git";
+ requirement = {
+ kind = exactVersion;
+ version = 1.0.1790243523;
+ };
+ };
+/* End XCRemoteSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ BB0000000000000000000201 /* Capstone */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = BB0000000000000000000171 /* XCRemoteSwiftPackageReference "libcapstone-spm" */;
+ productName = Capstone;
+ };
+ BB0000000000000000000202 /* Img4tool */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = BB0000000000000000000172 /* XCRemoteSwiftPackageReference "libimg4-spm" */;
+ productName = Img4tool;
+ };
+ BB0000000000000000000203 /* MachOKit */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = BB0000000000000000000173 /* XCRemoteSwiftPackageReference "MachOKit" */;
+ productName = MachOKit;
+ };
+ BB0000000000000000000204 /* ArgumentParser */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = BB0000000000000000000174 /* XCRemoteSwiftPackageReference "swift-argument-parser" */;
+ productName = ArgumentParser;
+ };
+ BB0000000000000000000205 /* LibArchive */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = BB0000000000000000000175 /* XCRemoteSwiftPackageReference "libarchive.xcframework" */;
+ productName = LibArchive;
+ };
+ BB0000000000000000000206 /* AppleMobileDeviceLibrary */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = BB0000000000000000000176 /* XCRemoteSwiftPackageReference "AppleMobileDeviceLibrary" */;
+ productName = AppleMobileDeviceLibrary;
+ };
+/* End XCSwiftPackageProductDependency section */
+ };
+ rootObject = BB0000000000000000000001 /* Project object */;
+}
diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
new file mode 100644
index 00000000..2a46ed5d
--- /dev/null
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,123 @@
+{
+ "originHash" : "71eb6fb0c434bdabfad04b00d5384c847e0dbe14b8cc72b8ab59352056f01210",
+ "pins" : [
+ {
+ "identity" : "applemobiledevicelibrary",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Lakr233/AppleMobileDeviceLibrary.git",
+ "state" : {
+ "revision" : "553a0bf1b55812b1a08c727b1a3084e88871343b",
+ "version" : "1.0.1790243523"
+ }
+ },
+ {
+ "identity" : "libarchive.xcframework",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Lakr233/libarchive.xcframework.git",
+ "state" : {
+ "revision" : "3bda868f1868790de2dd246a9eff76eeecba3537",
+ "version" : "0.1.1"
+ }
+ },
+ {
+ "identity" : "libcapstone-spm",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Lakr233/libcapstone-spm.git",
+ "state" : {
+ "revision" : "5d3f53a59fada26884ffc9ab32129288ce1ee48f",
+ "version" : "0.1.3"
+ }
+ },
+ {
+ "identity" : "libimg4-spm",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Lakr233/libimg4-spm.git",
+ "state" : {
+ "revision" : "1ed44d4b370d437135419338bfe85e5610c8cc10",
+ "version" : "0.1.1"
+ }
+ },
+ {
+ "identity" : "machokit",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/p-x9/MachOKit.git",
+ "state" : {
+ "revision" : "773e10797abc53914b94c2ee8c6f40f5da0b06eb",
+ "version" : "0.52.2"
+ }
+ },
+ {
+ "identity" : "objectarchivekit",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/p-x9/ObjectArchiveKit.git",
+ "state" : {
+ "revision" : "96d782a576273b73b277b577943a2a25b00b919e",
+ "version" : "0.5.0"
+ }
+ },
+ {
+ "identity" : "openssl-spm",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Lakr233/openssl-spm.git",
+ "state" : {
+ "revision" : "9f3b525d960fe71e534482310e96cd9c4f2faa17",
+ "version" : "3.6.2"
+ }
+ },
+ {
+ "identity" : "swift-argument-parser",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-argument-parser.git",
+ "state" : {
+ "revision" : "46989693916f56d1186bd59ac15124caef896560",
+ "version" : "1.3.1"
+ }
+ },
+ {
+ "identity" : "swift-asn1",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-asn1.git",
+ "state" : {
+ "revision" : "3b6410f7dee09eb33cdd26260c5fd47fda19b0e2",
+ "version" : "1.7.3"
+ }
+ },
+ {
+ "identity" : "swift-binary-parse-support",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/p-x9/swift-binary-parse-support.git",
+ "state" : {
+ "revision" : "5fb96b503672ea4752eded6b4e301fd87214b03b",
+ "version" : "0.2.1"
+ }
+ },
+ {
+ "identity" : "swift-crypto",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-crypto.git",
+ "state" : {
+ "revision" : "95ba0316a9b733e92bb6b071255ff46263bbe7dc",
+ "version" : "3.15.1"
+ }
+ },
+ {
+ "identity" : "swift-fileio",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/p-x9/swift-fileio.git",
+ "state" : {
+ "revision" : "13a83389fb4844f279b43012c4b8d7a3f95773bf",
+ "version" : "0.15.1"
+ }
+ },
+ {
+ "identity" : "swift-fileio-extra",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/p-x9/swift-fileio-extra.git",
+ "state" : {
+ "revision" : "eccf765a9d90b82db55cacd260490d2fcae000fb",
+ "version" : "0.3.0"
+ }
+ }
+ ],
+ "version" : 3
+}
diff --git a/Sources/MobileRecoveryCore/COPYING b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/COPYING
similarity index 100%
rename from Sources/MobileRecoveryCore/COPYING
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/COPYING
diff --git a/Sources/MobileRecoveryCore/Include/libirecovery.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/Include/libirecovery.h
similarity index 100%
rename from Sources/MobileRecoveryCore/Include/libirecovery.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/Include/libirecovery.h
diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/Include/module.modulemap b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/Include/module.modulemap
new file mode 100644
index 00000000..b098dfc5
--- /dev/null
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/Include/module.modulemap
@@ -0,0 +1,4 @@
+module MobileRecoveryCore {
+ header "libirecovery.h"
+ export *
+}
diff --git a/Sources/MobileRecoveryCore/config.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/config.h
similarity index 100%
rename from Sources/MobileRecoveryCore/config.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/config.h
diff --git a/Sources/MobileRecoveryCore/libirecovery.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/libirecovery.c
similarity index 100%
rename from Sources/MobileRecoveryCore/libirecovery.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRecoveryCore/libirecovery.c
diff --git a/Sources/MobileRestoreCore/vphone_restore_bridge.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Bridge/vphone_restore_bridge.c
similarity index 100%
rename from Sources/MobileRestoreCore/vphone_restore_bridge.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Bridge/vphone_restore_bridge.c
diff --git a/Sources/MobileRestoreCore/vphone_zip_stub.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Bridge/vphone_zip_stub.c
similarity index 100%
rename from Sources/MobileRestoreCore/vphone_zip_stub.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Bridge/vphone_zip_stub.c
diff --git a/Sources/MobileRestoreCore/zip.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Bridge/zip.h
similarity index 100%
rename from Sources/MobileRestoreCore/zip.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Bridge/zip.h
diff --git a/Sources/MobileRestoreCore/COPYING b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/COPYING
similarity index 100%
rename from Sources/MobileRestoreCore/COPYING
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/COPYING
diff --git a/Sources/MobileRestoreCore/common.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/common.c
similarity index 100%
rename from Sources/MobileRestoreCore/common.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/common.c
diff --git a/Sources/MobileRestoreCore/common.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/common.h
similarity index 100%
rename from Sources/MobileRestoreCore/common.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/common.h
diff --git a/Sources/MobileRestoreCore/deviceinterfaced.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/deviceinterfaced.c
similarity index 86%
rename from Sources/MobileRestoreCore/deviceinterfaced.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/deviceinterfaced.c
index 345a59a3..050da299 100644
--- a/Sources/MobileRestoreCore/deviceinterfaced.c
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/deviceinterfaced.c
@@ -40,11 +40,9 @@
#define DEVICEINTERFACED_LABEL "com.apple.deviceinterfaced"
#define DEVICEINTERFACED_TARGET "system/" DEVICEINTERFACED_LABEL
#define DEVICEINTERFACED_PLIST "/Library/Apple/System/Library/PrivateFrameworks/DeviceInterface.framework/Support/com.apple.deviceinterfaced.plist"
-#define SUDO_PATH "/usr/bin/sudo"
#define LAUNCHCTL_PATH "/bin/launchctl"
-#define SUDO_PROMPT "[sudo] password to manage " DEVICEINTERFACED_LABEL ": "
-/* "sudo" "-p" prompt "--" "/bin/launchctl" + subcommand args (max observed: 3) + NULL */
-#define LAUNCHCTL_ARGV_MAX 10
+/* "/bin/launchctl" + subcommand args (max observed: 3) + NULL */
+#define LAUNCHCTL_ARGV_MAX 5
extern char **environ;
@@ -62,15 +60,9 @@ static THREAD_T killer_thread = THREAD_T_NULL;
/*
* Runs "launchctl <args...>". Read-only queries (e.g. "print") never need
- * elevated privileges and are run directly. State-changing subcommands
- * ("bootout", "bootstrap", "kickstart", "kill") act on a system-domain
- * LaunchDaemon and require root, so they are wrapped with "sudo" instead of
- * requiring the whole idevicerestore process to run as root. sudo prompts
- * for the password on the controlling terminal (/dev/tty) directly, so
- * redirecting stdout/stderr below does not hide the prompt; it is only
- * suppressed here to keep launchctl's own (uninteresting) output quiet.
- * Any sudo diagnostic (e.g. "a password is required") is left visible on
- * stderr for privileged calls so the user can see why it failed.
+ * elevated privileges and are run directly. State-changing subcommands act
+ * on a system-domain LaunchDaemon and require the caller to have started the
+ * restore command as root. This library never prompts or invokes sudo.
*/
static int launchctl_run(char *const args[], int privileged)
{
@@ -84,17 +76,11 @@ static int launchctl_run(char *const args[], int privileged)
int argc = 0;
int i;
- if (privileged) {
- argv[argc++] = SUDO_PATH;
- argv[argc++] = "-p";
- argv[argc++] = SUDO_PROMPT;
- argv[argc++] = "--";
- argv[argc++] = LAUNCHCTL_PATH;
- program = SUDO_PATH;
- } else {
- argv[argc++] = LAUNCHCTL_PATH;
- program = LAUNCHCTL_PATH;
+ if (privileged && geteuid() != 0) {
+ return -EPERM;
}
+ argv[argc++] = LAUNCHCTL_PATH;
+ program = LAUNCHCTL_PATH;
for (i = 0; args[i] != NULL; i++) {
if (argc >= LAUNCHCTL_ARGV_MAX - 1) {
return -ENAMETOOLONG;
@@ -108,7 +94,7 @@ static int launchctl_run(char *const args[], int privileged)
return -error;
}
error = posix_spawn_file_actions_addopen(&actions, STDOUT_FILENO, "/dev/null", O_WRONLY, 0);
- if (error == 0 && !privileged) {
+ if (error == 0) {
error = posix_spawn_file_actions_addopen(&actions, STDERR_FILENO, "/dev/null", O_WRONLY, 0);
}
if (error != 0) {
diff --git a/Sources/MobileRestoreCore/deviceinterfaced.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/deviceinterfaced.h
similarity index 100%
rename from Sources/MobileRestoreCore/deviceinterfaced.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/deviceinterfaced.h
diff --git a/Sources/MobileRestoreCore/idevicerestore.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/idevicerestore.c
similarity index 100%
rename from Sources/MobileRestoreCore/idevicerestore.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/idevicerestore.c
diff --git a/Sources/MobileRestoreCore/idevicerestore.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/idevicerestore.h
similarity index 100%
rename from Sources/MobileRestoreCore/idevicerestore.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/idevicerestore.h
diff --git a/Sources/MobileRestoreCore/locking.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/locking.c
similarity index 100%
rename from Sources/MobileRestoreCore/locking.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/locking.c
diff --git a/Sources/MobileRestoreCore/locking.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/locking.h
similarity index 100%
rename from Sources/MobileRestoreCore/locking.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/locking.h
diff --git a/Sources/MobileRestoreCore/log.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/log.c
similarity index 100%
rename from Sources/MobileRestoreCore/log.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/log.c
diff --git a/Sources/MobileRestoreCore/log.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/log.h
similarity index 100%
rename from Sources/MobileRestoreCore/log.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Core/log.h
diff --git a/Sources/MobileRestoreCore/fls.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/fls.c
similarity index 100%
rename from Sources/MobileRestoreCore/fls.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/fls.c
diff --git a/Sources/MobileRestoreCore/fls.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/fls.h
similarity index 100%
rename from Sources/MobileRestoreCore/fls.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/fls.h
diff --git a/Sources/MobileRestoreCore/ftab.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/ftab.c
similarity index 100%
rename from Sources/MobileRestoreCore/ftab.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/ftab.c
diff --git a/Sources/MobileRestoreCore/ftab.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/ftab.h
similarity index 100%
rename from Sources/MobileRestoreCore/ftab.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/ftab.h
diff --git a/Sources/MobileRestoreCore/mbn.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/mbn.c
similarity index 100%
rename from Sources/MobileRestoreCore/mbn.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/mbn.c
diff --git a/Sources/MobileRestoreCore/mbn.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/mbn.h
similarity index 100%
rename from Sources/MobileRestoreCore/mbn.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Containers/mbn.h
diff --git a/Sources/MobileRestoreCore/ace3.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/ace3.c
similarity index 100%
rename from Sources/MobileRestoreCore/ace3.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/ace3.c
diff --git a/Sources/MobileRestoreCore/ace3.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/ace3.h
similarity index 100%
rename from Sources/MobileRestoreCore/ace3.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/ace3.h
diff --git a/Sources/MobileRestoreCore/img3.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/img3.c
similarity index 100%
rename from Sources/MobileRestoreCore/img3.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/img3.c
diff --git a/Sources/MobileRestoreCore/img3.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/img3.h
similarity index 100%
rename from Sources/MobileRestoreCore/img3.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/img3.h
diff --git a/Sources/MobileRestoreCore/img4.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/img4.c
similarity index 100%
rename from Sources/MobileRestoreCore/img4.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/img4.c
diff --git a/Sources/MobileRestoreCore/img4.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/img4.h
similarity index 100%
rename from Sources/MobileRestoreCore/img4.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Firmware/Images/img4.h
diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Include/module.modulemap b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Include/module.modulemap
new file mode 100644
index 00000000..3adc0e9b
--- /dev/null
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Include/module.modulemap
@@ -0,0 +1,4 @@
+module MobileRestoreCore {
+ header "vphone_restore_bridge.h"
+ export *
+}
diff --git a/Sources/MobileRestoreCore/Include/vphone_restore_bridge.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Include/vphone_restore_bridge.h
similarity index 100%
rename from Sources/MobileRestoreCore/Include/vphone_restore_bridge.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Include/vphone_restore_bridge.h
diff --git a/Sources/MobileRestoreCore/dfu.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/dfu.c
similarity index 100%
rename from Sources/MobileRestoreCore/dfu.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/dfu.c
diff --git a/Sources/MobileRestoreCore/dfu.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/dfu.h
similarity index 100%
rename from Sources/MobileRestoreCore/dfu.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/dfu.h
diff --git a/Sources/MobileRestoreCore/limera1n.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/limera1n.c
similarity index 100%
rename from Sources/MobileRestoreCore/limera1n.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/limera1n.c
diff --git a/Sources/MobileRestoreCore/limera1n.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/limera1n.h
similarity index 100%
rename from Sources/MobileRestoreCore/limera1n.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/limera1n.h
diff --git a/Sources/MobileRestoreCore/limera1n_payload.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/limera1n_payload.h
similarity index 100%
rename from Sources/MobileRestoreCore/limera1n_payload.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/limera1n_payload.h
diff --git a/Sources/MobileRestoreCore/normal.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/normal.c
similarity index 100%
rename from Sources/MobileRestoreCore/normal.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/normal.c
diff --git a/Sources/MobileRestoreCore/normal.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/normal.h
similarity index 100%
rename from Sources/MobileRestoreCore/normal.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/normal.h
diff --git a/Sources/MobileRestoreCore/recovery.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/recovery.c
similarity index 100%
rename from Sources/MobileRestoreCore/recovery.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/recovery.c
diff --git a/Sources/MobileRestoreCore/recovery.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/recovery.h
similarity index 100%
rename from Sources/MobileRestoreCore/recovery.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Recovery/recovery.h
diff --git a/Sources/MobileRestoreCore/asr.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/asr.c
similarity index 100%
rename from Sources/MobileRestoreCore/asr.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/asr.c
diff --git a/Sources/MobileRestoreCore/asr.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/asr.h
similarity index 100%
rename from Sources/MobileRestoreCore/asr.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/asr.h
diff --git a/Sources/MobileRestoreCore/download.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/download.c
similarity index 100%
rename from Sources/MobileRestoreCore/download.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/download.c
diff --git a/Sources/MobileRestoreCore/download.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/download.h
similarity index 100%
rename from Sources/MobileRestoreCore/download.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/download.h
diff --git a/Sources/MobileRestoreCore/fdr.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/fdr.c
similarity index 100%
rename from Sources/MobileRestoreCore/fdr.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/fdr.c
diff --git a/Sources/MobileRestoreCore/fdr.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/fdr.h
similarity index 100%
rename from Sources/MobileRestoreCore/fdr.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/fdr.h
diff --git a/Sources/MobileRestoreCore/ipsw.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/ipsw.c
similarity index 100%
rename from Sources/MobileRestoreCore/ipsw.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/ipsw.c
diff --git a/Sources/MobileRestoreCore/ipsw.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/ipsw.h
similarity index 100%
rename from Sources/MobileRestoreCore/ipsw.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/ipsw.h
diff --git a/Sources/MobileRestoreCore/restore.c b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/restore.c
similarity index 100%
rename from Sources/MobileRestoreCore/restore.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/restore.c
diff --git a/Sources/MobileRestoreCore/restore.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/restore.h
similarity index 100%
rename from Sources/MobileRestoreCore/restore.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/Transfer/restore.h
diff --git a/Sources/MobileRestoreCore/config.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/config.h
similarity index 100%
rename from Sources/MobileRestoreCore/config.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/config.h
diff --git a/Sources/MobileRestoreCore/endianness.h b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/endianness.h
similarity index 100%
rename from Sources/MobileRestoreCore/endianness.h
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/MobileRestoreCore/endianness.h
diff --git a/Sources/VPhoneRestore/VPhoneRecoveryProbe.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Recovery/VPhoneRecoveryProbe.swift
similarity index 100%
rename from Sources/VPhoneRestore/VPhoneRecoveryProbe.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Recovery/VPhoneRecoveryProbe.swift
diff --git a/Sources/VPhoneRestore/VPhoneRestoreIdentity.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreIdentity.swift
similarity index 100%
rename from Sources/VPhoneRestore/VPhoneRestoreIdentity.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreIdentity.swift
diff --git a/Sources/VPhoneRestore/VPhoneRestoreLayout.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreLayout.swift
similarity index 99%
rename from Sources/VPhoneRestore/VPhoneRestoreLayout.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreLayout.swift
index c69cbae9..c3a3ce29 100644
--- a/Sources/VPhoneRestore/VPhoneRestoreLayout.swift
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreLayout.swift
@@ -61,7 +61,7 @@ public enum VPhoneRestoreLayout {
/// Python's `derive_shsh_output`: `<ECID as %016X>.shsh` beside the bundle,
/// or `auto.shsh` when the device never reported an ECID.
///
- /// The name is a contract, not a convenience — `VPhoneRestoreCLI`'s
+ /// The name is a contract, not a convenience — `VPhoneRestoreCommand`'s
/// `--offline` path picks the first `*.shsh` in the bundle, and the
/// `%016X` form is what sorts a per-device blob next to its VM.
public static func shshOutput(vmDir: URL, ecid: UInt64?) -> URL {
diff --git a/Sources/VPhoneRestore/VPhoneRestoreOptions.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreOptions.swift
similarity index 100%
rename from Sources/VPhoneRestore/VPhoneRestoreOptions.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreOptions.swift
diff --git a/Sources/VPhoneRestore/VPhoneRestoreRunner.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreRunner.swift
similarity index 100%
rename from Sources/VPhoneRestore/VPhoneRestoreRunner.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreRunner.swift
diff --git a/Sources/VPhoneRestore/VPhoneRestoreService.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreService.swift
similarity index 99%
rename from Sources/VPhoneRestore/VPhoneRestoreService.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreService.swift
index e2587767..c442825e 100644
--- a/Sources/VPhoneRestore/VPhoneRestoreService.swift
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreService.swift
@@ -118,7 +118,7 @@ public enum VPhoneRestoreService {
// The Python bridge ran with the bundle as its working
// directory, and idevicerestore's default cache IS the working
// directory, so naming it keeps personalized components landing
- // where they always have — no matter where the CLI is invoked.
+ // where they always have — no matter where the Command is invoked.
cacheDirectory: vmDir,
udid: VPhoneRestoreIdentity.normalizeUDID(udid),
ecid: ecid ?? 0,
diff --git a/Sources/VPhoneRestore/VPhoneRestoreTicket.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreTicket.swift
similarity index 100%
rename from Sources/VPhoneRestore/VPhoneRestoreTicket.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Restore/VPhoneRestoreTicket.swift
diff --git a/Sources/VPhoneRestore/VPhoneRestoreBackendError.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Support/VPhoneRestoreBackendError.swift
similarity index 98%
rename from Sources/VPhoneRestore/VPhoneRestoreBackendError.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Support/VPhoneRestoreBackendError.swift
index 275b4813..5d2a0770 100644
--- a/Sources/VPhoneRestore/VPhoneRestoreBackendError.swift
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Support/VPhoneRestoreBackendError.swift
@@ -4,7 +4,7 @@ import Foundation
/// Everything this module can fail with.
///
-/// Deliberately NOT named `VPhoneRestoreError`: `VPhoneCore` already exports a
+/// Deliberately NOT named `VPhoneRestoreError`: `VPhoneCoreKit` already exports a
/// type by that name and `vphone-cli` imports both, so sharing it would make
/// every unqualified use ambiguous.
///
diff --git a/Sources/VPhoneRestore/VPhoneRestoreEvent.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Support/VPhoneRestoreEvent.swift
similarity index 98%
rename from Sources/VPhoneRestore/VPhoneRestoreEvent.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Support/VPhoneRestoreEvent.swift
index 2069ebe7..a75d1b60 100644
--- a/Sources/VPhoneRestore/VPhoneRestoreEvent.swift
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/Sources/Support/VPhoneRestoreEvent.swift
@@ -76,7 +76,7 @@ public typealias VPhoneRestoreEventHandler = @Sendable (VPhoneRestoreEvent) -> V
// MARK: - VPhoneRestoreConsole
-/// The sink that stands in for what the CLI used to see.
+/// The sink that stands in for what the Command used to see.
///
/// `vphone-cli restore` ran the Python bridge through
/// `VPhoneProcessRunner.runStreaming`, which teed the child's stdout straight
diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.pbxproj b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..a838843e
--- /dev/null
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.pbxproj
@@ -0,0 +1,597 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 70;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 5036460E30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 5036460F30653D1000CAADDF /* AppleMobileDeviceLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = CC0000000000000000000201 /* AppleMobileDeviceLibrary */; };
+ 5036461030653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 5036461130653D1000CAADDF /* AppleMobileDeviceLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = CC0000000000000000000201 /* AppleMobileDeviceLibrary */; };
+ CC0000000000000000000101 /* AppleMobileDeviceLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = CC0000000000000000000201 /* AppleMobileDeviceLibrary */; };
+ CC0000000000000000000102 /* libVPhoneRestore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CC0000000000000000000031 /* libVPhoneRestore.a */; };
+ CC0000000000000000000103 /* libMobileRecoveryCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CC0000000000000000000032 /* libMobileRecoveryCore.a */; };
+ CC0000000000000000000104 /* libMobileRestoreCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CC0000000000000000000033 /* libMobileRestoreCore.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ CC0000000000000000000122 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = CC0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = CC0000000000000000000012;
+ remoteInfo = MobileRecoveryCore;
+ };
+ CC0000000000000000000124 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = CC0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = CC0000000000000000000013;
+ remoteInfo = MobileRestoreCore;
+ };
+ CC0000000000000000000126 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = CC0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = CC0000000000000000000011;
+ remoteInfo = VPhoneRestore;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ CC0000000000000000000031 /* libVPhoneRestore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVPhoneRestore.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ CC0000000000000000000032 /* libMobileRecoveryCore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMobileRecoveryCore.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ CC0000000000000000000033 /* libMobileRestoreCore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMobileRestoreCore.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ CC0000000000000000000034 /* VPhoneRestoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VPhoneRestoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFileSystemSynchronizedRootGroup section */
+ CC0000000000000000000021 /* Sources */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Sources; sourceTree = "<group>"; };
+ CC0000000000000000000022 /* MobileRecoveryCore */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = MobileRecoveryCore; sourceTree = "<group>"; };
+ CC0000000000000000000023 /* MobileRestoreCore */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = MobileRestoreCore; sourceTree = "<group>"; };
+ CC0000000000000000000024 /* VPhoneRestoreTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPhoneRestoreTests; sourceTree = "<group>"; };
+/* End PBXFileSystemSynchronizedRootGroup section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ CC0000000000000000000041 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ CC0000000000000000000042 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CC0000000000000000000101 /* AppleMobileDeviceLibrary in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ CC0000000000000000000043 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5036460E30653D1000CAADDF /* (null) in Frameworks */,
+ 5036460F30653D1000CAADDF /* AppleMobileDeviceLibrary in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ CC0000000000000000000044 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CC0000000000000000000102 /* libVPhoneRestore.a in Frameworks */,
+ CC0000000000000000000103 /* libMobileRecoveryCore.a in Frameworks */,
+ CC0000000000000000000104 /* libMobileRestoreCore.a in Frameworks */,
+ 5036461130653D1000CAADDF /* AppleMobileDeviceLibrary in Frameworks */,
+ 5036461030653D1000CAADDF /* (null) in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ CC0000000000000000000002 = {
+ isa = PBXGroup;
+ children = (
+ CC0000000000000000000021 /* Sources */,
+ CC0000000000000000000022 /* MobileRecoveryCore */,
+ CC0000000000000000000023 /* MobileRestoreCore */,
+ CC0000000000000000000024 /* VPhoneRestoreTests */,
+ CC0000000000000000000003 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ CC0000000000000000000003 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ CC0000000000000000000031 /* libVPhoneRestore.a */,
+ CC0000000000000000000032 /* libMobileRecoveryCore.a */,
+ CC0000000000000000000033 /* libMobileRestoreCore.a */,
+ CC0000000000000000000034 /* VPhoneRestoreTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ CC0000000000000000000011 /* VPhoneRestore */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = CC0000000000000000000081 /* Build configuration list for PBXNativeTarget "VPhoneRestore" */;
+ buildPhases = (
+ CC0000000000000000000051 /* Sources */,
+ CC0000000000000000000041 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ CC0000000000000000000121 /* PBXTargetDependency */,
+ CC0000000000000000000123 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ CC0000000000000000000021 /* Sources */,
+ );
+ name = VPhoneRestore;
+ productName = VPhoneRestore;
+ productReference = CC0000000000000000000031 /* libVPhoneRestore.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ CC0000000000000000000012 /* MobileRecoveryCore */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = CC0000000000000000000082 /* Build configuration list for PBXNativeTarget "MobileRecoveryCore" */;
+ buildPhases = (
+ CC0000000000000000000052 /* Sources */,
+ CC0000000000000000000042 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ fileSystemSynchronizedGroups = (
+ CC0000000000000000000022 /* MobileRecoveryCore */,
+ );
+ name = MobileRecoveryCore;
+ packageProductDependencies = (
+ CC0000000000000000000201 /* AppleMobileDeviceLibrary */,
+ );
+ productName = MobileRecoveryCore;
+ productReference = CC0000000000000000000032 /* libMobileRecoveryCore.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ CC0000000000000000000013 /* MobileRestoreCore */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = CC0000000000000000000083 /* Build configuration list for PBXNativeTarget "MobileRestoreCore" */;
+ buildPhases = (
+ CC0000000000000000000053 /* Sources */,
+ CC0000000000000000000043 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ CC0000000000000000000121 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ CC0000000000000000000023 /* MobileRestoreCore */,
+ );
+ name = MobileRestoreCore;
+ packageProductDependencies = (
+ CC0000000000000000000201 /* AppleMobileDeviceLibrary */,
+ );
+ productName = MobileRestoreCore;
+ productReference = CC0000000000000000000033 /* libMobileRestoreCore.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ CC0000000000000000000014 /* VPhoneRestoreTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = CC0000000000000000000084 /* Build configuration list for PBXNativeTarget "VPhoneRestoreTests" */;
+ buildPhases = (
+ CC0000000000000000000054 /* Sources */,
+ CC0000000000000000000044 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ CC0000000000000000000125 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ CC0000000000000000000024 /* VPhoneRestoreTests */,
+ );
+ name = VPhoneRestoreTests;
+ packageProductDependencies = (
+ CC0000000000000000000201 /* AppleMobileDeviceLibrary */,
+ );
+ productName = VPhoneRestoreTests;
+ productReference = CC0000000000000000000034 /* VPhoneRestoreTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ CC0000000000000000000001 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 2700;
+ };
+ buildConfigurationList = CC0000000000000000000080 /* Build configuration list for PBXProject "VPhoneRestore" */;
+ compatibilityVersion = "Xcode 16.0.Superseded.1";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = CC0000000000000000000002;
+ packageReferences = (
+ CC0000000000000000000171 /* XCRemoteSwiftPackageReference "AppleMobileDeviceLibrary" */,
+ );
+ productRefGroup = CC0000000000000000000003 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ CC0000000000000000000011 /* VPhoneRestore */,
+ CC0000000000000000000012 /* MobileRecoveryCore */,
+ CC0000000000000000000013 /* MobileRestoreCore */,
+ CC0000000000000000000014 /* VPhoneRestoreTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ CC0000000000000000000051 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ CC0000000000000000000052 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ CC0000000000000000000053 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ CC0000000000000000000054 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ CC0000000000000000000121 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = CC0000000000000000000012 /* MobileRecoveryCore */;
+ targetProxy = CC0000000000000000000122 /* PBXContainerItemProxy */;
+ };
+ CC0000000000000000000123 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = CC0000000000000000000013 /* MobileRestoreCore */;
+ targetProxy = CC0000000000000000000124 /* PBXContainerItemProxy */;
+ };
+ CC0000000000000000000125 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = CC0000000000000000000011 /* VPhoneRestore */;
+ targetProxy = CC0000000000000000000126 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ CC0000000000000000000061 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ ENABLE_TESTABILITY = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/MobileRecoveryCore/Include",
+ "$(PROJECT_DIR)/MobileRestoreCore/Include",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lMobileRecoveryCore",
+ "-lMobileRestoreCore",
+ );
+ PRODUCT_NAME = VPhoneRestore;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ CC0000000000000000000062 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/MobileRecoveryCore/Include",
+ "$(PROJECT_DIR)/MobileRestoreCore/Include",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lMobileRecoveryCore",
+ "-lMobileRestoreCore",
+ );
+ PRODUCT_NAME = VPhoneRestore;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ CC0000000000000000000063 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "HAVE_CONFIG_H=1",
+ "IRECV_STATIC=1",
+ );
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/MobileRecoveryCore",
+ "$(PROJECT_DIR)/MobileRecoveryCore/Include",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ MODULEMAP_FILE = "$(PROJECT_DIR)/MobileRecoveryCore/Include/module.modulemap";
+ PRODUCT_NAME = MobileRecoveryCore;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ CC0000000000000000000064 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "HAVE_CONFIG_H=1",
+ "IRECV_STATIC=1",
+ );
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/MobileRecoveryCore",
+ "$(PROJECT_DIR)/MobileRecoveryCore/Include",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ MODULEMAP_FILE = "$(PROJECT_DIR)/MobileRecoveryCore/Include/module.modulemap";
+ PRODUCT_NAME = MobileRecoveryCore;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ CC0000000000000000000065 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "HAVE_CONFIG_H=1",
+ "IRECV_STATIC=1",
+ "IDEVICERESTORE_NOMAIN=1",
+ );
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/MobileRestoreCore",
+ "$(PROJECT_DIR)/MobileRestoreCore/Core",
+ "$(PROJECT_DIR)/MobileRestoreCore/Transfer",
+ "$(PROJECT_DIR)/MobileRestoreCore/Firmware",
+ "$(PROJECT_DIR)/MobileRestoreCore/Firmware/Images",
+ "$(PROJECT_DIR)/MobileRestoreCore/Firmware/Containers",
+ "$(PROJECT_DIR)/MobileRestoreCore/Recovery",
+ "$(PROJECT_DIR)/MobileRestoreCore/Bridge",
+ "$(PROJECT_DIR)/MobileRestoreCore/Include",
+ "$(PROJECT_DIR)/MobileRecoveryCore/Include",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ MODULEMAP_FILE = "$(PROJECT_DIR)/MobileRestoreCore/Include/module.modulemap";
+ PRODUCT_NAME = MobileRestoreCore;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ CC0000000000000000000066 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "HAVE_CONFIG_H=1",
+ "IRECV_STATIC=1",
+ "IDEVICERESTORE_NOMAIN=1",
+ );
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/MobileRestoreCore",
+ "$(PROJECT_DIR)/MobileRestoreCore/Core",
+ "$(PROJECT_DIR)/MobileRestoreCore/Transfer",
+ "$(PROJECT_DIR)/MobileRestoreCore/Firmware",
+ "$(PROJECT_DIR)/MobileRestoreCore/Firmware/Images",
+ "$(PROJECT_DIR)/MobileRestoreCore/Firmware/Containers",
+ "$(PROJECT_DIR)/MobileRestoreCore/Recovery",
+ "$(PROJECT_DIR)/MobileRestoreCore/Bridge",
+ "$(PROJECT_DIR)/MobileRestoreCore/Include",
+ "$(PROJECT_DIR)/MobileRecoveryCore/Include",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ MODULEMAP_FILE = "$(PROJECT_DIR)/MobileRestoreCore/Include/module.modulemap";
+ PRODUCT_NAME = MobileRestoreCore;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ CC0000000000000000000067 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/MobileRecoveryCore/Include",
+ "$(PROJECT_DIR)/MobileRestoreCore/Include",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lz",
+ "-lcurl",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.restore.tests;
+ PRODUCT_NAME = VPhoneRestoreTests;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ CC0000000000000000000068 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(PROJECT_DIR)/MobileRecoveryCore/Include",
+ "$(PROJECT_DIR)/MobileRestoreCore/Include",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lz",
+ "-lcurl",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.restore.tests;
+ PRODUCT_NAME = VPhoneRestoreTests;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ CC0000000000000000000071 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ CC0000000000000000000072 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ CC0000000000000000000080 /* Build configuration list for PBXProject "VPhoneRestore" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CC0000000000000000000071 /* Debug */,
+ CC0000000000000000000072 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ CC0000000000000000000081 /* Build configuration list for PBXNativeTarget "VPhoneRestore" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CC0000000000000000000061 /* Debug */,
+ CC0000000000000000000062 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ CC0000000000000000000082 /* Build configuration list for PBXNativeTarget "MobileRecoveryCore" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CC0000000000000000000063 /* Debug */,
+ CC0000000000000000000064 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ CC0000000000000000000083 /* Build configuration list for PBXNativeTarget "MobileRestoreCore" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CC0000000000000000000065 /* Debug */,
+ CC0000000000000000000066 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ CC0000000000000000000084 /* Build configuration list for PBXNativeTarget "VPhoneRestoreTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CC0000000000000000000067 /* Debug */,
+ CC0000000000000000000068 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+
+/* Begin XCRemoteSwiftPackageReference section */
+ CC0000000000000000000171 /* XCRemoteSwiftPackageReference "AppleMobileDeviceLibrary" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Lakr233/AppleMobileDeviceLibrary.git";
+ requirement = {
+ kind = exactVersion;
+ version = 1.0.1790243523;
+ };
+ };
+/* End XCRemoteSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ CC0000000000000000000201 /* AppleMobileDeviceLibrary */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = CC0000000000000000000171 /* XCRemoteSwiftPackageReference "AppleMobileDeviceLibrary" */;
+ productName = AppleMobileDeviceLibrary;
+ };
+/* End XCSwiftPackageProductDependency section */
+ };
+ rootObject = CC0000000000000000000001 /* Project object */;
+}
diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
new file mode 100644
index 00000000..511b9f3a
--- /dev/null
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,24 @@
+{
+ "originHash" : "4625450bd4826f7cdca0997ee4b7286a611e663de2265f4188a0316fc46cf30a",
+ "pins" : [
+ {
+ "identity" : "applemobiledevicelibrary",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Lakr233/AppleMobileDeviceLibrary.git",
+ "state" : {
+ "revision" : "553a0bf1b55812b1a08c727b1a3084e88871343b",
+ "version" : "1.0.1790243523"
+ }
+ },
+ {
+ "identity" : "openssl-spm",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Lakr233/openssl-spm.git",
+ "state" : {
+ "revision" : "9f3b525d960fe71e534482310e96cd9c4f2faa17",
+ "version" : "3.6.2"
+ }
+ }
+ ],
+ "version" : 3
+}
diff --git a/Tests/VPhoneRestoreTests/RestoreEventTests.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreEventTests.swift
similarity index 100%
rename from Tests/VPhoneRestoreTests/RestoreEventTests.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreEventTests.swift
diff --git a/Tests/VPhoneRestoreTests/RestoreIdentityTests.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreIdentityTests.swift
similarity index 100%
rename from Tests/VPhoneRestoreTests/RestoreIdentityTests.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreIdentityTests.swift
diff --git a/Tests/VPhoneRestoreTests/RestoreLayoutTests.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreLayoutTests.swift
similarity index 100%
rename from Tests/VPhoneRestoreTests/RestoreLayoutTests.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreLayoutTests.swift
diff --git a/Tests/VPhoneRestoreTests/RestoreOptionsTests.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreOptionsTests.swift
similarity index 100%
rename from Tests/VPhoneRestoreTests/RestoreOptionsTests.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreOptionsTests.swift
diff --git a/Tests/VPhoneRestoreTests/RestoreRunnerTests.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreRunnerTests.swift
similarity index 100%
rename from Tests/VPhoneRestoreTests/RestoreRunnerTests.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreRunnerTests.swift
diff --git a/Tests/VPhoneRestoreTests/RestoreTicketTests.swift b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreTicketTests.swift
similarity index 100%
rename from Tests/VPhoneRestoreTests/RestoreTicketTests.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestoreTests/RestoreTicketTests.swift
diff --git a/Sources/VPhoneSign/VPhoneSignDER.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/Entitlements/VPhoneSignDER.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneSignDER.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/Entitlements/VPhoneSignDER.swift
diff --git a/Sources/VPhoneSign/VPhoneSignEntitlements.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/Entitlements/VPhoneSignEntitlements.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneSignEntitlements.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/Entitlements/VPhoneSignEntitlements.swift
diff --git a/Sources/VPhoneSign/VPhoneSignEntitlementsReader.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/Entitlements/VPhoneSignEntitlementsReader.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneSignEntitlementsReader.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/Entitlements/VPhoneSignEntitlementsReader.swift
diff --git a/Sources/VPhoneSign/VPhoneSignIdentity.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/Identity/VPhoneSignIdentity.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneSignIdentity.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/Identity/VPhoneSignIdentity.swift
diff --git a/Sources/VPhoneSign/VPhoneSignPKCS12.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/Identity/VPhoneSignPKCS12.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneSignPKCS12.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/Identity/VPhoneSignPKCS12.swift
diff --git a/Sources/VPhoneSign/VPhoneCodeSignature.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneCodeSignature.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneCodeSignature.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneCodeSignature.swift
diff --git a/Sources/VPhoneSign/VPhoneMachOImage.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneMachOImage.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneMachOImage.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneMachOImage.swift
diff --git a/Sources/VPhoneSign/VPhoneSignBytes.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/Signing/VPhoneSignBytes.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneSignBytes.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/Signing/VPhoneSignBytes.swift
diff --git a/Sources/VPhoneSign/VPhoneSignError.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/Signing/VPhoneSignError.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneSignError.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/Signing/VPhoneSignError.swift
diff --git a/Sources/VPhoneSign/VPhoneSigner.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSign/Signing/VPhoneSigner.swift
similarity index 100%
rename from Sources/VPhoneSign/VPhoneSigner.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSign/Signing/VPhoneSigner.swift
diff --git a/Tests/VPhoneSignTests/Fixtures/Entitlements/lsd.plist b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/lsd.plist
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/Entitlements/lsd.plist
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/lsd.plist
diff --git a/Tests/VPhoneSignTests/Fixtures/Entitlements/promotedcontentd.plist b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/promotedcontentd.plist
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/Entitlements/promotedcontentd.plist
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/promotedcontentd.plist
diff --git a/Tests/VPhoneSignTests/Fixtures/Entitlements/runningboardd.plist b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/runningboardd.plist
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/Entitlements/runningboardd.plist
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/runningboardd.plist
diff --git a/Tests/VPhoneSignTests/Fixtures/Entitlements/seserviced.plist b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/seserviced.plist
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/Entitlements/seserviced.plist
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/seserviced.plist
diff --git a/Tests/VPhoneSignTests/Fixtures/Entitlements/spindump.plist b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/spindump.plist
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/Entitlements/spindump.plist
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/spindump.plist
diff --git a/Tests/VPhoneSignTests/Fixtures/Entitlements/sshd.plist b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/sshd.plist
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/Entitlements/sshd.plist
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/sshd.plist
diff --git a/Tests/VPhoneSignTests/Fixtures/Entitlements/sysdiagnose_helper.plist b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/sysdiagnose_helper.plist
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/Entitlements/sysdiagnose_helper.plist
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Entitlements/sysdiagnose_helper.plist
diff --git a/Tests/VPhoneSignTests/Fixtures/hello-arm64 b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-arm64
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/hello-arm64
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-arm64
diff --git a/Tests/VPhoneSignTests/Fixtures/hello-arm64e b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-arm64e
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/hello-arm64e
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-arm64e
diff --git a/Tests/VPhoneSignTests/Fixtures/hello-dylib b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-dylib
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/hello-dylib
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-dylib
diff --git a/Tests/VPhoneSignTests/Fixtures/hello-fat b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-fat
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/hello-fat
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-fat
diff --git a/Tests/VPhoneSignTests/Fixtures/hello-ios b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-ios
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/hello-ios
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Executables/hello-ios
diff --git a/Tests/VPhoneSignTests/Fixtures/seeded-lsd b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-lsd
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/seeded-lsd
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-lsd
diff --git a/Tests/VPhoneSignTests/Fixtures/seeded-promotedcontentd b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-promotedcontentd
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/seeded-promotedcontentd
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-promotedcontentd
diff --git a/Tests/VPhoneSignTests/Fixtures/seeded-runningboardd b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-runningboardd
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/seeded-runningboardd
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-runningboardd
diff --git a/Tests/VPhoneSignTests/Fixtures/seeded-seserviced b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-seserviced
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/seeded-seserviced
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-seserviced
diff --git a/Tests/VPhoneSignTests/Fixtures/seeded-spindump b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-spindump
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/seeded-spindump
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-spindump
diff --git a/Tests/VPhoneSignTests/Fixtures/seeded-sshd b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-sshd
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/seeded-sshd
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-sshd
diff --git a/Tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helper b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-sysdiagnose_helper
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/seeded-sysdiagnose_helper
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Seeded/seeded-sysdiagnose_helper
diff --git a/Tests/VPhoneSignTests/Fixtures/hello.c b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Sources/hello.c
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/hello.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Sources/hello.c
diff --git a/Tests/VPhoneSignTests/Fixtures/library.c b/VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Sources/library.c
similarity index 100%
rename from Tests/VPhoneSignTests/Fixtures/library.c
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTestFixtures/Sources/library.c
diff --git a/Tests/VPhoneSignTests/VPhoneSignBlobs.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignBlobs.swift
similarity index 100%
rename from Tests/VPhoneSignTests/VPhoneSignBlobs.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignBlobs.swift
diff --git a/Tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignEntitlementsTests.swift
similarity index 100%
rename from Tests/VPhoneSignTests/VPhoneSignEntitlementsTests.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignEntitlementsTests.swift
diff --git a/Tests/VPhoneSignTests/VPhoneSignFixtures.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignFixtures.swift
similarity index 99%
rename from Tests/VPhoneSignTests/VPhoneSignFixtures.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignFixtures.swift
index 992b98b3..6fe05567 100644
--- a/Tests/VPhoneSignTests/VPhoneSignFixtures.swift
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignFixtures.swift
@@ -90,7 +90,7 @@ enum VPhoneSignFixtures {
// MARK: - The files
static var root: URL {
- URL(fileURLWithPath: #filePath).deletingLastPathComponent().appendingPathComponent("Fixtures")
+ URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("VPhoneSignTestFixtures")
}
/// The hand-built Mach-Os. Between them: thin arm64 and thin arm64e, a fat
@@ -132,7 +132,8 @@ enum VPhoneSignFixtures {
}
static func url(_ name: String) throws -> URL {
- let url = root.appendingPathComponent(name)
+ let folder = name.hasPrefix("seeded-") ? "Seeded" : "Executables"
+ let url = root.appendingPathComponent(folder).appendingPathComponent(name)
try #require(
FileManager.default.fileExists(atPath: url.path),
"fixture \"\(name)\" is missing from \(root.path); the corpus is committed, not built",
diff --git a/Tests/VPhoneSignTests/VPhoneSignParityTests.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignParityTests.swift
similarity index 100%
rename from Tests/VPhoneSignTests/VPhoneSignParityTests.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignParityTests.swift
diff --git a/Tests/VPhoneSignTests/VPhoneSignStyleTests.swift b/VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignStyleTests.swift
similarity index 100%
rename from Tests/VPhoneSignTests/VPhoneSignStyleTests.swift
rename to VPhoneExecutable/VPhoneCommand/VPhoneSignTests/VPhoneSignStyleTests.swift
diff --git a/Sources/VPhoneAMFIAllow/LICENSE b/VPhoneExecutable/VPhoneEscalator/Sources/LICENSE
similarity index 100%
rename from Sources/VPhoneAMFIAllow/LICENSE
rename to VPhoneExecutable/VPhoneEscalator/Sources/LICENSE
diff --git a/Sources/VPhoneAMFIAllow/vphone-amfi-allow.c b/VPhoneExecutable/VPhoneEscalator/Sources/VPhoneEscalator.c
similarity index 99%
rename from Sources/VPhoneAMFIAllow/vphone-amfi-allow.c
rename to VPhoneExecutable/VPhoneEscalator/Sources/VPhoneEscalator.c
index f324ef10..b4e7e3d5 100644
--- a/Sources/VPhoneAMFIAllow/vphone-amfi-allow.c
+++ b/VPhoneExecutable/VPhoneEscalator/Sources/VPhoneEscalator.c
@@ -664,9 +664,9 @@ int main(int argc, char **argv) {
fprintf(stderr,
"usage:\n"
- " vphone-amfi-allow status\n"
- " sudo vphone-amfi-allow allow [--hold N] <binary> [<binary>...]\n"
- " sudo vphone-amfi-allow off\n"
+ " VPhoneEscalator status\n"
+ " sudo VPhoneEscalator allow [--hold N] <binary> [<binary>...]\n"
+ " sudo VPhoneEscalator off\n"
"\n"
"Allow both signed vphone-vm copies after each build.\n");
return 2;
diff --git a/VPhoneExecutable/VPhoneEscalator/VPhoneEscalator.xcodeproj/project.pbxproj b/VPhoneExecutable/VPhoneEscalator/VPhoneEscalator.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..3bdc48b4
--- /dev/null
+++ b/VPhoneExecutable/VPhoneEscalator/VPhoneEscalator.xcodeproj/project.pbxproj
@@ -0,0 +1,64 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {};
+ objectVersion = 70;
+ objects = {
+/* Begin PBXFileReference section */
+ EE0000000000000000000031 /* VPhoneEscalator */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = VPhoneEscalator; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+/* Begin PBXFileSystemSynchronizedRootGroup section */
+ EE0000000000000000000021 /* Sources */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Sources; sourceTree = "<group>"; };
+/* End PBXFileSystemSynchronizedRootGroup section */
+/* Begin PBXFrameworksBuildPhase section */
+ EE0000000000000000000041 /* Frameworks */ = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (); runOnlyForDeploymentPostprocessing = 0; };
+/* End PBXFrameworksBuildPhase section */
+/* Begin PBXGroup section */
+ EE0000000000000000000002 = {isa = PBXGroup; children = (EE0000000000000000000021 /* Sources */, EE0000000000000000000003 /* Products */, ); sourceTree = "<group>"; };
+ EE0000000000000000000003 /* Products */ = {isa = PBXGroup; children = (EE0000000000000000000031 /* VPhoneEscalator */, ); name = Products; sourceTree = "<group>"; };
+/* End PBXGroup section */
+/* Begin PBXNativeTarget section */
+ EE0000000000000000000011 /* VPhoneEscalator */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = EE0000000000000000000081 /* Build configuration list for PBXNativeTarget "VPhoneEscalator" */;
+ buildPhases = (EE0000000000000000000051 /* Sources */, EE0000000000000000000041 /* Frameworks */, );
+ buildRules = ();
+ dependencies = ();
+ fileSystemSynchronizedGroups = (EE0000000000000000000021 /* Sources */, );
+ name = VPhoneEscalator;
+ productName = VPhoneEscalator;
+ productReference = EE0000000000000000000031 /* VPhoneEscalator */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+/* Begin PBXProject section */
+ EE0000000000000000000001 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {LastUpgradeCheck = 2700; };
+ buildConfigurationList = EE0000000000000000000080 /* Build configuration list for PBXProject "VPhoneEscalator" */;
+ compatibilityVersion = "Xcode 16.0";
+ developmentRegion = en;
+ knownRegions = (en, Base, );
+ mainGroup = EE0000000000000000000002;
+ productRefGroup = EE0000000000000000000003 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (EE0000000000000000000011 /* VPhoneEscalator */, );
+ };
+/* End PBXProject section */
+/* Begin PBXSourcesBuildPhase section */
+ EE0000000000000000000051 /* Sources */ = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (); runOnlyForDeploymentPostprocessing = 0; };
+/* End PBXSourcesBuildPhase section */
+/* Begin XCBuildConfiguration section */
+ EE0000000000000000000061 /* Debug */ = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreFoundation, "-framework", Security, ); PRODUCT_NAME = VPhoneEscalator; SDKROOT = macosx; }; name = Debug; };
+ EE0000000000000000000062 /* Release */ = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreFoundation, "-framework", Security, ); PRODUCT_NAME = VPhoneEscalator; SDKROOT = macosx; }; name = Release; };
+ EE0000000000000000000071 /* Debug */ = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; SDKROOT = macosx; }; name = Debug; };
+ EE0000000000000000000072 /* Release */ = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; SDKROOT = macosx; }; name = Release; };
+/* End XCBuildConfiguration section */
+/* Begin XCConfigurationList section */
+ EE0000000000000000000080 /* Build configuration list for PBXProject "VPhoneEscalator" */ = {isa = XCConfigurationList; buildConfigurations = (EE0000000000000000000071 /* Debug */, EE0000000000000000000072 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
+ EE0000000000000000000081 /* Build configuration list for PBXNativeTarget "VPhoneEscalator" */ = {isa = XCConfigurationList; buildConfigurations = (EE0000000000000000000061 /* Debug */, EE0000000000000000000062 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
+/* End XCConfigurationList section */
+ };
+ rootObject = EE0000000000000000000001 /* Project object */;
+}
diff --git a/VPhoneExecutable/VPhoneVirtualization/Build/StageApp.sh b/VPhoneExecutable/VPhoneVirtualization/Build/StageApp.sh
new file mode 100755
index 00000000..1098500d
--- /dev/null
+++ b/VPhoneExecutable/VPhoneVirtualization/Build/StageApp.sh
@@ -0,0 +1,63 @@
+#!/bin/zsh
+# vphone-tier: build
+set -euo pipefail
+
+root="$(cd "${0:a:h}/../../.." && pwd)"
+configuration="${CONFIGURATION:?}"
+app="${TARGET_BUILD_DIR:?}/${FULL_PRODUCT_NAME:?}"
+macos="$app/Contents/MacOS"
+resources="$app/Contents/Resources"
+
+/usr/bin/xcodebuild -project "$root/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj" \
+ -scheme VPhoneRestore -configuration "$configuration" \
+ -destination 'platform=macOS,arch=arm64' \
+ -derivedDataPath "$root/.build/XcodeRestore" CODE_SIGNING_ALLOWED=NO build
+
+/usr/bin/xcodebuild -project "$root/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj" \
+ -scheme VPhoneCommand -configuration "$configuration" \
+ -destination 'platform=macOS,arch=arm64' \
+ -derivedDataPath "$root/.build/XcodeCommand" CODE_SIGNING_ALLOWED=NO build
+
+/usr/bin/xcodebuild -project "$root/VPhoneDaemon/VPhoneDaemon.xcodeproj" \
+ -scheme vphoned -configuration "$configuration" \
+ -destination 'generic/platform=iOS' \
+ -derivedDataPath "$root/.build/XcodeDaemon" CODE_SIGNING_ALLOWED=NO build
+
+/usr/bin/xcodebuild -project "$root/VPhoneDaemon/VPhoneDaemon.xcodeproj" \
+ -scheme vpregister -configuration "$configuration" \
+ -destination 'generic/platform=iOS' \
+ -derivedDataPath "$root/.build/XcodeDaemon" CODE_SIGNING_ALLOWED=NO build
+
+/usr/bin/xcodebuild -project "$root/VPhoneExecutable/VPhoneEscalator/VPhoneEscalator.xcodeproj" \
+ -scheme VPhoneEscalator -configuration "$configuration" \
+ -destination 'platform=macOS,arch=arm64e' \
+ -derivedDataPath "$root/.build/XcodeEscalator" CODE_SIGNING_ALLOWED=NO build
+
+/usr/bin/make -C "$root/VPhoneGuestComponents" OUT="$root/.build/guest-components" all
+
+command_products="$root/.build/XcodeCommand/Build/Products/$configuration"
+daemon_products="$root/.build/XcodeDaemon/Build/Products/$configuration-iphoneos"
+escalator_products="$root/.build/XcodeEscalator/Build/Products/$configuration"
+guest_products="$root/.build/guest-components/stage"
+
+/bin/mkdir -p "$macos" "$resources/scripts/vphoned" "$resources/guest"
+/bin/cp "$command_products/vphone-cli" "$macos/vphone-cli"
+/bin/cp "$daemon_products/vphoned" "$macos/vphoned"
+/bin/cp "$daemon_products/vphoned" "$macos/vphoned.signed"
+/bin/cp "$daemon_products/vpregister" "$macos/vpregister"
+/bin/cp "$escalator_products/VPhoneEscalator" "$macos/VPhoneEscalator"
+/bin/cp "$guest_products/camfix/libcamfix.dylib" "$macos/libcamfix.dylib"
+/bin/cp "$guest_products/vcamcaptured/libvcamcaptured.dylib" "$macos/libvcamcaptured.dylib"
+/bin/cp "$guest_products/tweakloader/TweakLoader.dylib" "$macos/TweakLoader.dylib"
+/bin/cp "$guest_products/gpu/libAppleParavirtCompilerPluginIOGPUFamily.dylib" "$macos/libAppleParavirtCompilerPluginIOGPUFamily.dylib"
+/bin/cp "$root/VPhoneDaemon/Configuration/vphoned.plist" "$resources/scripts/vphoned/vphoned.plist"
+/bin/cp "$root/VPhoneDaemon/Configuration/entitlements.plist" "$resources/scripts/vphoned/entitlements.plist"
+/bin/cp "$guest_products/camfix/libcamfix.plist" "$resources/guest/libcamfix.plist"
+/bin/cp "$guest_products/vcamcaptured/libvcamcaptured.plist" "$resources/guest/libvcamcaptured.plist"
+/bin/cp "$root/VPhoneExecutable/VPhoneVirtualization/Resources/AppIcon.icns" "$resources/AppIcon.icns"
+
+/usr/bin/codesign --force --sign - "$macos/vphone-cli"
+/usr/bin/codesign --force --sign - --entitlements "$root/VPhoneDaemon/Configuration/entitlements.plist" "$macos/vphoned.signed"
+/usr/bin/codesign --force --sign - "$macos/vpregister"
+/usr/bin/codesign --force --sign - "$macos/VPhoneEscalator"
+/usr/bin/codesign --force --sign - --entitlements "$root/VPhoneExecutable/VPhoneVirtualization/Resources/vphone.entitlements" "$app"
diff --git a/Sources/AppIcon.icns b/VPhoneExecutable/VPhoneVirtualization/Resources/AppIcon.icns
similarity index 100%
rename from Sources/AppIcon.icns
rename to VPhoneExecutable/VPhoneVirtualization/Resources/AppIcon.icns
diff --git a/Sources/Info.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plist
similarity index 72%
rename from Sources/Info.plist
rename to VPhoneExecutable/VPhoneVirtualization/Resources/Info.plist
index 760842d5..987d6880 100644
--- a/Sources/Info.plist
+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plist
@@ -3,16 +3,13 @@
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
- <string>com.vphone.cli</string>
- <!-- vphone-vm, not vphone-cli: this bundle exists to give the process that
- becomes an NSApplication its icon, LSUIElement and the location usage
- strings below, and that process is vphone-vm. vphone-cli ships in the
- same Contents/MacOS and is run directly; nothing opens this .app
- through Launch Services. -->
+ <string>com.vphone.app</string>
+ <!-- The app launches vphone-vm; vphone-cli is a companion executable in
+ Contents/MacOS. -->
<key>CFBundleExecutable</key>
<string>vphone-vm</string>
<key>CFBundleName</key>
- <string>vphone-cli</string>
+ <string>VPhone</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
diff --git a/Sources/vphone.entitlements b/VPhoneExecutable/VPhoneVirtualization/Resources/vphone.entitlements
similarity index 100%
rename from Sources/vphone.entitlements
rename to VPhoneExecutable/VPhoneVirtualization/Resources/vphone.entitlements
diff --git a/Sources/VPhoneVM/main.swift b/VPhoneExecutable/VPhoneVirtualization/Sources/main.swift
similarity index 90%
rename from Sources/VPhoneVM/main.swift
rename to VPhoneExecutable/VPhoneVirtualization/Sources/main.swift
index 0a197144..b0fd95c6 100644
--- a/Sources/VPhoneVM/main.swift
+++ b/VPhoneExecutable/VPhoneVirtualization/Sources/main.swift
@@ -11,7 +11,7 @@
// binary has exactly one job, so there is nothing to select between.
import ArgumentParser
-import VPhoneCore
+import VPhoneCoreKit
import VPhoneVirtualMachineKit
-VPhoneGuestApp.run(VPhoneBootCLI.parseOrExit())
+VPhoneGuestApp.run(VPhoneBootCommand.parseOrExit())
diff --git a/Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneAPIProxy.swift b/VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneAPIProxy.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneAPIProxy.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneAPIProxy.swift
diff --git a/Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneGuestControl.swift b/VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneGuestControl.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift
diff --git a/Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneGuestControlApps.swift b/VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlApps.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneGuestControlApps.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlApps.swift
diff --git a/Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneGuestControlKeychain.swift b/VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlKeychain.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneGuestControlKeychain.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlKeychain.swift
diff --git a/Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneGuestControlSystem.swift b/VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlSystem.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/GuestCommunication/VPhoneGuestControlSystem.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlSystem.swift
diff --git a/Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneCameraServer.swift b/VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneCameraServer.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneCameraServer.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneCameraServer.swift
diff --git a/Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneFrameProducer.swift b/VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneFrameProducer.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneFrameProducer.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneFrameProducer.swift
diff --git a/Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneLocationProvider.swift b/VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneLocationProvider.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneLocationProvider.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneLocationProvider.swift
diff --git a/Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneScreenRecorder.swift b/VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneScreenRecorder.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneScreenRecorder.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneScreenRecorder.swift
diff --git a/Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneTouchIDMonitor.swift b/VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneTouchIDMonitor.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/HostDevices/VPhoneTouchIDMonitor.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneTouchIDMonitor.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneAppBrowserModel.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserModel.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneAppBrowserModel.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserModel.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneAppBrowserView.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserView.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneAppBrowserView.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserView.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneAppWindowController.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppWindowController.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneAppWindowController.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppWindowController.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneFileBrowserModel.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserModel.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneFileBrowserModel.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserModel.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneFileBrowserView.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneFileBrowserView.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneFileWindowController.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileWindowController.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneFileWindowController.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileWindowController.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneRemoteFile.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneRemoteFile.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneRemoteFile.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneRemoteFile.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneKeychainBrowserModel.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainBrowserModel.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneKeychainBrowserModel.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainBrowserModel.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneKeychainBrowserView.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainBrowserView.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneKeychainBrowserView.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainBrowserView.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneKeychainItem.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainItem.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneKeychainItem.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainItem.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneKeychainWindowController.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainWindowController.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneKeychainWindowController.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainWindowController.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneQuickLookController.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Preview/VPhoneQuickLookController.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Browsers/VPhoneQuickLookController.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Preview/VPhoneQuickLookController.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuApps.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuApps.swift
similarity index 99%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuApps.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuApps.swift
index f2fcd7fa..c68313ab 100644
--- a/Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuApps.swift
+++ b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuApps.swift
@@ -1,6 +1,6 @@
import AppKit
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
// MARK: - Apps Menu
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuBattery.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuBattery.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuBattery.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuBattery.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuCamera.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuCamera.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuCamera.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuCamera.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuConnect.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuConnect.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuConnect.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuConnect.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuController.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuController.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuController.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuController.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuKeys.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuKeys.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuKeys.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuKeys.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuLocation.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuLocation.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuLocation.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuLocation.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuRecord.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuRecord.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/Menu/VPhoneMenuRecord.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuRecord.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/VPhoneVirtualMachineKeySender.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineKeySender.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/VPhoneVirtualMachineKeySender.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineKeySender.swift
diff --git a/Sources/VPhoneVirtualMachineKit/UserInterface/VPhoneVirtualMachineWindowController.swift b/VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/UserInterface/VPhoneVirtualMachineWindowController.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift
diff --git a/Sources/VPhoneVirtualMachineKit/VPhoneBootCLI+VirtualMachine.swift b/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneBootCommand+VirtualMachine.swift
similarity index 86%
rename from Sources/VPhoneVirtualMachineKit/VPhoneBootCLI+VirtualMachine.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/VPhoneBootCommand+VirtualMachine.swift
index e89ed078..18effe66 100644
--- a/Sources/VPhoneVirtualMachineKit/VPhoneBootCLI+VirtualMachine.swift
+++ b/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneBootCommand+VirtualMachine.swift
@@ -1,10 +1,10 @@
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
-/// The half of VPhoneBootCLI that needs the Virtualization framework. The
-/// options themselves live in VPhoneCore so vphone-cli can parse and forward
+/// The half of VPhoneBootCommand that needs the Virtualization framework. The
+/// options themselves live in VPhoneCoreKit so vphone-cli can parse and forward
/// them without linking any of this.
-extension VPhoneBootCLI {
+extension VPhoneBootCommand {
/// Resolve final options by merging manifest values.
func resolveOptions() throws -> VPhoneVirtualMachine.Options {
let manifest = try VPhoneVirtualMachineManifest.load(from: config)
diff --git a/Sources/VPhoneVirtualMachineKit/VPhoneGuestApp.swift b/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneGuestApp.swift
similarity index 87%
rename from Sources/VPhoneVirtualMachineKit/VPhoneGuestApp.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/VPhoneGuestApp.swift
index 66893696..9694c28d 100644
--- a/Sources/VPhoneVirtualMachineKit/VPhoneGuestApp.swift
+++ b/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneGuestApp.swift
@@ -1,6 +1,6 @@
import AppKit
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
/// The kit's entry point: turn parsed boot options into a running guest.
///
@@ -15,9 +15,9 @@ public enum VPhoneGuestApp {
/// `@MainActor` because NSApplication is: at the top of `main.swift` that
/// isolation was implicit, and moving the code into a function loses it.
@MainActor
- public static func run(_ boot: VPhoneBootCLI) -> Never {
+ public static func run(_ boot: VPhoneBootCommand) -> Never {
let app = NSApplication.shared
- let delegate = VPhoneVirtualMachineAppDelegate(cli: boot)
+ let delegate = VPhoneVirtualMachineAppDelegate(command: boot)
app.delegate = delegate
app.run()
// NSApplication.run() does not return through here in practice: the
diff --git a/Sources/VPhoneVirtualMachineKit/VPhoneHostAutomationServer.swift b/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/VPhoneHostAutomationServer.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift
diff --git a/Sources/VPhoneVirtualMachineKit/VPhoneVirtualMachineAppDelegate.swift b/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift
similarity index 94%
rename from Sources/VPhoneVirtualMachineKit/VPhoneVirtualMachineAppDelegate.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift
index 4dac6f34..4479a328 100644
--- a/Sources/VPhoneVirtualMachineKit/VPhoneVirtualMachineAppDelegate.swift
+++ b/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift
@@ -1,10 +1,10 @@
import AppKit
import Foundation
import Virtualization
-import VPhoneCore
+import VPhoneCoreKit
class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {
- private let cli: VPhoneBootCLI
+ private let command: VPhoneBootCommand
private var vm: VPhoneVirtualMachine?
private var control: VPhoneGuestControl?
private var windowController: VPhoneVirtualMachineWindowController?
@@ -19,13 +19,13 @@ class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {
private var sigintSource: DispatchSourceSignal?
private var didAttemptAutoInstall = false
- init(cli: VPhoneBootCLI) {
- self.cli = cli
+ init(command: VPhoneBootCommand) {
+ self.command = command
super.init()
}
func applicationDidFinishLaunching(_: Notification) {
- NSApp.setActivationPolicy(cli.noGraphics ? .prohibited : .regular)
+ NSApp.setActivationPolicy(command.noGraphics ? .prohibited : .regular)
signal(SIGINT, SIG_IGN)
let src = DispatchSource.makeSignalSource(signal: SIGINT, queue: .main)
@@ -48,7 +48,7 @@ class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {
@MainActor
private func startVirtualMachine() async throws {
- let options = try cli.resolveOptions()
+ let options = try command.resolveOptions()
guard options.romURL == nil || FileManager.default.fileExists(atPath: options.romURL!.path) else {
throw VPhoneVirtualMachineError.romNotFound(options.romURL!.path)
@@ -77,12 +77,12 @@ class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {
let vm = try VPhoneVirtualMachine(options: options)
self.vm = vm
- try await vm.start(forceDFU: cli.dfu)
+ try await vm.start(forceDFU: command.dfu)
let control = VPhoneGuestControl()
self.control = control
- if !cli.dfu {
- let vphonedURL = URL(fileURLWithPath: cli.vphonedBin)
+ if !command.dfu {
+ let vphonedURL = URL(fileURLWithPath: command.vphonedBin)
if FileManager.default.fileExists(atPath: vphonedURL.path) {
control.guestBinaryURL = vphonedURL
}
@@ -96,19 +96,19 @@ class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {
if let device = vm.virtualMachine.socketDevices.first as? VZVirtioSocketDevice {
control.connect(device: device)
camServer.connect(device: device)
- if let listen = cli.apiListen {
+ if let listen = command.apiListen {
let proxy = try VPhoneAPIProxy(device: device, listen: listen)
let url = try await proxy.start()
apiProxy = proxy
print("[api] HTTP/WebSocket API: \(url.absoluteString)")
print("[api] OpenAPI: \(url.appending(path: "openapi.json").absoluteString)")
}
- } else if cli.apiListen != nil {
+ } else if command.apiListen != nil {
throw VPhoneVirtualMachineError.apiSocketUnavailable
}
}
- if !cli.noGraphics {
+ if !command.noGraphics {
let keySender = VPhoneVirtualMachineKeySender(vm: vm, control: control)
let wc = VPhoneVirtualMachineWindowController()
wc.showWindow(
@@ -209,7 +209,7 @@ class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {
provider?.stopForwarding()
mc?.updateLocationCapability(available: false)
}
- } else if !cli.dfu {
+ } else if !command.dfu {
// Headless mode: auto-start location as before (no menu exists)
control.onConnect = { [weak provider = locationProvider] caps in
if caps.contains("location") {
@@ -231,7 +231,7 @@ class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {
@MainActor
private func installPackageIfRequested(caps: [String]) async {
guard !didAttemptAutoInstall else { return }
- guard let packageURL = cli.installPackageURL else { return }
+ guard let packageURL = command.installPackageURL else { return }
guard FileManager.default.fileExists(atPath: packageURL.path) else {
didAttemptAutoInstall = true
@@ -271,6 +271,6 @@ class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {
}
func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool {
- !cli.noGraphics
+ !command.noGraphics
}
}
diff --git a/Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachine.swift b/VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift
similarity index 99%
rename from Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachine.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift
index 929806be..ac852c12 100644
--- a/Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachine.swift
+++ b/VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift
@@ -1,7 +1,7 @@
import Dynamic
import Foundation
import Virtualization
-import VPhoneCore
+import VPhoneCoreKit
/// Minimal VM for booting a vphone (virtual iPhone) in DFU mode.
@MainActor
diff --git a/Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachineError.swift b/VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineError.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachineError.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineError.swift
diff --git a/Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachineHardwareModel.swift b/VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineHardwareModel.swift
similarity index 100%
rename from Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachineHardwareModel.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineHardwareModel.swift
diff --git a/Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachineView.swift b/VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift
similarity index 99%
rename from Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachineView.swift
rename to VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift
index 48b1dbcd..3154ff29 100644
--- a/Sources/VPhoneVirtualMachineKit/VirtualMachine/VPhoneVirtualMachineView.swift
+++ b/VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift
@@ -2,7 +2,7 @@ import AppKit
import Dynamic
import Foundation
import Virtualization
-import VPhoneCore
+import VPhoneCoreKit
class VPhoneVirtualMachineView: VZVirtualMachineView {
var keySender: VPhoneVirtualMachineKeySender?
diff --git a/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.pbxproj b/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..96760e07
--- /dev/null
+++ b/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.pbxproj
@@ -0,0 +1,428 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 70;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ DD0000000000000000000101 /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = DD0000000000000000000201 /* ArgumentParser */; };
+ DD0000000000000000000102 /* Dynamic in Frameworks */ = {isa = PBXBuildFile; productRef = DD0000000000000000000202 /* Dynamic */; };
+ DD0000000000000000000103 /* NIOCore in Frameworks */ = {isa = PBXBuildFile; productRef = DD0000000000000000000203 /* NIOCore */; };
+ DD0000000000000000000104 /* NIOPosix in Frameworks */ = {isa = PBXBuildFile; productRef = DD0000000000000000000204 /* NIOPosix */; };
+ DD0000000000000000000105 /* libVPhoneVirtualMachineKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DD0000000000000000000032 /* libVPhoneVirtualMachineKit.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ DD0000000000000000000122 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = DD0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = DD0000000000000000000012;
+ remoteInfo = VPhoneVirtualMachineKit;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ DD0000000000000000000031 /* vphone-app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "vphone-app.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ DD0000000000000000000032 /* libVPhoneVirtualMachineKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVPhoneVirtualMachineKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFileSystemSynchronizedRootGroup section */
+ DD0000000000000000000021 /* Sources */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Sources; sourceTree = "<group>"; };
+ DD0000000000000000000022 /* UI */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = UI; sourceTree = "<group>"; };
+ DD0000000000000000000023 /* Resources */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Resources; sourceTree = "<group>"; };
+ DD0000000000000000000024 /* Build */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Build; sourceTree = "<group>"; };
+/* End PBXFileSystemSynchronizedRootGroup section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ DD0000000000000000000041 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ DD0000000000000000000101 /* ArgumentParser in Frameworks */,
+ DD0000000000000000000105 /* libVPhoneVirtualMachineKit.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ DD0000000000000000000042 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ DD0000000000000000000102 /* Dynamic in Frameworks */,
+ DD0000000000000000000103 /* NIOCore in Frameworks */,
+ DD0000000000000000000104 /* NIOPosix in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ DD0000000000000000000002 = {
+ isa = PBXGroup;
+ children = (
+ DD0000000000000000000021 /* Sources */,
+ DD0000000000000000000022 /* UI */,
+ DD0000000000000000000023 /* Resources */,
+ DD0000000000000000000024 /* Build */,
+ DD0000000000000000000003 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ DD0000000000000000000003 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ DD0000000000000000000031 /* vphone-app.app */,
+ DD0000000000000000000032 /* libVPhoneVirtualMachineKit.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ DD0000000000000000000011 /* vphone-app */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = DD0000000000000000000081 /* Build configuration list for PBXNativeTarget "vphone-app" */;
+ buildPhases = (
+ DD0000000000000000000051 /* Sources */,
+ DD0000000000000000000041 /* Frameworks */,
+ DD0000000000000000000061 /* Bundle Companion Binaries */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ DD0000000000000000000121 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ DD0000000000000000000021 /* Sources */,
+ );
+ name = "vphone-app";
+ packageProductDependencies = (
+ DD0000000000000000000201 /* ArgumentParser */,
+ );
+ productName = "vphone-app";
+ productReference = DD0000000000000000000031 /* vphone-app.app */;
+ productType = "com.apple.product-type.application";
+ };
+ DD0000000000000000000012 /* VPhoneVirtualMachineKit */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = DD0000000000000000000082 /* Build configuration list for PBXNativeTarget "VPhoneVirtualMachineKit" */;
+ buildPhases = (
+ DD0000000000000000000062 /* Build VPhoneKit */,
+ DD0000000000000000000052 /* Sources */,
+ DD0000000000000000000042 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ fileSystemSynchronizedGroups = (
+ DD0000000000000000000022 /* UI */,
+ );
+ name = VPhoneVirtualMachineKit;
+ packageProductDependencies = (
+ DD0000000000000000000202 /* Dynamic */,
+ DD0000000000000000000203 /* NIOCore */,
+ DD0000000000000000000204 /* NIOPosix */,
+ );
+ productName = VPhoneVirtualMachineKit;
+ productReference = DD0000000000000000000032 /* libVPhoneVirtualMachineKit.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ DD0000000000000000000001 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 2700;
+ };
+ buildConfigurationList = DD0000000000000000000080 /* Build configuration list for PBXProject "VPhoneVirtualization" */;
+ compatibilityVersion = "Xcode 16.0.Superseded.1";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = DD0000000000000000000002;
+ packageReferences = (
+ DD0000000000000000000171 /* XCRemoteSwiftPackageReference "swift-argument-parser" */,
+ DD0000000000000000000172 /* XCRemoteSwiftPackageReference "Dynamic" */,
+ DD0000000000000000000173 /* XCRemoteSwiftPackageReference "swift-nio" */,
+ );
+ productRefGroup = DD0000000000000000000003 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ DD0000000000000000000011 /* vphone-app */,
+ DD0000000000000000000012 /* VPhoneVirtualMachineKit */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ DD0000000000000000000061 /* Bundle Companion Binaries */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Bundle Companion Binaries";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/zsh;
+ shellScript = "\"$SRCROOT/Build/StageApp.sh\"\n";
+ };
+ DD0000000000000000000062 /* Build VPhoneKit */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Build VPhoneKit";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/zsh;
+ shellScript = "set -euo pipefail\nroot=\"$(cd \"$SRCROOT/../..\" && pwd)\"\n/usr/bin/xcodebuild -project \"$root/VPhoneKit/VPhoneKit.xcodeproj\" -scheme VPhoneArchiveKit -configuration \"$CONFIGURATION\" -destination 'platform=macOS,arch=arm64' -derivedDataPath \"$root/.build/XcodeKit\" CODE_SIGNING_ALLOWED=NO build\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ DD0000000000000000000051 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ DD0000000000000000000052 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ DD0000000000000000000121 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = DD0000000000000000000012 /* VPhoneVirtualMachineKit */;
+ targetProxy = DD0000000000000000000122 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ DD0000000000000000000071 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ EXECUTABLE_NAME = "vphone-vm";
+ GENERATE_INFOPLIST_FILE = NO;
+ INFOPLIST_FILE = Resources/Info.plist;
+ LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneVirtualMachineKit",
+ "-lVPhoneCoreKit",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.app;
+ PRODUCT_MODULE_NAME = VPhoneVirtualization;
+ PRODUCT_NAME = "vphone-app";
+ SDKROOT = macosx;
+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ DD0000000000000000000072 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ EXECUTABLE_NAME = "vphone-vm";
+ GENERATE_INFOPLIST_FILE = NO;
+ INFOPLIST_FILE = Resources/Info.plist;
+ LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneVirtualMachineKit",
+ "-lVPhoneCoreKit",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.app;
+ PRODUCT_MODULE_NAME = VPhoneVirtualization;
+ PRODUCT_NAME = "vphone-app";
+ SDKROOT = macosx;
+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ DD0000000000000000000073 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneCoreKit",
+ );
+ PRODUCT_NAME = VPhoneVirtualMachineKit;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_INCLUDE_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ DD0000000000000000000074 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneCoreKit",
+ );
+ PRODUCT_NAME = VPhoneVirtualMachineKit;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_INCLUDE_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ DD0000000000000000000075 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ DD0000000000000000000076 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ DD0000000000000000000080 /* Build configuration list for PBXProject "VPhoneVirtualization" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ DD0000000000000000000075 /* Debug */,
+ DD0000000000000000000076 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ DD0000000000000000000081 /* Build configuration list for PBXNativeTarget "vphone-app" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ DD0000000000000000000071 /* Debug */,
+ DD0000000000000000000072 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ DD0000000000000000000082 /* Build configuration list for PBXNativeTarget "VPhoneVirtualMachineKit" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ DD0000000000000000000073 /* Debug */,
+ DD0000000000000000000074 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+
+/* Begin XCRemoteSwiftPackageReference section */
+ DD0000000000000000000171 /* XCRemoteSwiftPackageReference "swift-argument-parser" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/apple/swift-argument-parser.git";
+ requirement = {
+ kind = exactVersion;
+ version = 1.3.1;
+ };
+ };
+ DD0000000000000000000172 /* XCRemoteSwiftPackageReference "Dynamic" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/mhdhejazi/Dynamic.git";
+ requirement = {
+ kind = upToNextMajorVersion;
+ minimumVersion = 1.2.0;
+ };
+ };
+ DD0000000000000000000173 /* XCRemoteSwiftPackageReference "swift-nio" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/apple/swift-nio.git";
+ requirement = {
+ kind = exactVersion;
+ version = 2.83.0;
+ };
+ };
+/* End XCRemoteSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ DD0000000000000000000201 /* ArgumentParser */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = DD0000000000000000000171 /* XCRemoteSwiftPackageReference "swift-argument-parser" */;
+ productName = ArgumentParser;
+ };
+ DD0000000000000000000202 /* Dynamic */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = DD0000000000000000000172 /* XCRemoteSwiftPackageReference "Dynamic" */;
+ productName = Dynamic;
+ };
+ DD0000000000000000000203 /* NIOCore */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = DD0000000000000000000173 /* XCRemoteSwiftPackageReference "swift-nio" */;
+ productName = NIOCore;
+ };
+ DD0000000000000000000204 /* NIOPosix */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = DD0000000000000000000173 /* XCRemoteSwiftPackageReference "swift-nio" */;
+ productName = NIOPosix;
+ };
+/* End XCSwiftPackageProductDependency section */
+ };
+ rootObject = DD0000000000000000000001 /* Project object */;
+}
diff --git a/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
new file mode 100644
index 00000000..7285d323
--- /dev/null
+++ b/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,60 @@
+{
+ "originHash" : "38f16f31de01e807bb4da4be0f929664277a0435bca947a4bb7d6b6e69270a4c",
+ "pins" : [
+ {
+ "identity" : "dynamic",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/mhdhejazi/Dynamic.git",
+ "state" : {
+ "revision" : "ab9a2570862d54aed2663691bb767f881226a12f",
+ "version" : "1.2.0"
+ }
+ },
+ {
+ "identity" : "swift-argument-parser",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-argument-parser.git",
+ "state" : {
+ "revision" : "46989693916f56d1186bd59ac15124caef896560",
+ "version" : "1.3.1"
+ }
+ },
+ {
+ "identity" : "swift-atomics",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-atomics.git",
+ "state" : {
+ "revision" : "0442cb5a3f98ab802acb777929fdb446bda11a34",
+ "version" : "1.3.1"
+ }
+ },
+ {
+ "identity" : "swift-collections",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-collections.git",
+ "state" : {
+ "revision" : "a66de878e87ef5a3d5d390e0f6d9002aa5541a43",
+ "version" : "1.7.0"
+ }
+ },
+ {
+ "identity" : "swift-nio",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-nio.git",
+ "state" : {
+ "revision" : "34d486b01cd891297ac615e40d5999536a1e138d",
+ "version" : "2.83.0"
+ }
+ },
+ {
+ "identity" : "swift-system",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-system.git",
+ "state" : {
+ "revision" : "869129b7bf4ecc57b97d0193ad29690ca2134750",
+ "version" : "1.8.1"
+ }
+ }
+ ],
+ "version" : 3
+}
diff --git a/Siblings/CamFix/libcamfix.m b/VPhoneGuestComponents/CamFix/libcamfix.m
similarity index 100%
rename from Siblings/CamFix/libcamfix.m
rename to VPhoneGuestComponents/CamFix/libcamfix.m
diff --git a/Siblings/CamFix/libcamfix.plist b/VPhoneGuestComponents/CamFix/libcamfix.plist
similarity index 100%
rename from Siblings/CamFix/libcamfix.plist
rename to VPhoneGuestComponents/CamFix/libcamfix.plist
diff --git a/Siblings/GraphicLoader/README.md b/VPhoneGuestComponents/GraphicLoader/README.md
similarity index 100%
rename from Siblings/GraphicLoader/README.md
rename to VPhoneGuestComponents/GraphicLoader/README.md
diff --git a/Siblings/GraphicLoader/main.mm b/VPhoneGuestComponents/GraphicLoader/main.mm
similarity index 100%
rename from Siblings/GraphicLoader/main.mm
rename to VPhoneGuestComponents/GraphicLoader/main.mm
diff --git a/Siblings/Makefile b/VPhoneGuestComponents/Makefile
similarity index 88%
rename from Siblings/Makefile
rename to VPhoneGuestComponents/Makefile
index 03f34fa7..4fad9b87 100644
--- a/Siblings/Makefile
+++ b/VPhoneGuestComponents/Makefile
@@ -10,9 +10,8 @@ COMMON_FLAGS := -arch arm64e -miphoneos-version-min=26.0 -Os -fobjc-arc
CAMFIX := $(STAGE)/camfix/libcamfix.dylib
VCAMCAPTURED := $(STAGE)/vcamcaptured/libvcamcaptured.dylib
TWEAKLOADER := $(STAGE)/tweakloader/TweakLoader.dylib
-VPREGISTER := $(STAGE)/vpregister/vpregister
GPU_PLUGIN := $(STAGE)/gpu/libAppleParavirtCompilerPluginIOGPUFamily.dylib
-ARTIFACTS := $(CAMFIX) $(VCAMCAPTURED) $(TWEAKLOADER) $(VPREGISTER) $(GPU_PLUGIN)
+ARTIFACTS := $(CAMFIX) $(VCAMCAPTURED) $(TWEAKLOADER) $(GPU_PLUGIN)
PLISTS := $(STAGE)/camfix/libcamfix.plist $(STAGE)/vcamcaptured/libvcamcaptured.plist
GPU_PROVENANCE := $(STAGE)/gpu/README.md
@@ -24,10 +23,10 @@ gpu: $(GPU_PLUGIN)
package: all
@rm -f $(ARCHIVE)
- @/usr/bin/tar -cf $(ARCHIVE) -C $(STAGE) camfix vcamcaptured tweakloader vpregister gpu
+ @/usr/bin/tar -cf $(ARCHIVE) -C $(STAGE) camfix vcamcaptured tweakloader gpu
@echo "Packaged $(ARCHIVE)"
-$(STAGE)/camfix $(STAGE)/vcamcaptured $(STAGE)/tweakloader $(STAGE)/vpregister $(STAGE)/gpu:
+$(STAGE)/camfix $(STAGE)/vcamcaptured $(STAGE)/tweakloader $(STAGE)/gpu:
@mkdir -p $@
$(CAMFIX): CamFix/libcamfix.m | $(STAGE)/camfix
@@ -52,10 +51,6 @@ $(TWEAKLOADER): TweakLoader/TweakLoader.m | $(STAGE)/tweakloader
-o $@ $< -framework Foundation
@codesign --force --sign - $@
-$(VPREGISTER): VPRegister/vpregister.m | $(STAGE)/vpregister
- $(CLANG) $(COMMON_FLAGS) -o $@ $< -framework Foundation
- @codesign --force --sign - $@
-
$(GPU_PLUGIN): GraphicLoader/main.mm | $(STAGE)/gpu
xcrun --sdk iphoneos clang++ -arch arm64e -miphoneos-version-min=26.1 \
-std=c++17 -O2 -dynamiclib -Wl,-undefined,dynamic_lookup \
diff --git a/Siblings/README.md b/VPhoneGuestComponents/README.md
similarity index 100%
rename from Siblings/README.md
rename to VPhoneGuestComponents/README.md
diff --git a/Siblings/TweakLoader/README.md b/VPhoneGuestComponents/TweakLoader/README.md
similarity index 100%
rename from Siblings/TweakLoader/README.md
rename to VPhoneGuestComponents/TweakLoader/README.md
diff --git a/Siblings/TweakLoader/TweakLoader.m b/VPhoneGuestComponents/TweakLoader/TweakLoader.m
similarity index 100%
rename from Siblings/TweakLoader/TweakLoader.m
rename to VPhoneGuestComponents/TweakLoader/TweakLoader.m
diff --git a/Siblings/VCamCaptured/libvcamcaptured.m b/VPhoneGuestComponents/VCamCaptured/libvcamcaptured.m
similarity index 100%
rename from Siblings/VCamCaptured/libvcamcaptured.m
rename to VPhoneGuestComponents/VCamCaptured/libvcamcaptured.m
diff --git a/Siblings/VCamCaptured/libvcamcaptured.plist b/VPhoneGuestComponents/VCamCaptured/libvcamcaptured.plist
similarity index 100%
rename from Siblings/VCamCaptured/libvcamcaptured.plist
rename to VPhoneGuestComponents/VCamCaptured/libvcamcaptured.plist
diff --git a/Sources/VPhoneArchive/VPhoneArchiveError.swift b/VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveError.swift
similarity index 100%
rename from Sources/VPhoneArchive/VPhoneArchiveError.swift
rename to VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveError.swift
diff --git a/Sources/VPhoneArchive/VPhoneArchiveExtractor.swift b/VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveExtractor.swift
similarity index 100%
rename from Sources/VPhoneArchive/VPhoneArchiveExtractor.swift
rename to VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveExtractor.swift
diff --git a/Sources/VPhoneArchive/VPhoneArchiveOptions.swift b/VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveOptions.swift
similarity index 100%
rename from Sources/VPhoneArchive/VPhoneArchiveOptions.swift
rename to VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveOptions.swift
diff --git a/Sources/VPhoneArchive/VPhoneArchivePaths.swift b/VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchivePaths.swift
similarity index 100%
rename from Sources/VPhoneArchive/VPhoneArchivePaths.swift
rename to VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchivePaths.swift
diff --git a/Sources/VPhoneArchive/VPhoneArchiveReader.swift b/VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveReader.swift
similarity index 100%
rename from Sources/VPhoneArchive/VPhoneArchiveReader.swift
rename to VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveReader.swift
diff --git a/Sources/VPhoneArchive/VPhoneArchiveWriter.swift b/VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveWriter.swift
similarity index 100%
rename from Sources/VPhoneArchive/VPhoneArchiveWriter.swift
rename to VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveWriter.swift
diff --git a/Sources/VPhoneArchive/VPhoneTreeFingerprint.swift b/VPhoneKit/VPhoneArchiveKit/Archive/VPhoneTreeFingerprint.swift
similarity index 100%
rename from Sources/VPhoneArchive/VPhoneTreeFingerprint.swift
rename to VPhoneKit/VPhoneArchiveKit/Archive/VPhoneTreeFingerprint.swift
diff --git a/Sources/VPhoneArchive/VPhoneBundleTransfer.swift b/VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneBundleTransfer.swift
similarity index 98%
rename from Sources/VPhoneArchive/VPhoneBundleTransfer.swift
rename to VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneBundleTransfer.swift
index 9386ee25..34f2d4c4 100644
--- a/Sources/VPhoneArchive/VPhoneBundleTransfer.swift
+++ b/VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneBundleTransfer.swift
@@ -1,6 +1,6 @@
import Darwin
import Foundation
-import VPhoneCore
+import VPhoneCoreKit
// MARK: - Errors
@@ -23,11 +23,11 @@ public enum VPhoneBundleTransferError: Error, Equatable, CustomStringConvertible
/// `vm export` and `vm import`.
///
-/// It lives here, and not in `VPhoneCore`, because it needs libarchive. It
+/// It lives here, and not in `VPhoneCoreKit`, because it needs libarchive. It
/// lives here, and not in the VM kit, because `vphone-cli` deliberately does
/// not import the kit — see the note on that target in `Package.swift` —
-/// and `vphone-cli vm export` has to keep working. `VPhoneArchive` sits above
-/// `VPhoneCore` and needs neither Virtualization nor AppKit, which is exactly
+/// and `vphone-cli vm export` has to keep working. `VPhoneArchiveKit` sits above
+/// `VPhoneCoreKit` and needs neither Virtualization nor AppKit, which is exactly
/// the altitude this wants.
///
/// The format contract is fixed and older archives are already out there:
diff --git a/Sources/VPhoneArchive/VPhoneIPSWCache.swift b/VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift
similarity index 100%
rename from Sources/VPhoneArchive/VPhoneIPSWCache.swift
rename to VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift
diff --git a/Tests/VPhoneArchiveTests/BundleTransferTests.swift b/VPhoneKit/VPhoneArchiveKitTests/BundleTransferTests.swift
similarity index 99%
rename from Tests/VPhoneArchiveTests/BundleTransferTests.swift
rename to VPhoneKit/VPhoneArchiveKitTests/BundleTransferTests.swift
index 801872bf..9128b6f2 100644
--- a/Tests/VPhoneArchiveTests/BundleTransferTests.swift
+++ b/VPhoneKit/VPhoneArchiveKitTests/BundleTransferTests.swift
@@ -1,7 +1,7 @@
import Foundation
import Testing
-@testable import VPhoneArchive
-import VPhoneCore
+@testable import VPhoneArchiveKit
+import VPhoneCoreKit
/// `vm export` / `vm import`, moved here with the implementation when they came
/// off the two-stage `tar` pipe. The format contract they pin — gnutar, one
diff --git a/Tests/VPhoneArchiveTests/ExtractPermissionsTests.swift b/VPhoneKit/VPhoneArchiveKitTests/ExtractPermissionsTests.swift
similarity index 99%
rename from Tests/VPhoneArchiveTests/ExtractPermissionsTests.swift
rename to VPhoneKit/VPhoneArchiveKitTests/ExtractPermissionsTests.swift
index 1b8ef3cc..297da2d6 100644
--- a/Tests/VPhoneArchiveTests/ExtractPermissionsTests.swift
+++ b/VPhoneKit/VPhoneArchiveKitTests/ExtractPermissionsTests.swift
@@ -1,8 +1,8 @@
import Foundation
import LibArchive
import Testing
-@testable import VPhoneArchive
-import VPhoneCore
+@testable import VPhoneArchiveKit
+import VPhoneCoreKit
/// What an extraction is allowed to decide about the modes of the files it
/// writes.
diff --git a/Tests/VPhoneArchiveTests/IPSWCacheTests.swift b/VPhoneKit/VPhoneArchiveKitTests/IPSWCacheTests.swift
similarity index 99%
rename from Tests/VPhoneArchiveTests/IPSWCacheTests.swift
rename to VPhoneKit/VPhoneArchiveKitTests/IPSWCacheTests.swift
index d2e69170..34226656 100644
--- a/Tests/VPhoneArchiveTests/IPSWCacheTests.swift
+++ b/VPhoneKit/VPhoneArchiveKitTests/IPSWCacheTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneArchive
+@testable import VPhoneArchiveKit
private final class IPSWStubProtocol: URLProtocol {
nonisolated(unsafe) static var payload = Data()
diff --git a/Tests/VPhoneArchiveTests/NoOverwriteDirTests.swift b/VPhoneKit/VPhoneArchiveKitTests/NoOverwriteDirTests.swift
similarity index 98%
rename from Tests/VPhoneArchiveTests/NoOverwriteDirTests.swift
rename to VPhoneKit/VPhoneArchiveKitTests/NoOverwriteDirTests.swift
index ff0f46a2..c612784d 100644
--- a/Tests/VPhoneArchiveTests/NoOverwriteDirTests.swift
+++ b/VPhoneKit/VPhoneArchiveKitTests/NoOverwriteDirTests.swift
@@ -1,10 +1,10 @@
import Foundation
import Testing
-@testable import VPhoneArchive
+@testable import VPhoneArchiveKit
/// `--no-overwrite-dir`, which libarchive does not have.
///
-/// This is the first thing in VPhoneArchive that needed a test, because
+/// This is the first thing in VPhoneArchiveKit that needed a test, because
/// neither of the two behaviours libarchive does offer is the one GNU tar
/// gives us today, and the difference only shows up on a guest volume that
/// will not boot:
diff --git a/Tests/VPhoneArchiveTests/RoundTripTests.swift b/VPhoneKit/VPhoneArchiveKitTests/RoundTripTests.swift
similarity index 99%
rename from Tests/VPhoneArchiveTests/RoundTripTests.swift
rename to VPhoneKit/VPhoneArchiveKitTests/RoundTripTests.swift
index 639040e9..598f39f4 100644
--- a/Tests/VPhoneArchiveTests/RoundTripTests.swift
+++ b/VPhoneKit/VPhoneArchiveKitTests/RoundTripTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneArchive
+@testable import VPhoneArchiveKit
/// `.serialized` because these do real filesystem work and libarchive leaves
/// `tar.XXXXXXXX` temp files in the process's working directory when several
diff --git a/Sources/VPhoneCore/VPhoneBundle.swift b/VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundle.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneBundle.swift
rename to VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundle.swift
diff --git a/Sources/VPhoneCore/VPhoneBundleOperations.swift b/VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleOperations.swift
similarity index 98%
rename from Sources/VPhoneCore/VPhoneBundleOperations.swift
rename to VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleOperations.swift
index 7729d071..8dd43d49 100644
--- a/Sources/VPhoneCore/VPhoneBundleOperations.swift
+++ b/VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleOperations.swift
@@ -35,7 +35,7 @@ public enum VPhoneBundleOperations {
}
/// Public because `vm import` validates the name it is about to place into
- /// the library, and that lives in `VPhoneArchive` now.
+ /// the library, and that lives in `VPhoneArchiveKit` now.
public static func requireValidName(_ name: String) throws {
guard !name.isEmpty, !name.contains("/"), !name.hasPrefix(".") else {
throw VPhoneLibraryError.invalidName(name)
@@ -191,7 +191,7 @@ public enum VPhoneBundleOperations {
/// inputs/temp are consumed at install time (the result already lives in
/// `Disk.img`). Always excluded.
///
- /// Export itself is `VPhoneBundleTransfer` in `VPhoneArchive` — it needs
+ /// Export itself is `VPhoneBundleTransfer` in `VPhoneArchiveKit` — it needs
/// libarchive, and this does not. The list stays here because it describes
/// what a bundle is, and `VPhoneRestoreInfo` is checked against it.
public static let exportExcludePatterns =
diff --git a/Sources/VPhoneCore/VPhoneBundleReport.swift b/VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleReport.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneBundleReport.swift
rename to VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleReport.swift
diff --git a/Sources/VPhoneCore/VPhoneAEA.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAEA.swift
similarity index 99%
rename from Sources/VPhoneCore/VPhoneAEA.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAEA.swift
index 58be71ba..588da48a 100644
--- a/Sources/VPhoneCore/VPhoneAEA.swift
+++ b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAEA.swift
@@ -186,7 +186,7 @@ private extension Data {
/// The firmware pipeline is straight-line synchronous code from `main.swift`
/// down, and `VPhoneAEA.symmetricKey` is the only step anywhere in it that
/// touches the network. Threading `async` through every frame between them —
-/// the CLI command, the cryptex patcher, half of FirmwarePatcher — to serialise
+/// the Command command, the cryptex patcher, half of FirmwarePatcher — to serialise
/// on one HTTPS GET would buy nothing.
///
/// `Task.detached` and a semaphore, deliberately: the task must not inherit the
diff --git a/Sources/VPhoneCore/VPhoneAPFSSnapshot.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAPFSSnapshot.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneAPFSSnapshot.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAPFSSnapshot.swift
diff --git a/Sources/VPhoneCore/VPhoneFirmwareCatalog.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareCatalog.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneFirmwareCatalog.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareCatalog.swift
diff --git a/Sources/VPhoneCore/VPhoneFirmwareIndex.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareIndex.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneFirmwareIndex.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareIndex.swift
diff --git a/Sources/VPhoneCore/VPhoneFirmwareMatrix.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneFirmwareMatrix.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift
diff --git a/Sources/VPhoneCore/VPhoneFirmwarePicker.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwarePicker.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneFirmwarePicker.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwarePicker.swift
diff --git a/Sources/VPhoneCore/VPhoneInstallPackage.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneInstallPackage.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneInstallPackage.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhoneInstallPackage.swift
diff --git a/Sources/VPhoneCore/VPhonePCCGPUDriver.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCGPUDriver.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhonePCCGPUDriver.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCGPUDriver.swift
diff --git a/Sources/VPhoneCore/VPhoneRemoteZip.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneRemoteZip.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneRemoteZip.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhoneRemoteZip.swift
diff --git a/Sources/VPhoneCore/VPhoneResources.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneResources.swift
similarity index 93%
rename from Sources/VPhoneCore/VPhoneResources.swift
rename to VPhoneKit/VPhoneCoreKit/Firmware/VPhoneResources.swift
index 117582e9..f94ae517 100644
--- a/Sources/VPhoneCore/VPhoneResources.swift
+++ b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneResources.swift
@@ -101,7 +101,8 @@ public struct VPhoneResources: Sendable {
}
public var vphoned: URL {
- let bundled = base.appendingPathComponent("vphoned.signed")
+ let bundled = base.deletingLastPathComponent()
+ .appendingPathComponent("MacOS/vphoned.signed")
if FileManager.default.fileExists(atPath: bundled.path) {
return bundled
}
@@ -110,12 +111,8 @@ public struct VPhoneResources: Sendable {
return base.appendingPathComponent(".build/vphoned.signed")
}
- public var gpuCompilerPluginArchive: URL {
- let bundled = base.appendingPathComponent("gpu/compiler-plugin.tar.zst")
- if FileManager.default.fileExists(atPath: bundled.path) {
- return bundled
- }
- return base.appendingPathComponent(".build/guest/gpu-compiler-plugin.tar.zst")
+ public var gpuCompilerPlugin: URL {
+ Self.siblingExecutable("libAppleParavirtCompilerPluginIOGPUFamily.dylib")
}
// MARK: - Cache dirs
@@ -127,7 +124,8 @@ public struct VPhoneResources: Sendable {
if let root = ProcessInfo.processInfo.environment["VPHONE_ROOT"], !root.isEmpty {
return URL(fileURLWithPath: root, isDirectory: true)
}
- return FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent(".vphone")
+ let home = VPhoneInvokingUser.current?.home ?? FileManager.default.homeDirectoryForCurrentUser
+ return home.appendingPathComponent(".vphone")
}
public var ipswCacheDir: URL {
diff --git a/VPhoneKit/VPhoneCoreKit/Process/VPhoneInvokingUser.swift b/VPhoneKit/VPhoneCoreKit/Process/VPhoneInvokingUser.swift
new file mode 100644
index 00000000..dc189e1e
--- /dev/null
+++ b/VPhoneKit/VPhoneCoreKit/Process/VPhoneInvokingUser.swift
@@ -0,0 +1,52 @@
+import Darwin
+import Foundation
+
+/// The account that invoked a Command process through sudo. Root-owned guest files
+/// inside Disk.img are unaffected; this only touches host filesystem paths.
+public struct VPhoneInvokingUser: Sendable {
+ public let uid: uid_t
+ public let gid: gid_t
+ public let home: URL
+
+ public static var current: VPhoneInvokingUser? {
+ guard geteuid() == 0,
+ let uidText = ProcessInfo.processInfo.environment["SUDO_UID"],
+ let gidText = ProcessInfo.processInfo.environment["SUDO_GID"],
+ let uid = uid_t(uidText), let gid = gid_t(gidText),
+ uid != 0, let account = getpwuid(uid), let directory = account.pointee.pw_dir
+ else { return nil }
+ return VPhoneInvokingUser(uid: uid, gid: gid, home: URL(fileURLWithPath: String(cString: directory)))
+ }
+
+ /// Restore the owner of root-created files while preserving their modes.
+ /// Never use 0777: it would expose firmware, VM disks and credentials to
+ /// every local account. lstat/lchown avoid following symlinks out of the
+ /// caller's VM directory or cache.
+ public func restoreOwnership(at url: URL) throws {
+ var metadata = stat()
+ guard lstat(url.path, &metadata) == 0 else {
+ if errno == ENOENT { return }
+ throw POSIXError(POSIXErrorCode(rawValue: errno) ?? .EIO)
+ }
+ if (metadata.st_mode & S_IFMT) == S_IFDIR {
+ for child in try FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: nil) {
+ try restoreOwnership(at: child)
+ }
+ }
+ if metadata.st_uid == 0, lchown(url.path, uid, gid) != 0 {
+ throw POSIXError(POSIXErrorCode(rawValue: errno) ?? .EIO)
+ }
+ }
+
+ public func restoreOwnerOfDirectory(at url: URL) throws {
+ var metadata = stat()
+ guard lstat(url.path, &metadata) == 0 else {
+ if errno == ENOENT { return }
+ throw POSIXError(POSIXErrorCode(rawValue: errno) ?? .EIO)
+ }
+ guard (metadata.st_mode & S_IFMT) == S_IFDIR else { return }
+ if metadata.st_uid == 0, lchown(url.path, uid, gid) != 0 {
+ throw POSIXError(POSIXErrorCode(rawValue: errno) ?? .EIO)
+ }
+ }
+}
diff --git a/Sources/VPhoneCore/VPhoneManagedProcess.swift b/VPhoneKit/VPhoneCoreKit/Process/VPhoneManagedProcess.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneManagedProcess.swift
rename to VPhoneKit/VPhoneCoreKit/Process/VPhoneManagedProcess.swift
diff --git a/Sources/VPhoneCore/VPhoneProcessRunner.swift b/VPhoneKit/VPhoneCoreKit/Process/VPhoneProcessRunner.swift
similarity index 83%
rename from Sources/VPhoneCore/VPhoneProcessRunner.swift
rename to VPhoneKit/VPhoneCoreKit/Process/VPhoneProcessRunner.swift
index bda69de9..c75d5666 100644
--- a/Sources/VPhoneCore/VPhoneProcessRunner.swift
+++ b/VPhoneKit/VPhoneCoreKit/Process/VPhoneProcessRunner.swift
@@ -100,7 +100,7 @@ public enum VPhoneProcessRunner {
// `runCountingTarPipe` lived here: a two-stage `/usr/bin/tar` pipe with a
// byte counter between the stages, used only by `vm export` and
// `vm import`. Both now pack and unpack in-process through
- // `VPhoneArchive`, which counts its own bytes, so the helper had no
+ // `VPhoneArchiveKit`, which counts its own bytes, so the helper had no
// callers left. It is gone rather than kept: a public convenience for
// spawning tar is an invitation to shell out again, and the point of the
// migration was that a machine with no `zstd(1)` on PATH can still import
@@ -209,31 +209,4 @@ public enum VPhoneProcessRunner {
return process.terminationStatus
}
- /// Run `executable args` as root via macOS's native auth dialog (`osascript` →
- /// `do shell script … with administrator privileges`). `do shell script` runs
- /// under a bare env, so `env` is passed inline as `KEY=value` — nothing else
- /// reaches the command. Returns the command's exit status.
- public static func runWithAdminPrivileges(
- _ executable: URL,
- _ args: [String],
- env: [String: String] = [:],
- echo: Bool = true,
- ) throws -> Int32 {
- func shQuote(_ s: String) -> String {
- "'" + s.replacingOccurrences(of: "'", with: "'\\''") + "'"
- }
- var tokens = env.sorted { $0.key < $1.key }.map { "\($0.key)=\(shQuote($0.value))" }
- tokens.append(shQuote(executable.path))
- tokens += args.map(shQuote)
- var command = tokens.joined(separator: " ")
- if echo, isatty(STDOUT_FILENO) != 0, let tty = ttyname(STDOUT_FILENO) {
- command += " > \(shQuote(String(cString: tty))) 2>&1"
- }
- // Escape the /bin/sh command for the AppleScript string literal (\ then ").
- let appleEscaped = command
- .replacingOccurrences(of: "\\", with: "\\\\")
- .replacingOccurrences(of: "\"", with: "\\\"")
- let source = "do shell script \"\(appleEscaped)\" with administrator privileges"
- return try runStreaming(URL(fileURLWithPath: "/usr/bin/osascript"), ["-e", source], echo: echo)
- }
}
diff --git a/Sources/VPhoneCore/VPhoneRestoreInfo.swift b/VPhoneKit/VPhoneCoreKit/Restore/VPhoneRestoreInfo.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneRestoreInfo.swift
rename to VPhoneKit/VPhoneCoreKit/Restore/VPhoneRestoreInfo.swift
diff --git a/Sources/VPhoneCore/VPhoneRestoreOperations.swift b/VPhoneKit/VPhoneCoreKit/Restore/VPhoneRestoreOperations.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneRestoreOperations.swift
rename to VPhoneKit/VPhoneCoreKit/Restore/VPhoneRestoreOperations.swift
diff --git a/Sources/VPhoneCore/VPhoneNetworking.swift b/VPhoneKit/VPhoneCoreKit/Support/VPhoneNetworking.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneNetworking.swift
rename to VPhoneKit/VPhoneCoreKit/Support/VPhoneNetworking.swift
diff --git a/Sources/VPhoneCore/VPhoneVerbosity.swift b/VPhoneKit/VPhoneCoreKit/Support/VPhoneVerbosity.swift
similarity index 93%
rename from Sources/VPhoneCore/VPhoneVerbosity.swift
rename to VPhoneKit/VPhoneCoreKit/Support/VPhoneVerbosity.swift
index ab294e49..dd889d31 100644
--- a/Sources/VPhoneCore/VPhoneVerbosity.swift
+++ b/VPhoneKit/VPhoneCoreKit/Support/VPhoneVerbosity.swift
@@ -1,4 +1,4 @@
-/// CLI output verbosity. Higher levels are supersets of lower ones.
+/// Command output verbosity. Higher levels are supersets of lower ones.
///
/// The guest VM serial console is deliberately NOT part of this ladder:
/// `vm launch` always streams it, `vm create` never does — neither depends
diff --git a/Sources/VPhoneCore/VPhoneBootCLI.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootCommand.swift
similarity index 97%
rename from Sources/VPhoneCore/VPhoneBootCLI.swift
rename to VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootCommand.swift
index 9cd5f04d..9608cbf1 100644
--- a/Sources/VPhoneCore/VPhoneBootCLI.swift
+++ b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootCommand.swift
@@ -1,14 +1,14 @@
import ArgumentParser
import Foundation
-// MARK: - Manifest values the CLI can take as arguments
+// MARK: - Manifest values the Command can take as arguments
/// Kept here, with the other ArgumentParser conformances, rather than beside
/// the type: the manifest is a data model and has no other reason to know that
/// a command line exists.
extension VPhoneVirtualMachineManifest.PlatformFusing: ExpressibleByArgument {}
-// MARK: - VPhoneBootCLI
+// MARK: - VPhoneBootCommand
/// The options for booting a guest.
///
@@ -23,7 +23,7 @@ extension VPhoneVirtualMachineManifest.PlatformFusing: ExpressibleByArgument {}
/// Note it has no `run()` that boots. `vphone-cli`'s entry point recognises
/// this command type and spawns instead, so `run()` here would only ever be a
/// trap for whoever calls it directly.
-public struct VPhoneBootCLI: ParsableCommand {
+public struct VPhoneBootCommand: ParsableCommand {
public static let configuration = CommandConfiguration(
commandName: "boot",
abstract: "Boot a virtual iPhone (PV=3)",
diff --git a/Sources/VPhoneCore/VPhoneBootPatterns.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootPatterns.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneBootPatterns.swift
rename to VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootPatterns.swift
diff --git a/Sources/VPhoneCore/VPhoneGuestBinaries.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestBinaries.swift
similarity index 91%
rename from Sources/VPhoneCore/VPhoneGuestBinaries.swift
rename to VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestBinaries.swift
index 16b746d5..806e88d8 100644
--- a/Sources/VPhoneCore/VPhoneGuestBinaries.swift
+++ b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestBinaries.swift
@@ -20,7 +20,7 @@ public enum VPhoneGuestBinaries {
}
}
- /// `Contents/Resources/guest` in the bundle, `.build/guest` in a dev tree.
+ /// `Contents/MacOS` in the bundle, `.build/guest` in a dev tree.
///
/// Both are derived from `VPhoneResources.base`, which is already the
/// running image's own location rather than anything on `PATH` — so this
@@ -29,7 +29,7 @@ public enum VPhoneGuestBinaries {
public static func directories() -> [URL] {
let base = VPhoneResources.resolve().base
return [
- base.appendingPathComponent("guest"),
+ base.deletingLastPathComponent().appendingPathComponent("MacOS"),
base.appendingPathComponent(".build/guest"),
]
}
diff --git a/Sources/VPhoneCore/VPhoneGuestLauncher.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestLauncher.swift
similarity index 99%
rename from Sources/VPhoneCore/VPhoneGuestLauncher.swift
rename to VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestLauncher.swift
index 55c0e0fa..ef4edce2 100644
--- a/Sources/VPhoneCore/VPhoneGuestLauncher.swift
+++ b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestLauncher.swift
@@ -22,7 +22,7 @@ public enum VPhoneGuestLaunchError: Error, CustomStringConvertible {
case let .blockedByAMFI(guest, cdHash):
let helper = guest.deletingLastPathComponent()
- .appendingPathComponent("vphone-amfi-allow")
+ .appendingPathComponent("VPhoneEscalator")
return """
amfid refused to launch vphone-vm, so no guest could start.
diff --git a/Sources/VPhoneCore/VPhoneLaunchLayout.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLaunchLayout.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneLaunchLayout.swift
rename to VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLaunchLayout.swift
diff --git a/Sources/VPhoneCore/VPhoneLibrary.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLibrary.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneLibrary.swift
rename to VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLibrary.swift
diff --git a/Sources/VPhoneCore/VPhoneVirtualMachineManifest.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneVirtualMachineManifest.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneVirtualMachineManifest.swift
rename to VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneVirtualMachineManifest.swift
diff --git a/Sources/VPhoneCore/VPhoneVirtualMachinePicker.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneVirtualMachinePicker.swift
similarity index 100%
rename from Sources/VPhoneCore/VPhoneVirtualMachinePicker.swift
rename to VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneVirtualMachinePicker.swift
diff --git a/Tests/VPhoneCoreTests/BundleOperationsTests.swift b/VPhoneKit/VPhoneCoreKitTests/Bundle/BundleOperationsTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/BundleOperationsTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Bundle/BundleOperationsTests.swift
index 4766249a..f41773b1 100644
--- a/Tests/VPhoneCoreTests/BundleOperationsTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Bundle/BundleOperationsTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
/// Creating, editing, renaming and cloning a bundle. Export and import moved to
/// `VPhoneArchiveTests/BundleTransferTests` with the implementation, which needs
diff --git a/Tests/VPhoneCoreTests/BundleReportTests.swift b/VPhoneKit/VPhoneCoreKitTests/Bundle/BundleReportTests.swift
similarity index 98%
rename from Tests/VPhoneCoreTests/BundleReportTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Bundle/BundleReportTests.swift
index 01d92407..8ba35ee7 100644
--- a/Tests/VPhoneCoreTests/BundleReportTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Bundle/BundleReportTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct BundleReportTests {
@Test func `maps manifest fields`() {
diff --git a/Tests/VPhoneCoreTests/APFSSnapshotTests.swift b/VPhoneKit/VPhoneCoreKitTests/Firmware/APFSSnapshotTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/APFSSnapshotTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Firmware/APFSSnapshotTests.swift
index f4f14022..7036462d 100644
--- a/Tests/VPhoneCoreTests/APFSSnapshotTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Firmware/APFSSnapshotTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
/// The acceptance criterion for this port is byte equivalence with
/// `tools/apfs_snap_rename.py`, because what it edits is a filesystem the
diff --git a/Tests/VPhoneCoreTests/FirmwareCatalogReportTests.swift b/VPhoneKit/VPhoneCoreKitTests/Firmware/FirmwareCatalogReportTests.swift
similarity index 96%
rename from Tests/VPhoneCoreTests/FirmwareCatalogReportTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Firmware/FirmwareCatalogReportTests.swift
index 0a4562c6..c75c922f 100644
--- a/Tests/VPhoneCoreTests/FirmwareCatalogReportTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Firmware/FirmwareCatalogReportTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct FirmwareCatalogReportTests {
@Test func `maps every pairing`() {
diff --git a/Tests/VPhoneCoreTests/FirmwareMatrixTests.swift b/VPhoneKit/VPhoneCoreKitTests/Firmware/FirmwareMatrixTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/FirmwareMatrixTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Firmware/FirmwareMatrixTests.swift
index 8280ca3f..d7078ac8 100644
--- a/Tests/VPhoneCoreTests/FirmwareMatrixTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Firmware/FirmwareMatrixTests.swift
@@ -31,7 +31,7 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
// MARK: - Frozen fixture
@@ -319,6 +319,7 @@ private enum RealData {
.deletingLastPathComponent()
.deletingLastPathComponent()
.deletingLastPathComponent()
+ .deletingLastPathComponent()
.appendingPathComponent("Documents/Guides/compatibility.md")
return try String(contentsOf: url, encoding: .utf8)
}
diff --git a/Tests/VPhoneCoreTests/FirmwarePickerTests.swift b/VPhoneKit/VPhoneCoreKitTests/Firmware/FirmwarePickerTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/FirmwarePickerTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Firmware/FirmwarePickerTests.swift
index c2cc3bcb..1580337b 100644
--- a/Tests/VPhoneCoreTests/FirmwarePickerTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Firmware/FirmwarePickerTests.swift
@@ -1,5 +1,5 @@
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct FirmwarePickerTests {
/// A scripted stdin: pops one line per `read()` call.
diff --git a/Tests/VPhoneCoreTests/PCCGPUDriverTests.swift b/VPhoneKit/VPhoneCoreKitTests/Firmware/PCCGPUDriverTests.swift
similarity index 98%
rename from Tests/VPhoneCoreTests/PCCGPUDriverTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Firmware/PCCGPUDriverTests.swift
index 337cae80..924bfac4 100644
--- a/Tests/VPhoneCoreTests/PCCGPUDriverTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Firmware/PCCGPUDriverTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct PCCGPUDriverTests {
@Test func `stages a validated GPU bundle`() throws {
diff --git a/Tests/VPhoneCoreTests/ResourcesTests.swift b/VPhoneKit/VPhoneCoreKitTests/Firmware/ResourcesTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/ResourcesTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Firmware/ResourcesTests.swift
index 1979cfac..37a86c9d 100644
--- a/Tests/VPhoneCoreTests/ResourcesTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Firmware/ResourcesTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
/// `.serialized` because several of these set and unset `VPHONE_ROOT`, and the
/// environment is process-global: run in parallel, one test's
diff --git a/Tests/VPhoneCoreTests/ManagedProcessTests.swift b/VPhoneKit/VPhoneCoreKitTests/Process/ManagedProcessTests.swift
similarity index 98%
rename from Tests/VPhoneCoreTests/ManagedProcessTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Process/ManagedProcessTests.swift
index 3156f808..980a3a09 100644
--- a/Tests/VPhoneCoreTests/ManagedProcessTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Process/ManagedProcessTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct ManagedProcessTests {
@Test func `waits for output match`() throws {
diff --git a/Tests/VPhoneCoreTests/ProcessEnvironment.swift b/VPhoneKit/VPhoneCoreKitTests/Process/ProcessEnvironment.swift
similarity index 100%
rename from Tests/VPhoneCoreTests/ProcessEnvironment.swift
rename to VPhoneKit/VPhoneCoreKitTests/Process/ProcessEnvironment.swift
diff --git a/Tests/VPhoneCoreTests/ProcessRunnerTests.swift b/VPhoneKit/VPhoneCoreKitTests/Process/ProcessRunnerTests.swift
similarity index 98%
rename from Tests/VPhoneCoreTests/ProcessRunnerTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Process/ProcessRunnerTests.swift
index 70ed576d..4e10120b 100644
--- a/Tests/VPhoneCoreTests/ProcessRunnerTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Process/ProcessRunnerTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct ProcessRunnerTests {
@Test func `captures stdout and zero exit`() throws {
diff --git a/Tests/VPhoneCoreTests/RestoreInfoTests.swift b/VPhoneKit/VPhoneCoreKitTests/Restore/RestoreInfoTests.swift
similarity index 97%
rename from Tests/VPhoneCoreTests/RestoreInfoTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Restore/RestoreInfoTests.swift
index d95d3b38..989e50e2 100644
--- a/Tests/VPhoneCoreTests/RestoreInfoTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Restore/RestoreInfoTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct RestoreInfoTests {
private func makeBundle() throws -> VPhoneBundle {
@@ -158,12 +158,12 @@ struct RestoreInfoTests {
).write(toBundle: b)
do {
- _ = try VPhoneBootCLI.parseAsRoot(["--config", b.configURL.path])
+ _ = try VPhoneBootCommand.parseAsRoot(["--config", b.configURL.path])
Issue.record("Boot accepted an explicitly unsupported VM variant")
} catch {
#expect(String(describing: error).contains("Only JB VMs are supported"))
}
- _ = try VPhoneBootCLI.parseAsRoot(["--config", b.configURL.path, "--dfu"])
+ _ = try VPhoneBootCommand.parseAsRoot(["--config", b.configURL.path, "--dfu"])
}
@Test func `bundle report carries UDID`() throws {
diff --git a/Tests/VPhoneCoreTests/RestoreOperationsTests.swift b/VPhoneKit/VPhoneCoreKitTests/Restore/RestoreOperationsTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/RestoreOperationsTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Restore/RestoreOperationsTests.swift
index 4e624dc1..609408ec 100644
--- a/Tests/VPhoneCoreTests/RestoreOperationsTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Restore/RestoreOperationsTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct RestoreOperationsTests {
private func bundle(in root: URL) throws -> VPhoneBundle {
diff --git a/Tests/VPhoneCoreTests/NetworkingTests.swift b/VPhoneKit/VPhoneCoreKitTests/Support/NetworkingTests.swift
similarity index 98%
rename from Tests/VPhoneCoreTests/NetworkingTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Support/NetworkingTests.swift
index 5874d0d1..29415d90 100644
--- a/Tests/VPhoneCoreTests/NetworkingTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Support/NetworkingTests.swift
@@ -1,7 +1,7 @@
import Foundation
import Testing
import Virtualization
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct NetworkingTests {
typealias NetworkConfig = VPhoneVirtualMachineManifest.NetworkConfig
diff --git a/Tests/VPhoneCoreTests/PlistEquivalence.swift b/VPhoneKit/VPhoneCoreKitTests/Support/PlistEquivalence.swift
similarity index 100%
rename from Tests/VPhoneCoreTests/PlistEquivalence.swift
rename to VPhoneKit/VPhoneCoreKitTests/Support/PlistEquivalence.swift
diff --git a/Tests/VPhoneCoreTests/VerbosityTests.swift b/VPhoneKit/VPhoneCoreKitTests/Support/VerbosityTests.swift
similarity index 96%
rename from Tests/VPhoneCoreTests/VerbosityTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/Support/VerbosityTests.swift
index fce1b029..5363704d 100644
--- a/Tests/VPhoneCoreTests/VerbosityTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/Support/VerbosityTests.swift
@@ -1,5 +1,5 @@
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct VerbosityTests {
@Test func `count clamps to range`() {
diff --git a/Tests/VPhoneCoreTests/BootPatternsTests.swift b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/BootPatternsTests.swift
similarity index 98%
rename from Tests/VPhoneCoreTests/BootPatternsTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/VirtualMachine/BootPatternsTests.swift
index ccc1cbb1..6f285680 100644
--- a/Tests/VPhoneCoreTests/BootPatternsTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/BootPatternsTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
/// Tests for `VPhoneBootPatterns` — the pure, device-independent pieces of the
/// native `vm create` pipeline (`VPhoneVirtualMachineCreator`, executable target).
diff --git a/Tests/VPhoneCoreTests/LaunchLayoutTests.swift b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/LaunchLayoutTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/LaunchLayoutTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/VirtualMachine/LaunchLayoutTests.swift
index 812e2926..199f251d 100644
--- a/Tests/VPhoneCoreTests/LaunchLayoutTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/LaunchLayoutTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct LaunchLayoutTests {
@Test func `delegates to resources`() {
diff --git a/Tests/VPhoneCoreTests/LibraryTests.swift b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/LibraryTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/LibraryTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/VirtualMachine/LibraryTests.swift
index 16339d44..8f84156c 100644
--- a/Tests/VPhoneCoreTests/LibraryTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/LibraryTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
// Serialized: defaultRootHonorsEnvOverride / defaultRootIsShellSafe mutate the
// process-global VPHONE_LIBRARY_ROOT; run in parallel they race (a set/unset
diff --git a/Tests/VPhoneCoreTests/ManifestTests.swift b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/ManifestTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/ManifestTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/VirtualMachine/ManifestTests.swift
index aa37e962..d8525c1d 100644
--- a/Tests/VPhoneCoreTests/ManifestTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/ManifestTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct ManifestTests {
private func sampleManifest() -> VPhoneVirtualMachineManifest {
diff --git a/Tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swift b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/NewVirtualMachineManifestTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/VirtualMachine/NewVirtualMachineManifestTests.swift
index 74cf4b88..8df44e6e 100644
--- a/Tests/VPhoneCoreTests/NewVirtualMachineManifestTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/NewVirtualMachineManifestTests.swift
@@ -1,6 +1,6 @@
import Foundation
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
/// `VPhoneVirtualMachineManifest.newVM` replaces `scripts/vm_manifest.py`.
///
diff --git a/Tests/VPhoneCoreTests/VirtualMachinePickerTests.swift b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/VirtualMachinePickerTests.swift
similarity index 99%
rename from Tests/VPhoneCoreTests/VirtualMachinePickerTests.swift
rename to VPhoneKit/VPhoneCoreKitTests/VirtualMachine/VirtualMachinePickerTests.swift
index 4bf79d77..a4ed3ef0 100644
--- a/Tests/VPhoneCoreTests/VirtualMachinePickerTests.swift
+++ b/VPhoneKit/VPhoneCoreKitTests/VirtualMachine/VirtualMachinePickerTests.swift
@@ -1,5 +1,5 @@
import Testing
-@testable import VPhoneCore
+@testable import VPhoneCoreKit
struct VirtualMachinePickerTests {
/// A scripted stdin: pops one line per `read()` call.
diff --git a/Sources/VPhoneAPIKit/VPhoneAPIClient.swift b/VPhoneKit/VPhoneExternalAccessKit/VPhoneAPIClient.swift
similarity index 91%
rename from Sources/VPhoneAPIKit/VPhoneAPIClient.swift
rename to VPhoneKit/VPhoneExternalAccessKit/VPhoneAPIClient.swift
index 9e7370cb..d8d1738b 100644
--- a/Sources/VPhoneAPIKit/VPhoneAPIClient.swift
+++ b/VPhoneKit/VPhoneExternalAccessKit/VPhoneAPIClient.swift
@@ -66,7 +66,7 @@ public enum VPhoneAPIMessage: Sendable {
}
/// An unentitled client for the optional host proxy. vphone-ui can import this
-/// product without linking Virtualization.framework or running the CLI.
+/// product without linking Virtualization.framework or running the Command.
public struct VPhoneAPIClient: Sendable {
public let baseURL: URL
private let session: URLSession
@@ -119,27 +119,7 @@ public struct VPhoneAPIClient: Sendable {
return VPhoneAPIWebSocket(task: task)
}
- /// Runs any icli subcommand inside the guest. Arguments are passed as an
- /// array to the pinned icli executable, without a shell. The result holds
/// its exit code, decoded JSON output (or text), and stderr.
- public func runIcli(
- _ arguments: [String],
- stdin: String? = nil,
- stdinData: Data? = nil,
- ) async throws -> VPhoneJSONValue {
- guard stdin == nil || stdinData == nil else {
- throw VPhoneAPIError(code: "input", message: "Pass either stdin or stdinData")
- }
- var params: [String: VPhoneJSONValue] = ["argv": .array(arguments.map(VPhoneJSONValue.string))]
- if let stdin {
- params["stdin"] = .string(stdin)
- }
- if let stdinData {
- params["stdin_base64"] = .string(stdinData.base64EncodedString())
- }
- return try await call("icli.execute", params: params)
- }
-
/// Streams a guest file to a new temporary host file. The caller owns the
/// returned file and should move or delete it when finished.
public func downloadFile(at guestPath: String) async throws -> URL {
diff --git a/VPhoneKit/VPhoneKit.xcodeproj/project.pbxproj b/VPhoneKit/VPhoneKit.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..e8457aad
--- /dev/null
+++ b/VPhoneKit/VPhoneKit.xcodeproj/project.pbxproj
@@ -0,0 +1,611 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 70;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 5036467F30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 5036468030653D1000CAADDF /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = AA0000000000000000000181 /* ArgumentParser */; };
+ 5036468130653D1000CAADDF /* libVPhoneCoreKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA0000000000000000000031 /* libVPhoneCoreKit.a */; };
+ 5036468230653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+ 5036468330653D1000CAADDF /* LibArchive in Frameworks */ = {isa = PBXBuildFile; productRef = AA0000000000000000000182 /* LibArchive */; };
+ AA0000000000000000000101 /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = AA0000000000000000000181 /* ArgumentParser */; };
+ AA0000000000000000000102 /* LibArchive in Frameworks */ = {isa = PBXBuildFile; productRef = AA0000000000000000000182 /* LibArchive */; };
+ AA0000000000000000000103 /* libVPhoneCoreKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA0000000000000000000031 /* libVPhoneCoreKit.a */; };
+ AA0000000000000000000104 /* libVPhoneCoreKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA0000000000000000000031 /* libVPhoneCoreKit.a */; };
+ AA0000000000000000000105 /* libVPhoneArchiveKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA0000000000000000000032 /* libVPhoneArchiveKit.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ AA0000000000000000000122 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = AA0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = AA0000000000000000000011;
+ remoteInfo = VPhoneCoreKit;
+ };
+ AA0000000000000000000125 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = AA0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = AA0000000000000000000011;
+ remoteInfo = VPhoneCoreKit;
+ };
+ AA0000000000000000000126 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = AA0000000000000000000001 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = AA0000000000000000000012;
+ remoteInfo = VPhoneArchiveKit;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ AA0000000000000000000031 /* libVPhoneCoreKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVPhoneCoreKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ AA0000000000000000000032 /* libVPhoneArchiveKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVPhoneArchiveKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ AA0000000000000000000033 /* libVPhoneExternalAccessKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVPhoneExternalAccessKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ AA0000000000000000000034 /* VPhoneCoreKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VPhoneCoreKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ AA0000000000000000000035 /* VPhoneArchiveKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VPhoneArchiveKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFileSystemSynchronizedRootGroup section */
+ AA0000000000000000000021 /* VPhoneCoreKit */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPhoneCoreKit; sourceTree = "<group>"; };
+ AA0000000000000000000022 /* VPhoneArchiveKit */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPhoneArchiveKit; sourceTree = "<group>"; };
+ AA0000000000000000000023 /* VPhoneExternalAccessKit */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPhoneExternalAccessKit; sourceTree = "<group>"; };
+ AA0000000000000000000024 /* VPhoneCoreKitTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPhoneCoreKitTests; sourceTree = "<group>"; };
+ AA0000000000000000000025 /* VPhoneArchiveKitTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VPhoneArchiveKitTests; sourceTree = "<group>"; };
+/* End PBXFileSystemSynchronizedRootGroup section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ AA0000000000000000000041 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ AA0000000000000000000101 /* ArgumentParser in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ AA0000000000000000000042 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ AA0000000000000000000102 /* LibArchive in Frameworks */,
+ AA0000000000000000000103 /* libVPhoneCoreKit.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ AA0000000000000000000043 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ AA0000000000000000000044 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5036468030653D1000CAADDF /* ArgumentParser in Frameworks */,
+ AA0000000000000000000104 /* libVPhoneCoreKit.a in Frameworks */,
+ 5036467F30653D1000CAADDF /* (null) in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ AA0000000000000000000045 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 5036468130653D1000CAADDF /* libVPhoneCoreKit.a in Frameworks */,
+ AA0000000000000000000105 /* libVPhoneArchiveKit.a in Frameworks */,
+ 5036468230653D1000CAADDF /* (null) in Frameworks */,
+ 5036468330653D1000CAADDF /* LibArchive in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ AA0000000000000000000002 = {
+ isa = PBXGroup;
+ children = (
+ AA0000000000000000000021 /* VPhoneCoreKit */,
+ AA0000000000000000000022 /* VPhoneArchiveKit */,
+ AA0000000000000000000023 /* VPhoneExternalAccessKit */,
+ AA0000000000000000000024 /* VPhoneCoreKitTests */,
+ AA0000000000000000000025 /* VPhoneArchiveKitTests */,
+ AA0000000000000000000003 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ AA0000000000000000000003 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ AA0000000000000000000031 /* libVPhoneCoreKit.a */,
+ AA0000000000000000000032 /* libVPhoneArchiveKit.a */,
+ AA0000000000000000000033 /* libVPhoneExternalAccessKit.a */,
+ AA0000000000000000000034 /* VPhoneCoreKitTests.xctest */,
+ AA0000000000000000000035 /* VPhoneArchiveKitTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ AA0000000000000000000011 /* VPhoneCoreKit */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = AA0000000000000000000081 /* Build configuration list for PBXNativeTarget "VPhoneCoreKit" */;
+ buildPhases = (
+ AA0000000000000000000051 /* Sources */,
+ AA0000000000000000000041 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ fileSystemSynchronizedGroups = (
+ AA0000000000000000000021 /* VPhoneCoreKit */,
+ );
+ name = VPhoneCoreKit;
+ packageProductDependencies = (
+ AA0000000000000000000181 /* ArgumentParser */,
+ );
+ productName = VPhoneCoreKit;
+ productReference = AA0000000000000000000031 /* libVPhoneCoreKit.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ AA0000000000000000000012 /* VPhoneArchiveKit */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = AA0000000000000000000082 /* Build configuration list for PBXNativeTarget "VPhoneArchiveKit" */;
+ buildPhases = (
+ AA0000000000000000000052 /* Sources */,
+ AA0000000000000000000042 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ AA0000000000000000000121 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ AA0000000000000000000022 /* VPhoneArchiveKit */,
+ );
+ name = VPhoneArchiveKit;
+ packageProductDependencies = (
+ AA0000000000000000000182 /* LibArchive */,
+ );
+ productName = VPhoneArchiveKit;
+ productReference = AA0000000000000000000032 /* libVPhoneArchiveKit.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ AA0000000000000000000013 /* VPhoneExternalAccessKit */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = AA0000000000000000000083 /* Build configuration list for PBXNativeTarget "VPhoneExternalAccessKit" */;
+ buildPhases = (
+ AA0000000000000000000053 /* Sources */,
+ AA0000000000000000000043 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ fileSystemSynchronizedGroups = (
+ AA0000000000000000000023 /* VPhoneExternalAccessKit */,
+ );
+ name = VPhoneExternalAccessKit;
+ productName = VPhoneExternalAccessKit;
+ productReference = AA0000000000000000000033 /* libVPhoneExternalAccessKit.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ AA0000000000000000000014 /* VPhoneCoreKitTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = AA0000000000000000000084 /* Build configuration list for PBXNativeTarget "VPhoneCoreKitTests" */;
+ buildPhases = (
+ AA0000000000000000000054 /* Sources */,
+ AA0000000000000000000044 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ AA0000000000000000000123 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ AA0000000000000000000024 /* VPhoneCoreKitTests */,
+ );
+ name = VPhoneCoreKitTests;
+ packageProductDependencies = (
+ AA0000000000000000000181 /* ArgumentParser */,
+ );
+ productName = VPhoneCoreKitTests;
+ productReference = AA0000000000000000000034 /* VPhoneCoreKitTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ AA0000000000000000000015 /* VPhoneArchiveKitTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = AA0000000000000000000085 /* Build configuration list for PBXNativeTarget "VPhoneArchiveKitTests" */;
+ buildPhases = (
+ AA0000000000000000000055 /* Sources */,
+ AA0000000000000000000045 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ AA0000000000000000000124 /* PBXTargetDependency */,
+ );
+ fileSystemSynchronizedGroups = (
+ AA0000000000000000000025 /* VPhoneArchiveKitTests */,
+ );
+ name = VPhoneArchiveKitTests;
+ packageProductDependencies = (
+ AA0000000000000000000182 /* LibArchive */,
+ );
+ productName = VPhoneArchiveKitTests;
+ productReference = AA0000000000000000000035 /* VPhoneArchiveKitTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ AA0000000000000000000001 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 2700;
+ };
+ buildConfigurationList = AA0000000000000000000080 /* Build configuration list for PBXProject "VPhoneKit" */;
+ compatibilityVersion = "Xcode 16.0.Superseded.1";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = AA0000000000000000000002;
+ packageReferences = (
+ AA0000000000000000000171 /* XCRemoteSwiftPackageReference "swift-argument-parser" */,
+ AA0000000000000000000172 /* XCRemoteSwiftPackageReference "libarchive.xcframework" */,
+ );
+ productRefGroup = AA0000000000000000000003 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ AA0000000000000000000011 /* VPhoneCoreKit */,
+ AA0000000000000000000012 /* VPhoneArchiveKit */,
+ AA0000000000000000000013 /* VPhoneExternalAccessKit */,
+ AA0000000000000000000014 /* VPhoneCoreKitTests */,
+ AA0000000000000000000015 /* VPhoneArchiveKitTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ AA0000000000000000000051 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ AA0000000000000000000052 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ AA0000000000000000000053 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ AA0000000000000000000054 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ AA0000000000000000000055 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ AA0000000000000000000121 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = AA0000000000000000000011 /* VPhoneCoreKit */;
+ targetProxy = AA0000000000000000000122 /* PBXContainerItemProxy */;
+ };
+ AA0000000000000000000123 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = AA0000000000000000000011 /* VPhoneCoreKit */;
+ targetProxy = AA0000000000000000000125 /* PBXContainerItemProxy */;
+ };
+ AA0000000000000000000124 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = AA0000000000000000000012 /* VPhoneArchiveKit */;
+ targetProxy = AA0000000000000000000126 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ AA0000000000000000000061 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ ENABLE_TESTABILITY = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = VPhoneCoreKit;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ AA0000000000000000000062 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = VPhoneCoreKit;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ AA0000000000000000000063 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ ENABLE_TESTABILITY = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = VPhoneArchiveKit;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ AA0000000000000000000064 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = VPhoneArchiveKit;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ AA0000000000000000000065 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = VPhoneExternalAccessKit;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ AA0000000000000000000066 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ DEFINES_MODULE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_NAME = VPhoneExternalAccessKit;
+ SDKROOT = macosx;
+ SKIP_INSTALL = YES;
+ SWIFT_STRICT_CONCURRENCY = complete;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ AA0000000000000000000067 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.core.tests;
+ PRODUCT_NAME = VPhoneCoreKitTests;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ AA0000000000000000000068 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.core.tests;
+ PRODUCT_NAME = VPhoneCoreKitTests;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ AA0000000000000000000069 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneCoreKit",
+ "-lVPhoneArchiveKit",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.archive.tests;
+ PRODUCT_NAME = VPhoneArchiveKitTests;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ AA000000000000000000006A /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ GENERATE_INFOPLIST_FILE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-lVPhoneCoreKit",
+ "-lVPhoneArchiveKit",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vphone.archive.tests;
+ PRODUCT_NAME = VPhoneArchiveKitTests;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+ AA0000000000000000000071 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Debug;
+ };
+ AA0000000000000000000072 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = arm64;
+ CODE_SIGNING_ALLOWED = NO;
+ MACOSX_DEPLOYMENT_TARGET = 15.0;
+ SDKROOT = macosx;
+ SWIFT_VERSION = 6.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ AA0000000000000000000080 /* Build configuration list for PBXProject "VPhoneKit" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ AA0000000000000000000071 /* Debug */,
+ AA0000000000000000000072 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ AA0000000000000000000081 /* Build configuration list for PBXNativeTarget "VPhoneCoreKit" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ AA0000000000000000000061 /* Debug */,
+ AA0000000000000000000062 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ AA0000000000000000000082 /* Build configuration list for PBXNativeTarget "VPhoneArchiveKit" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ AA0000000000000000000063 /* Debug */,
+ AA0000000000000000000064 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ AA0000000000000000000083 /* Build configuration list for PBXNativeTarget "VPhoneExternalAccessKit" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ AA0000000000000000000065 /* Debug */,
+ AA0000000000000000000066 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ AA0000000000000000000084 /* Build configuration list for PBXNativeTarget "VPhoneCoreKitTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ AA0000000000000000000067 /* Debug */,
+ AA0000000000000000000068 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ AA0000000000000000000085 /* Build configuration list for PBXNativeTarget "VPhoneArchiveKitTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ AA0000000000000000000069 /* Debug */,
+ AA000000000000000000006A /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+
+/* Begin XCRemoteSwiftPackageReference section */
+ AA0000000000000000000171 /* XCRemoteSwiftPackageReference "swift-argument-parser" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/apple/swift-argument-parser.git";
+ requirement = {
+ kind = exactVersion;
+ version = 1.3.1;
+ };
+ };
+ AA0000000000000000000172 /* XCRemoteSwiftPackageReference "libarchive.xcframework" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Lakr233/libarchive.xcframework.git";
+ requirement = {
+ kind = upToNextMajorVersion;
+ minimumVersion = 0.1.1;
+ };
+ };
+/* End XCRemoteSwiftPackageReference section */
+
+/* Begin XCSwiftPackageProductDependency section */
+ AA0000000000000000000181 /* ArgumentParser */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = AA0000000000000000000171 /* XCRemoteSwiftPackageReference "swift-argument-parser" */;
+ productName = ArgumentParser;
+ };
+ AA0000000000000000000182 /* LibArchive */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = AA0000000000000000000172 /* XCRemoteSwiftPackageReference "libarchive.xcframework" */;
+ productName = LibArchive;
+ };
+/* End XCSwiftPackageProductDependency section */
+ };
+ rootObject = AA0000000000000000000001 /* Project object */;
+}
diff --git a/VPhoneKit/VPhoneKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/VPhoneKit/VPhoneKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
new file mode 100644
index 00000000..fdb62f1c
--- /dev/null
+++ b/VPhoneKit/VPhoneKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -0,0 +1,24 @@
+{
+ "originHash" : "94a165af9c0cfb6c80ffef10ff9c516b31e43b3d5a53d3214dfbd0351121b893",
+ "pins" : [
+ {
+ "identity" : "libarchive.xcframework",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Lakr233/libarchive.xcframework.git",
+ "state" : {
+ "revision" : "3bda868f1868790de2dd246a9eff76eeecba3537",
+ "version" : "0.1.1"
+ }
+ },
+ {
+ "identity" : "swift-argument-parser",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/apple/swift-argument-parser.git",
+ "state" : {
+ "revision" : "46989693916f56d1186bd59ac15124caef896560",
+ "version" : "1.3.1"
+ }
+ }
+ ],
+ "version" : 3
+}