Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

refactor: use PascalCase script folders

Lakr8501bf17bade
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ccd2f740..985c897a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -27,14 +27,14 @@ jobs:
- name: Build and bundle (portable .app)
env:
SWIFT_JOBS: "4"
- run: ./scripts/build.sh
+ run: ./Scripts/build.sh
- name: Verify application bundle
run: |
set -euo pipefail
codesign --verify --strict .build/vphone-cli.app
test -x .build/vphone-cli.app/Contents/Resources/guest/vphoned
- zsh scripts/check_aux.sh
+ zsh Scripts/check_aux.sh
- name: Package app
env:
diff --git a/.gitignore b/.gitignore
index 51972828..de2ccf33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -333,7 +333,7 @@ __marimo__/
/updates-cdn
/research/jb_asm_refs
/references/
-scripts/vphoned/vphoned
+Scripts/VPhoned/vphoned
/cfw_input/
Sources/VPhoneCore/VPhoneBuildInfo.swift
# libarchive drops zero-byte tar.XXXXXXXX files in the process's working
diff --git a/.gitmodules b/.gitmodules
index 92bf6ef1..31b9b0b9 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
[submodule "scripts/repos/insert_dylib"]
- path = scripts/repos/insert_dylib
+ path = Scripts/Repos/InsertDylib
url = https://github.com/tyilo/insert_dylib.git
diff --git a/AGENTS.md b/AGENTS.md
index f78f534a..ea8d435f 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -4,16 +4,16 @@ Virtual iPhone boot tool using Apple's Virtualization.framework with PCC researc
## Quick Reference
-- **Build:** `zsh scripts/build.sh` (builds, signs, and bundles the app)
-- **Test:** `swift test`; then `zsh scripts/check_aux.sh` for bundle admission gates
+- **Build:** `zsh Scripts/build.sh` (builds, signs, and bundles the app)
+- **Test:** `swift test`; then `zsh Scripts/check_aux.sh` for bundle admission gates
- **Boot (GUI):** `vphone-cli vm launch <name>`
- **Boot (DFU):** `vphone-cli vm launch <name> --dfu`
- **AMFI refuses `vphone-vm`?** Use the bundled `vphone-amfi-allow` helper as shown in `docs/guides/host-setup.md`. Repeat after every build because it allowlists cdhashes. See Key Patterns.
- **Restore:** `vphone-cli restore`, in process. Vendored libirecovery + idevicerestore (`Sources/MobileRecoveryCore`, `Sources/MobileRestoreCore`) over the `AppleMobileDeviceLibrary` xcframeworks. No interpreter, no environment to provision, no setup step. See `research/restore/p2_restore_off_python.md`.
- **Platform:** macOS 15+ (Sequoia). `vphone-vm` needs amfid to accept its private entitlements: either SIP off with `amfi_get_out_of_my_way=1`, or SIP on (`--without debug`) plus an allowlist bypass the user runs. Both are in `docs/guides/host-setup.md`; neither is installed by this project.
- **Language:** Swift 6.0 (SwiftPM), private APIs via [Dynamic](https://github.com/mhdhejazi/Dynamic). This package's own manifest is `swift-tools-version:6.0`, but the **toolchain floor is Swift 6.2**: `libcapstone-spm` declares 6.2 so that it can reach `CSetting.disableWarning` instead of `.unsafeFlags`, which is what lets it be depended on by version at all.
-- **Dependencies:** Host and guest SwiftPM packages resolve dependencies by URL and version; `Package.resolved` pins the full graphs. The only git submodule is `scripts/repos/insert_dylib`, a build-time test reference. **No Python anywhere, and no Homebrew package at runtime** — see Tiers below.
-- **Tiers.** Three environments run code here and the rules differ. **build** (the machine that builds the `.app`) may use Xcode, `xcrun`, clang, swift, git and Homebrew. **dist** (the shipped `.app`, on a clean macOS) may use `/usr/lib`, `/System` and the bundle — nothing else, no `PATH` lookup. **guest** (inside the VM) is out of host self-containment scope. Every script declares its tier on **line 2** (`# vphone-tier: dist`); `scripts/dist_manifest.sh` reads those and is what `scripts/build.sh` stages from, so a script that declares nothing ships nowhere. `scripts/check_aux.sh` runs the admission gates. The dist tier's registered-exception list is **empty** and a release requires it to stay that way.
+- **Dependencies:** Host and guest SwiftPM packages resolve dependencies by URL and version; `Package.resolved` pins the full graphs. The only git submodule is `Scripts/Repos/InsertDylib`, a build-time test reference. **No Python anywhere, and no Homebrew package at runtime** — see Tiers below.
+- **Tiers.** Three environments run code here and the rules differ. **build** (the machine that builds the `.app`) may use Xcode, `xcrun`, clang, swift, git and Homebrew. **dist** (the shipped `.app`, on a clean macOS) may use `/usr/lib`, `/System` and the bundle — nothing else, no `PATH` lookup. **guest** (inside the VM) is out of host self-containment scope. Every script declares its tier on **line 2** (`# vphone-tier: dist`); `Scripts/dist_manifest.sh` reads those and is what `Scripts/build.sh` stages from, so a script that declares nothing ships nowhere. `Scripts/check_aux.sh` runs the admission gates. The dist tier's registered-exception list is **empty** and a release requires it to stay that way.
## Workflow Rules
@@ -178,13 +178,13 @@ Sources/
├── VPhoneTouchIDMonitor.swift # BiometricKit delegate sink
└── VPhoneScreenRecorder.swift # VM screen recording to file
-scripts/ # Build scripts and payloads only; no runtime shell
+Scripts/ # Build scripts and payloads only; no runtime shell
├── build.sh [b] # Compile, sign and bundle
├── dist_manifest.sh [b] # Payload allowlist staged by build.sh
├── check_aux.sh [b] # The self-containment admission gates
├── setup_tools.sh [b] # Builds insert_dylib, the Mach-O byte-parity test reference
-├── vphoned/ # Guest SwiftNIO/IcliKit package plus native installer/keychain/camera code
-└── repos/ # Toolchain source (git submodule: insert_dylib)
+├── VPhoned/ # Guest SwiftNIO/IcliKit package plus native installer/keychain/camera code
+└── Repos/ # Toolchain source (git submodule: InsertDylib)
siblings/ # Guest component sources/provenance; separate package
├── camfix/ vcamcaptured/ # Camera hooks and filter plists
@@ -197,7 +197,7 @@ research/ # Detailed firmware/patch documentation
### Key Patterns
- **Three host binaries, one of them entitled.** `vphone-cli` carries no entitlements, so it launches on any host and is always there to explain what is wrong. `vphone-vm` holds all 7 private keys and is the only thing amfid can refuse. `vphone-archive` does the unpacking. **Do not sign `vphone-cli` with entitlements** — that is how it used to be, and it is why the entry point could not start without a bypass already running.
-- **The AMFI bypass is ours, and it writes heap, not code.** `vphone-amfi-allow` (`Sources/VPhoneAMFIAllow/`, this project's copy of [Lakr233/amfi-allow](https://github.com/Lakr233/amfi-allow)) puts the cdhashes of both `vphone-vm` copies into `/Library/Preferences/com.apple.security.coderequirements.plist` — a file AMFI already reads — and flips one byte of `_isRunningInternalBuild` in amfid's `AMFIRequirementsManager` singleton so it consults that file. It is an **allowlist**, scoped to the cdhashes you name; do not describe it as a global switch. The helper's `allow`, `status`, and `off` commands manage it; see `docs/guides/host-setup.md`. It is a **per-build** step, because a cdhash changes with every signature. It must be **arm64e** to match amfid's slice, and `scripts/build.sh` builds it with clang. The heap write is the load-bearing detail: `vphone-letmein` and LLDB-based tools dirty an executable page, and on a host with `vm.cs_system_enforcement = 1` the kernel kills amfid for that and takes the guest with it.
+- **The AMFI bypass is ours, and it writes heap, not code.** `vphone-amfi-allow` (`Sources/VPhoneAMFIAllow/`, this project's copy of [Lakr233/amfi-allow](https://github.com/Lakr233/amfi-allow)) puts the cdhashes of both `vphone-vm` copies into `/Library/Preferences/com.apple.security.coderequirements.plist` — a file AMFI already reads — and flips one byte of `_isRunningInternalBuild` in amfid's `AMFIRequirementsManager` singleton so it consults that file. It is an **allowlist**, scoped to the cdhashes you name; do not describe it as a global switch. The helper's `allow`, `status`, and `off` commands manage it; see `docs/guides/host-setup.md`. It is a **per-build** step, because a cdhash changes with every signature. It must be **arm64e** to match amfid's slice, and `Scripts/build.sh` builds it with clang. The heap write is the load-bearing detail: `vphone-letmein` and LLDB-based tools dirty an executable page, and on a host with `vm.cs_system_enforcement = 1` the kernel kills amfid for that and takes the guest with it.
- **Guest launches go through `VPhoneGuestLaunchPlanner`** (`VPhoneCore`). It resolves `vphone-vm` as a sibling of the running image — never through `PATH` — checks its two PV=3 entitlements, then probes with `vphone-vm --help` for SIGKILL. A refusal is reported with the exact command the user has to run; the planner never arranges a bypass itself. Never spawn the guest directly.
- **Restore runs in `vphone-cli`'s own process.** `VPhoneRestore` calls `vphone_restore_run()` in `MobileRestoreCore`; there is no subprocess, no bridge script and no environment to resolve first. The three commands the old Python bridge exposed became `restore --get-shsh`, `restore` and `restore --offline`; its fourth, `usbmux-list`, had no call site and was not ported. `research/restore/p2_restore_off_python.md` has the decision and the behaviour table.
- **Private API access:** Via [Dynamic](https://github.com/mhdhejazi/Dynamic) library (runtime method dispatch from pure Swift). No ObjC bridge.
@@ -238,7 +238,7 @@ one verb per patch, driven by `scripts/cfw_install*.sh` only.
- Disassembly is Capstone via `ARM64Disassembler` (the `libcapstone-spm` package). Assembly is `ARM64Encoder` plus the pre-encoded constants in `ARM64` (`ARM64Constants.swift`) — together they replace keystone's `asm()` / `asm_at()`, and `ARM64.nop` / `ARM64.movW0_0` are the old `NOP` / `MOV_W0_0`. IM4P containers go through `IM4PHandler` (the `libimg4-spm` package), which replaces pyimg4. Both resolve by URL; there is no `vendor/` directory to check out first.
- Dynamic pattern finding (string anchors, ADRP+ADD xrefs, BL frequency) — no hardcoded offsets.
- Each patch logged with offset and before/after state.
-- No interpreter, no Python environment, no native-library repair: `scripts/build.sh` builds the complete app.
+- No interpreter, no Python environment, no native-library repair: `Scripts/build.sh` builds the complete app.
### Python
@@ -251,10 +251,10 @@ There is none, and adding any is a regression.
restore backend was the last holdout and is now `Sources/VPhoneRestore` over
two vendored C targets — see `research/restore/p2_restore_off_python.md`.
- A patch, a probe, a format reader or a device protocol belongs in Swift,
- where it is built, signed, gated by `scripts/check_aux.sh` and tested with
+ where it is built, signed, gated by `Scripts/check_aux.sh` and tested with
everything else. Adding an interpreter back brings with it a provisioning
step, a silent system-`python3` fallback, and a dependency closure
- `scripts/check_aux.sh` cannot see.
+ `Scripts/check_aux.sh` cannot see.
- There is no counter-example left. `amfidont` used to be cited as one — a
third-party tool the user installed into their own Python — and it is gone
too: the AMFI bypass is `Sources/VPhoneAMFIAllow`, one C file built by
@@ -271,7 +271,7 @@ There is none, and adding any is a regression.
## Build & Sign
-The binary requires private entitlements for PV=3 virtualization. Always use `zsh scripts/build.sh` — never `swift build` alone, as the unsigned binary will fail at runtime.
+The binary requires private entitlements for PV=3 virtualization. Always use `zsh Scripts/build.sh` — never `swift build` alone, as the unsigned binary will fail at runtime.
## Design System
diff --git a/Package.swift b/Package.swift
index 2cfbc7a7..d8312183 100644
--- a/Package.swift
+++ b/Package.swift
@@ -52,7 +52,7 @@ let package = Package(
.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.
+ // 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
@@ -88,7 +88,7 @@ let package = Package(
// 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 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(
@@ -108,7 +108,7 @@ let package = Package(
// 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`
+ // backend would mean a Homebrew dylib in the link, and `Scripts/check_aux.sh`
// exists to keep those out.
.target(
name: "MobileRecoveryCore",
@@ -149,7 +149,7 @@ let package = Package(
// 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
+ // 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.
@@ -253,7 +253,7 @@ let package = Package(
// 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
+ // and libz inside .build/vphone-cli.app, where `Scripts/check_aux.sh` gate 1
// can see them.
.executableTarget(
name: "vphone-cli",
@@ -285,7 +285,7 @@ let package = Package(
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`
+ // 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
diff --git a/README.md b/README.md
index cdb4e861..6c69069e 100644
--- a/README.md
+++ b/README.md
@@ -43,11 +43,11 @@ Building from source needs Xcode, including its iPhoneOS SDK for vphoned:
```sh
git clone --recurse-submodules https://github.com/Lakr233/vphone-cli.git
cd vphone-cli
-zsh scripts/build.sh
+zsh Scripts/build.sh
.build/release/vphone-cli --help
```
-`scripts/build.sh` builds, signs, and bundles the binaries. Run `swift test` for the Swift tests and `zsh scripts/check_aux.sh` for the bundle checks. After every rebuild, a host using the AMFI allowlist must allow the new signed binaries because their cdhashes change. See [host setup](docs/guides/host-setup.md).
+`Scripts/build.sh` builds, signs, and bundles the binaries. Run `swift test` for the Swift tests and `zsh Scripts/check_aux.sh` for the bundle checks. After every rebuild, a host using the AMFI allowlist must allow the new signed binaries because their cdhashes change. See [host setup](docs/guides/host-setup.md).
## Everyday commands
diff --git a/scripts/repos/insert_dylib b/Scripts/Repos/InsertDylib
similarity index 100%
rename from scripts/repos/insert_dylib
rename to Scripts/Repos/InsertDylib
diff --git a/scripts/vphoned/Daemon/APIWire.swift b/Scripts/VPhoned/Daemon/APIWire.swift
similarity index 100%
rename from scripts/vphoned/Daemon/APIWire.swift
rename to Scripts/VPhoned/Daemon/APIWire.swift
diff --git a/scripts/vphoned/Daemon/GuestAPI.swift b/Scripts/VPhoned/Daemon/GuestAPI.swift
similarity index 100%
rename from scripts/vphoned/Daemon/GuestAPI.swift
rename to Scripts/VPhoned/Daemon/GuestAPI.swift
diff --git a/scripts/vphoned/Daemon/GuestEventPublisher.swift b/Scripts/VPhoned/Daemon/GuestEventPublisher.swift
similarity index 100%
rename from scripts/vphoned/Daemon/GuestEventPublisher.swift
rename to Scripts/VPhoned/Daemon/GuestEventPublisher.swift
diff --git a/scripts/vphoned/Daemon/GuestFileTransfer.swift b/Scripts/VPhoned/Daemon/GuestFileTransfer.swift
similarity index 100%
rename from scripts/vphoned/Daemon/GuestFileTransfer.swift
rename to Scripts/VPhoned/Daemon/GuestFileTransfer.swift
diff --git a/scripts/vphoned/Daemon/GuestHTTPHandler.swift b/Scripts/VPhoned/Daemon/GuestHTTPHandler.swift
similarity index 100%
rename from scripts/vphoned/Daemon/GuestHTTPHandler.swift
rename to Scripts/VPhoned/Daemon/GuestHTTPHandler.swift
diff --git a/scripts/vphoned/Daemon/GuestWebSocketHandler.swift b/Scripts/VPhoned/Daemon/GuestWebSocketHandler.swift
similarity index 100%
rename from scripts/vphoned/Daemon/GuestWebSocketHandler.swift
rename to Scripts/VPhoned/Daemon/GuestWebSocketHandler.swift
diff --git a/scripts/vphoned/Daemon/IcliCommand.swift b/Scripts/VPhoned/Daemon/IcliCommand.swift
similarity index 100%
rename from scripts/vphoned/Daemon/IcliCommand.swift
rename to Scripts/VPhoned/Daemon/IcliCommand.swift
diff --git a/scripts/vphoned/Daemon/OpenAPIDocument.swift b/Scripts/VPhoned/Daemon/OpenAPIDocument.swift
similarity index 100%
rename from scripts/vphoned/Daemon/OpenAPIDocument.swift
rename to Scripts/VPhoned/Daemon/OpenAPIDocument.swift
diff --git a/scripts/vphoned/Daemon/main.swift b/Scripts/VPhoned/Daemon/main.swift
similarity index 100%
rename from scripts/vphoned/Daemon/main.swift
rename to Scripts/VPhoned/Daemon/main.swift
diff --git a/scripts/vphoned/include/VphonedNative.h b/Scripts/VPhoned/Include/VphonedNative.h
similarity index 100%
rename from scripts/vphoned/include/VphonedNative.h
rename to Scripts/VPhoned/Include/VphonedNative.h
diff --git a/scripts/vphoned/Package.resolved b/Scripts/VPhoned/Package.resolved
similarity index 100%
rename from scripts/vphoned/Package.resolved
rename to Scripts/VPhoned/Package.resolved
diff --git a/scripts/vphoned/Package.swift b/Scripts/VPhoned/Package.swift
similarity index 94%
rename from scripts/vphoned/Package.swift
rename to Scripts/VPhoned/Package.swift
index eb0a6f6c..8c1ccce0 100644
--- a/scripts/vphoned/Package.swift
+++ b/Scripts/VPhoned/Package.swift
@@ -18,10 +18,10 @@ let package = Package(
name: "VphonedNative",
path: ".",
sources: nativeSources,
- publicHeadersPath: "include",
+ publicHeadersPath: "Include",
cSettings: [
.headerSearchPath("."),
- .headerSearchPath("vendor/libarchive"),
+ .headerSearchPath("Vendor/LibArchive"),
.define("VPHONED_BUILD_HASH", to: "\"\(gitHash)\""),
.unsafeFlags(["-fobjc-arc"]),
],
diff --git a/scripts/vphoned/vendor/libarchive/archive.h b/Scripts/VPhoned/Vendor/LibArchive/archive.h
similarity index 100%
rename from scripts/vphoned/vendor/libarchive/archive.h
rename to Scripts/VPhoned/Vendor/LibArchive/archive.h
diff --git a/scripts/vphoned/vendor/libarchive/archive_entry.h b/Scripts/VPhoned/Vendor/LibArchive/archive_entry.h
similarity index 100%
rename from scripts/vphoned/vendor/libarchive/archive_entry.h
rename to Scripts/VPhoned/Vendor/LibArchive/archive_entry.h
diff --git a/scripts/vphoned/entitlements.plist b/Scripts/VPhoned/entitlements.plist
similarity index 100%
rename from scripts/vphoned/entitlements.plist
rename to Scripts/VPhoned/entitlements.plist
diff --git a/scripts/vphoned/unarchive.h b/Scripts/VPhoned/unarchive.h
similarity index 100%
rename from scripts/vphoned/unarchive.h
rename to Scripts/VPhoned/unarchive.h
diff --git a/scripts/vphoned/unarchive.m b/Scripts/VPhoned/unarchive.m
similarity index 100%
rename from scripts/vphoned/unarchive.m
rename to Scripts/VPhoned/unarchive.m
diff --git a/scripts/vphoned/vphoned.plist b/Scripts/VPhoned/vphoned.plist
similarity index 100%
rename from scripts/vphoned/vphoned.plist
rename to Scripts/VPhoned/vphoned.plist
diff --git a/scripts/vphoned/vphoned_install.h b/Scripts/VPhoned/vphoned_install.h
similarity index 100%
rename from scripts/vphoned/vphoned_install.h
rename to Scripts/VPhoned/vphoned_install.h
diff --git a/scripts/vphoned/vphoned_install.m b/Scripts/VPhoned/vphoned_install.m
similarity index 100%
rename from scripts/vphoned/vphoned_install.m
rename to Scripts/VPhoned/vphoned_install.m
diff --git a/scripts/vphoned/vphoned_keychain.h b/Scripts/VPhoned/vphoned_keychain.h
similarity index 100%
rename from scripts/vphoned/vphoned_keychain.h
rename to Scripts/VPhoned/vphoned_keychain.h
diff --git a/scripts/vphoned/vphoned_keychain.m b/Scripts/VPhoned/vphoned_keychain.m
similarity index 100%
rename from scripts/vphoned/vphoned_keychain.m
rename to Scripts/VPhoned/vphoned_keychain.m
diff --git a/scripts/vphoned/vphoned_native.m b/Scripts/VPhoned/vphoned_native.m
similarity index 98%
rename from scripts/vphoned/vphoned_native.m
rename to Scripts/VPhoned/vphoned_native.m
index 419800b7..850d1eb9 100644
--- a/scripts/vphoned/vphoned_native.m
+++ b/Scripts/VPhoned/vphoned_native.m
@@ -1,4 +1,4 @@
-#import "include/VphonedNative.h"
+#import "Include/VphonedNative.h"
#import "vphoned_install.h"
#import "vphoned_keychain.h"
#import <CommonCrypto/CommonDigest.h>
diff --git a/scripts/vphoned/vphoned_response.h b/Scripts/VPhoned/vphoned_response.h
similarity index 100%
rename from scripts/vphoned/vphoned_response.h
rename to Scripts/VPhoned/vphoned_response.h
diff --git a/scripts/vphoned/vphoned_vcam.h b/Scripts/VPhoned/vphoned_vcam.h
similarity index 100%
rename from scripts/vphoned/vphoned_vcam.h
rename to Scripts/VPhoned/vphoned_vcam.h
diff --git a/scripts/vphoned/vphoned_vcam.m b/Scripts/VPhoned/vphoned_vcam.m
similarity index 100%
rename from scripts/vphoned/vphoned_vcam.m
rename to Scripts/VPhoned/vphoned_vcam.m
diff --git a/scripts/build.sh b/Scripts/build.sh
similarity index 95%
rename from scripts/build.sh
rename to Scripts/build.sh
index 3924ba41..718228ca 100755
--- a/scripts/build.sh
+++ b/Scripts/build.sh
@@ -9,7 +9,7 @@
# resulting `vphone-cli` binary — this script is the only build entrypoint.
#
# Usage:
-# ./scripts/build.sh # build + sign + bundle + guest binaries
+# ./Scripts/build.sh # build + sign + bundle + guest binaries
set -euo pipefail
SCRIPT_DIR="${0:A:h}"
@@ -139,11 +139,11 @@ 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 \
+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 \
+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
@@ -162,7 +162,7 @@ cp -f "$ICLI_BIN_DIR/icli" .build/guest/icli
echo "=== Signing vphoned ==="
cp .build/guest/vphoned .build/vphoned
"$BINARY" sign \
- --entitlements scripts/vphoned/entitlements.plist --merge \
+ --entitlements Scripts/VPhoned/entitlements.plist --merge \
.build/vphoned
cp .build/vphoned .build/vphoned.signed
echo " signed → .build/vphoned.signed"
@@ -204,8 +204,10 @@ 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 setup_tools.sh, the last of which runs
-# `brew install`. See scripts/dist_manifest.sh for the three tiers.
-zsh scripts/dist_manifest.sh | rsync -a --files-from=- scripts/ "${RES}/scripts/"
+# `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"
diff --git a/scripts/check_aux.sh b/Scripts/check_aux.sh
similarity index 98%
rename from scripts/check_aux.sh
rename to Scripts/check_aux.sh
index 4e4d501b..79d7c6a6 100755
--- a/scripts/check_aux.sh
+++ b/Scripts/check_aux.sh
@@ -17,7 +17,7 @@
# hold ONE list applied to the entire repository, so `xcrun` in a build script
# and `xcrun` in something the .app ships counted the same — and the list
# shrinking said nothing about whether the product was any closer to standing on
-# its own. Each script declares its tier on line 2; see scripts/dist_manifest.sh.
+# its own. Each script declares its tier on line 2; see Scripts/dist_manifest.sh.
#
# The gates, none of which proves self-containment on its own:
#
@@ -135,8 +135,8 @@ check_tiers() {
TIER[$name]="$tier"
case "$tier" in
build|dist|guest) ;;
- undeclared) fail "gate 0: scripts/$name has no '# vphone-tier:' on line 2" ;;
- *) fail "gate 0: scripts/$name declares unknown tier '$tier'" ;;
+ undeclared) fail "gate 0: Scripts/$name has no '# vphone-tier:' on line 2" ;;
+ *) fail "gate 0: Scripts/$name declares unknown tier '$tier'" ;;
esac
done < <(zsh "$SCRIPT_DIR/dist_manifest.sh" --tiers)
(( ${#TIER} )) || { fail "gate 0: no scripts found"; return }
@@ -254,7 +254,7 @@ check_bundle_contents() {
# Nothing may appear under Resources/scripts that the manifest did not put
# there — a stale file from an older bundle is exactly as dangerous as a
- # wrongly-declared one, and `scripts/build.sh` builds over whatever is already on
+ # wrongly-declared one, and `Scripts/build.sh` builds over whatever is already on
# disk.
local -a manifest=()
while IFS= read -r name; do manifest+=("$name"); done \
@@ -311,7 +311,7 @@ check_sources() {
# lines is the difference between a gate people read and one they learn to
# ignore. `which is enough for...` in a comment is not a PATH lookup.
local -a dist_clean=()
- for file in scripts/*.sh; do
+ for file in Scripts/*.sh; do
tier="${TIER[${file:t}]:-undeclared}"
[[ "$tier" == guest ]] && continue # runs in iOS; not our PATH
[[ "$tier" == build ]] && continue # may assume Xcode and Homebrew
@@ -413,9 +413,9 @@ check_sources() {
# check_aux.sh excludes itself, because a scanner that looks for a word
# necessarily contains it.
hits=$(grep -rnE 'python[0-9.]*' --include='*.sh' \
- scripts/ Tests/ 2>/dev/null \
+ Scripts/ Tests/ 2>/dev/null \
| grep -vE '^[^:]+:[0-9]+:[[:space:]]*#' \
- | grep -vE '^scripts/check_aux\.sh:' \
+ | grep -vE '^Scripts/check_aux\.sh:' \
| grep -vE '(echo|print)[[:space:]]')
if [[ -n "$hits" ]]; then
while IFS= read -r line; do
@@ -532,7 +532,7 @@ check_smoke() {
print -P "%Bvphone-cli admission gates%b"
if [[ ! -d "$BUNDLE" ]]; then
- red "no bundle at $BUNDLE — run 'zsh scripts/build.sh' first"
+ red "no bundle at $BUNDLE — run 'zsh Scripts/build.sh' first"
exit 2
fi
diff --git a/scripts/dist_manifest.sh b/Scripts/dist_manifest.sh
similarity index 87%
rename from scripts/dist_manifest.sh
rename to Scripts/dist_manifest.sh
index 53879352..48cd7e00 100755
--- a/scripts/dist_manifest.sh
+++ b/Scripts/dist_manifest.sh
@@ -14,8 +14,9 @@
#
# Every script declares which it is, on line 2: `# vphone-tier: <tier>`
#
-# This prints the dist payload — paths relative to scripts/, one per line, for
-# `rsync -a --files-from=-`. It is an ALLOWLIST derived from those declarations,
+# This prints the dist payload — paths relative to Contents/Resources/scripts/.
+# build.sh maps the VPhoned plist source files back to the shipped vphoned/ path.
+# It is an ALLOWLIST derived from those declarations,
# which is the point: the bundler used to work from a list of exclusions, so
# anything new shipped by default and the build-only `setup_tools.sh`,
# `build.sh` and `check_aux.sh` all ended up inside the .app. An
@@ -58,9 +59,9 @@ done
# vphone-cli itself opens it by name; the greppable proof is in the comment.
#
# What is deliberately ABSENT is as important:
-# repos/ toolchain submodules — build tier, sources only
+# Repos/ toolchain submodules — build tier, sources only
# ../siblings/ guest sources and GPU provenance; not copied into the
# shipped app (GPU extraction runs in native fw prepare)
-# vphoned/*.m *.h vendor/ same, and it is the bulk of scripts/
+# VPhoned/*.m *.h Vendor/ same, and it is the bulk of Scripts/
print -r -- "vphoned/vphoned.plist" # LaunchDaemon plist, injectLaunchDaemons
print -r -- "vphoned/entitlements.plist" # guest_sign_ent for vphoned
diff --git a/scripts/setup_tools.sh b/Scripts/setup_tools.sh
similarity index 90%
rename from scripts/setup_tools.sh
rename to Scripts/setup_tools.sh
index b33f0075..46da2022 100755
--- a/scripts/setup_tools.sh
+++ b/Scripts/setup_tools.sh
@@ -17,16 +17,16 @@
# /System/Library/SecurityResearch. It was also the last file
# in the bundle linking /opt/homebrew's libcrypto.3.
#
-# So: no Homebrew, no interpreter, no environment. `scripts/build.sh` builds the app.
+# So: no Homebrew, no interpreter, no environment. `Scripts/build.sh` builds the app.
#
-# Run: zsh scripts/setup_tools.sh before the optional byte-parity test.
+# Run: zsh Scripts/setup_tools.sh before the optional byte-parity test.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
TOOLS_PREFIX="${TOOLS_PREFIX:-$PROJECT_DIR/.tools}"
-REPOS_DIR="$SCRIPT_DIR/repos"
+REPOS_DIR="$SCRIPT_DIR/Repos"
ensure_repo_submodule() {
local rel_path="$1"
@@ -55,8 +55,8 @@ INSERT_DYLIB_BIN="$TOOLS_PREFIX/bin/insert_dylib"
if [[ -x "$INSERT_DYLIB_BIN" ]]; then
echo " Already built: $INSERT_DYLIB_BIN"
else
- INSERT_DYLIB_DIR="$REPOS_DIR/insert_dylib"
- ensure_repo_submodule "scripts/repos/insert_dylib"
+ INSERT_DYLIB_DIR="$REPOS_DIR/InsertDylib"
+ ensure_repo_submodule "Scripts/Repos/InsertDylib"
echo " Building insert_dylib..."
mkdir -p "$TOOLS_PREFIX/bin"
clang -o "$INSERT_DYLIB_BIN" "$INSERT_DYLIB_DIR/insert_dylib/main.c" -framework Security -O2
diff --git a/Sources/FirmwarePatcher/Binary/InPlaceRewrite.swift b/Sources/FirmwarePatcher/Binary/InPlaceRewrite.swift
index 2244ab71..fc820da4 100644
--- a/Sources/FirmwarePatcher/Binary/InPlaceRewrite.swift
+++ b/Sources/FirmwarePatcher/Binary/InPlaceRewrite.swift
@@ -19,7 +19,7 @@
// So a buffer that will be mutated and written back over its own file is READ.
// Nothing that comes through here is large: these are single Mach-Os out of a
// guest filesystem — launchd is 639 KB, the biggest is mobileactivationd at
-// 4.6 MB — so the copy costs nothing worth having, and `scripts/check_aux.sh` knows
+// 4.6 MB — so the copy costs nothing worth having, and `Scripts/check_aux.sh` knows
// this spelling is the deliberate one.
import Foundation
diff --git a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift b/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift
index dc723aa7..855741ee 100644
--- a/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift
+++ b/Sources/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift
@@ -97,7 +97,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.
+ /// (`Scripts/build.sh`) 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/CustomFirmware/CustomFirmwareInjectDylib.swift b/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift
index f78d0fe3..bbfa8e86 100644
--- a/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift
+++ b/Sources/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift
@@ -1,6 +1,6 @@
// CustomFirmwareInjectDylib.swift — LC_LOAD_DYLIB / LC_LOAD_WEAK_DYLIB insertion.
//
-// Replaces the `insert_dylib` binary built from `scripts/repos/insert_dylib`,
+// Replaces the `insert_dylib` binary built from `Scripts/Repos/InsertDylib`,
// whose only caller is the launchdhook injection in `cfw_install_jb.sh` and
// `cfw_install_exp.sh`:
//
diff --git a/Sources/MobileRestoreCore/zip.h b/Sources/MobileRestoreCore/zip.h
index a24a7f11..7c812d5a 100644
--- a/Sources/MobileRestoreCore/zip.h
+++ b/Sources/MobileRestoreCore/zip.h
@@ -14,7 +14,7 @@
* libimobiledevice, its glue, libusbmuxd and libtatsu come from the
* AppleMobileDeviceLibrary xcframeworks, and zlib and libcurl are in
* /usr/lib. Linking Homebrew's libzip would put an absolute /opt/homebrew
- * path in the dependency closure, which is exactly what `scripts/check_aux.sh`
+ * path in the dependency closure, which is exactly what `Scripts/check_aux.sh`
* gate 1 exists to reject.
*
* WHAT IS LOST
diff --git a/Sources/VPhoneAMFIAllow/vphone-amfi-allow.c b/Sources/VPhoneAMFIAllow/vphone-amfi-allow.c
index a143c553..f324ef10 100644
--- a/Sources/VPhoneAMFIAllow/vphone-amfi-allow.c
+++ b/Sources/VPhoneAMFIAllow/vphone-amfi-allow.c
@@ -3,7 +3,7 @@
//
// This is the project's copy of github.com/Lakr233/amfi-allow (MIT), which is
// one C file and no dependencies, so it is carried here rather than pulled in:
-// it cannot be a SwiftPM dependency, because `scripts/build.sh` has to build it
+// it cannot be a SwiftPM dependency, because `Scripts/build.sh` has to build it
// for arm64e and SwiftPM only emits arm64. Keep it in step with upstream; the
// only local changes are this header and the usage text.
//
diff --git a/Sources/VPhoneCLI/VPhoneFirmwareAEACLI.swift b/Sources/VPhoneCLI/VPhoneFirmwareAEACLI.swift
index 76a52bf9..63f14e3e 100644
--- a/Sources/VPhoneCLI/VPhoneFirmwareAEACLI.swift
+++ b/Sources/VPhoneCLI/VPhoneFirmwareAEACLI.swift
@@ -4,7 +4,7 @@
// fw_prepare.sh, and they are the last of them. `ipsw` is a fine program —
// statically linked Go, nothing but system libraries — but it is a program the
// user has to install with Homebrew before a .app that is supposed to be
-// self-contained can finish a job, which is the thing `scripts/check_aux.sh` exists
+// self-contained can finish a job, which is the thing `Scripts/check_aux.sh` exists
// to stop.
//
// ipsw fw aea --key <f> -> vphone-cli fw aea-key <f>
diff --git a/Sources/VPhoneCore/VPhoneGuestBinaries.swift b/Sources/VPhoneCore/VPhoneGuestBinaries.swift
index 84c4c827..16b746d5 100644
--- a/Sources/VPhoneCore/VPhoneGuestBinaries.swift
+++ b/Sources/VPhoneCore/VPhoneGuestBinaries.swift
@@ -13,7 +13,7 @@ public enum VPhoneGuestBinaries {
switch self {
case let .missing(name, searched):
"""
- no prebuilt guest binary '\(name)'. Run 'zsh scripts/build.sh'.
+ no prebuilt guest binary '\(name)'. Run 'zsh Scripts/build.sh'.
Looked in: \(searched.map(\.path).joined(separator: ", "))
"""
}
diff --git a/Sources/VPhoneCore/VPhoneGuestLauncher.swift b/Sources/VPhoneCore/VPhoneGuestLauncher.swift
index d9647105..2b123b0b 100644
--- a/Sources/VPhoneCore/VPhoneGuestLauncher.swift
+++ b/Sources/VPhoneCore/VPhoneGuestLauncher.swift
@@ -17,7 +17,7 @@ public enum VPhoneGuestLaunchError: Error, CustomStringConvertible {
return """
\(name) is missing — expected it next to this binary at:
\(url.path)
- The install looks incomplete. Rebuild with `zsh scripts/build.sh`.
+ The install looks incomplete. Rebuild with `zsh Scripts/build.sh`.
"""
case let .blockedByAMFI(guest, cdHash):
@@ -40,7 +40,7 @@ public enum VPhoneGuestLaunchError: Error, CustomStringConvertible {
case let .missingEntitlements(guest):
return """
vphone-vm is missing the private PV=3 entitlements: \(guest.path)
- Run `zsh scripts/build.sh` to sign this binary, then allow the new signature
+ Run `zsh Scripts/build.sh` to sign this binary, then allow the new signature
through the host's AMFI policy before launching a VM.
"""
diff --git a/Sources/VPhoneCore/VPhoneResources.swift b/Sources/VPhoneCore/VPhoneResources.swift
index 25b2596a..117582e9 100644
--- a/Sources/VPhoneCore/VPhoneResources.swift
+++ b/Sources/VPhoneCore/VPhoneResources.swift
@@ -153,7 +153,7 @@ public struct VPhoneResources: Sendable {
// was the dangerous one: a `PATH` fallback makes a missing environment look
// like a working one, right up until a restore fails on a stranger's
// machine. Nothing in this package may resolve an interpreter again — see
- // the "Python" section in AGENTS.md, and `scripts/check_aux.sh`, which now
+ // the "Python" section in AGENTS.md, and `Scripts/check_aux.sh`, which now
// fails outright on a python3 lookup instead of registering it.
// With the interpreter went the last `PATH` lookup in this package. Every
diff --git a/Sources/VPhoneCore/VPhoneSudo.swift b/Sources/VPhoneCore/VPhoneSudo.swift
index aac44e4f..b69df09e 100644
--- a/Sources/VPhoneCore/VPhoneSudo.swift
+++ b/Sources/VPhoneCore/VPhoneSudo.swift
@@ -120,7 +120,7 @@ public enum VPhoneSudoError: Error, CustomStringConvertible {
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 \
+ 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/Tests/VPhoneSignTests/VPhoneSignFixtures.swift b/Tests/VPhoneSignTests/VPhoneSignFixtures.swift
index 3355c41b..992b98b3 100644
--- a/Tests/VPhoneSignTests/VPhoneSignFixtures.swift
+++ b/Tests/VPhoneSignTests/VPhoneSignFixtures.swift
@@ -78,7 +78,7 @@
//
// Adding a live `ldid` call back — a `which`, a hardcoded Homebrew path, an
// environment variable — is the same regression the "Python" section of
-// AGENTS.md forbids for an interpreter: a dependency `scripts/check_aux.sh` cannot
+// AGENTS.md forbids for an interpreter: a dependency `Scripts/check_aux.sh` cannot
// see, and a silent skip when it is missing.
import CryptoKit
diff --git a/docs/README.md b/docs/README.md
index 7e1b80e9..0ecb17ad 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -21,5 +21,5 @@ These pages give a translated overview and quick start. The English guides above
- [Research index](../research/README.md) groups the patch and implementation records by subject.
- [Patch inventory](../research/0_binary_patch_comparison.md) is the canonical per-component comparison.
-- `zsh scripts/build.sh` builds and bundles the application; `swift test` and `zsh scripts/check_aux.sh` run the tests and bundle checks.
+- `zsh Scripts/build.sh` builds and bundles the application; `swift test` and `zsh Scripts/check_aux.sh` run the tests and bundle checks.
- `vphone-cli <group> --help` shows the CLI command surface.
diff --git a/docs/README_ja.md b/docs/README_ja.md
index 6b1ff5e2..0254d1bf 100644
--- a/docs/README_ja.md
+++ b/docs/README_ja.md
@@ -31,7 +31,7 @@ cloudOS 26.4(`23E5207q`)との組み合わせで、iPhone17,3 の iOS 26.6.2
```sh
git clone --recurse-submodules https://github.com/Lakr233/vphone-cli.git
cd vphone-cli
-zsh scripts/build.sh
+zsh Scripts/build.sh
.build/release/vphone-cli host preflight
```
diff --git a/docs/README_ko.md b/docs/README_ko.md
index 9c993908..29c94ced 100644
--- a/docs/README_ko.md
+++ b/docs/README_ko.md
@@ -31,7 +31,7 @@ cloudOS 26.4(`23E5207q`)와 함께 iPhone17,3 iOS 26.6.2(`23G90`), 27.0(`24A435`
```sh
git clone --recurse-submodules https://github.com/Lakr233/vphone-cli.git
cd vphone-cli
-zsh scripts/build.sh
+zsh Scripts/build.sh
.build/release/vphone-cli host preflight
```
diff --git a/docs/README_zh.md b/docs/README_zh.md
index 17bd4413..ebfe76bd 100644
--- a/docs/README_zh.md
+++ b/docs/README_zh.md
@@ -31,7 +31,7 @@ vphone-cli vm launch myphone
```sh
git clone --recurse-submodules https://github.com/Lakr233/vphone-cli.git
cd vphone-cli
-zsh scripts/build.sh
+zsh Scripts/build.sh
.build/release/vphone-cli host preflight
```
diff --git a/docs/guides/host-setup.md b/docs/guides/host-setup.md
index f245aa6c..00830bce 100644
--- a/docs/guides/host-setup.md
+++ b/docs/guides/host-setup.md
@@ -9,11 +9,11 @@ The VM needs an Apple Silicon Mac running macOS 15 or newer. PV=3 research guest
A distributed `.app` needs no Homebrew, Python or Xcode **at runtime**. A source build needs Xcode and its iPhoneOS SDK to compile vphoned. From a source checkout:
```sh
-zsh scripts/build.sh
+zsh Scripts/build.sh
.build/release/vphone-cli host preflight
```
-Use `scripts/build.sh` rather than bare `swift build`: the latter does not perform the required signing and bundling. `host preflight` checks the entitled companion before any VM is started. If AMFI refuses it, the error prints the bundled allowlist helper command.
+Use `Scripts/build.sh` rather than bare `swift build`: the latter does not perform the required signing and bundling. `host preflight` checks the entitled companion before any VM is started. If AMFI refuses it, the error prints the bundled allowlist helper command.
## Permit the entitled VM binary
diff --git a/research/0_binary_patch_comparison.md b/research/0_binary_patch_comparison.md
index 71a30775..54de67b9 100644
--- a/research/0_binary_patch_comparison.md
+++ b/research/0_binary_patch_comparison.md
@@ -416,7 +416,7 @@ and neither changing a byte:
* The three idempotence divergences in the section above stand: the Swift
recognises its own output where the Python double-applies or exits 1.
-**Not removed:** `scripts/repos/insert_dylib`. Nothing in the product runs it —
+**Not removed:** `Scripts/Repos/InsertDylib`. Nothing in the product runs it —
`CFWInjectDylib` does the injection in process — but
`CFWMachOTests.matchesInsertDylib` still runs the real binary as an independent
byte-parity reference, gated on its presence. Deleting the submodule would turn
@@ -1119,7 +1119,7 @@ cache rebuild.
- added still screenshot actions that can copy the captured image to the pasteboard or save a PNG to disk using the same private capture path.
- `make build` is used as the sanity check path; live VM validation is still needed to confirm the exact screenshot object type returned on macOS 15.
- 2026-03-15 tooling source sync update:
- - removed ad-hoc `git clone` source fetching from `scripts/setup_tools.sh` and `scripts/setup_libimobiledevice.sh`.
+ - removed ad-hoc `git clone` source fetching from `Scripts/setup_tools.sh` and `scripts/setup_libimobiledevice.sh`.
- added pinned git-submodule sources under `scripts/repos/` for: `trustcache`, `insert_dylib`, `libplist`, `libimobiledevice-glue`, `libusbmuxd`, `libtatsu`, `libimobiledevice`, `libirecovery`, `idevicerestore`.
- setup scripts now initialize required submodules via `git submodule update --init --recursive <path>` and stage build copies under local tool build directories.
- 2026-06-15 cloudOS 26.5 (23F77) JB retargeting — P0 (sudo/setuid):
diff --git a/research/guest/devmode_xpc_protocol.md b/research/guest/devmode_xpc_protocol.md
index 58662ce9..703fd69a 100644
--- a/research/guest/devmode_xpc_protocol.md
+++ b/research/guest/devmode_xpc_protocol.md
@@ -104,7 +104,7 @@ Added as `devmode` capability in vphoned guest agent:
### Entitlements
-Added to `scripts/vphoned/entitlements.plist`:
+Added to `Scripts/VPhoned/entitlements.plist`:
```xml
<key>com.apple.private.amfi.developer-mode-control</key>
diff --git a/research/history/intg_update_status.md b/research/history/intg_update_status.md
index 72b6b76b..67b9fbe4 100644
--- a/research/history/intg_update_status.md
+++ b/research/history/intg_update_status.md
@@ -34,7 +34,7 @@
| **D4** shell → zero | P3 required, P4 in scope | **0%.** The dist tier is ten `.sh` files; the tiers and gates are what make it possible to convert them one at a time without losing track of what ships |
D4 going up is not an accounting artifact. `cfw-kit/` (1,036 lines) and
-`scripts/check_aux.sh` (327) are both new on this branch; everything else nets
+`Scripts/check_aux.sh` (327) are both new on this branch; everything else nets
to −85. The 5,098 lines of Python that left `scripts/patchers/` did not take any
shell with them, because the installers called into that Python and now call
into `vphone-cli cfw` instead — same scripts, different callee. `cfw_install*.sh`
@@ -110,11 +110,11 @@ Two corrections to the earlier ledger's arithmetic:
> whether the product was any closer to standing on its own. Kept because the
> shape of the old list is what the tier split was a response to.
>
-> **Now**: `zsh scripts/check_aux.sh` reports gates 0, 1, 1b, 1c, 2 and 3 all
+> **Now**: `zsh Scripts/check_aux.sh` reports gates 0, 1, 1b, 1c, 2 and 3 all
> green, with the **dist tier's registered list empty**. See
> [`d2_d3_self_containment.md`](../host/d2_d3_self_containment.md).
-`zsh scripts/check_aux.sh --fast`, as of the previous revision:
+`zsh Scripts/check_aux.sh --fast`, as of the previous revision:
- **Gate 1 (dependency closure)** and **gate 1b (relocation)** both report
nothing. This is the change since the last revision of this file, which
@@ -152,7 +152,7 @@ against 5,895 in 22 files at `6d5ce7d`. The largest single files:
| `scripts/cfw_install.sh` | 579 |
| `scripts/cfw_install_dev.sh` | 512 |
| `scripts/cfw_install_jb.sh` | 484 |
-| `scripts/check_aux.sh` | 327 |
+| `Scripts/check_aux.sh` | 327 |
| `scripts/vphone_jb_setup.sh` | 312 |
| `cfw-kit/` (5 files) | 1,036 |
@@ -290,9 +290,9 @@ Re-run these rather than trusting the tables:
git ls-files '*.py' # D1: must print nothing
grep -rn '_resolve_python3' scripts/ Sources/ Makefile # must print nothing
grep -rn '<<.*PY' scripts/ # heredocs: must print nothing
-grep -rn 'python' scripts/*.sh # comments only, no call sites
+grep -rn 'python' Scripts/*.sh # comments only, no call sites
-zsh scripts/check_aux.sh --fast # D2: gates 1, 1b, 2
+zsh Scripts/check_aux.sh --fast # D2: gates 1, 1b, 2
find .build/vphone-cli.app -type f # D2: what the bundle ships
git ls-files scripts cfw-kit | grep '\.sh$' | xargs wc -l # D4
diff --git a/research/host/d2_d3_self_containment.md b/research/host/d2_d3_self_containment.md
index 06fac8d9..9fd86de5 100644
--- a/research/host/d2_d3_self_containment.md
+++ b/research/host/d2_d3_self_containment.md
@@ -28,8 +28,8 @@ Every script declares its tier on **line 2**:
# vphone-tier: dist
```
-`scripts/dist_manifest.sh` reads those declarations and prints the dist
-payload. `scripts/build.sh` and `make bundle` both stage from it, so the
+`Scripts/dist_manifest.sh` reads those declarations and prints the dist
+payload. `Scripts/build.sh` and `make bundle` both stage from it, so the
bundler is an **allowlist**. It used to be a list of exclusions, which is how
the `.app` came to carry `build.sh`, `check_aux.sh` and `setup_tools.sh` — the
last of which runs `brew install`. An undeclared script now ships nowhere and
diff --git a/research/host/host_binary_split.md b/research/host/host_binary_split.md
index a8b8f745..5a93f415 100644
--- a/research/host/host_binary_split.md
+++ b/research/host/host_binary_split.md
@@ -172,7 +172,7 @@ strings. That process is `vphone-vm`.
It launches perfectly. The AMFI probe therefore concludes nothing is wrong, the
boot proceeds, and it fails much later trying to create a PV=3 machine — far
from the cause. A bare `swift build -c release` leaves exactly that state
-behind, because only `make build` / `scripts/build.sh` sign. Both now verify
+behind, because only `make build` / `Scripts/build.sh` sign. Both now verify
the entitlements actually landed and fail if they did not. This was found by
walking into it.
diff --git a/research/host/naming_and_shared_module_review.md b/research/host/naming_and_shared_module_review.md
index 6f73130f..b281b25a 100644
--- a/research/host/naming_and_shared_module_review.md
+++ b/research/host/naming_and_shared_module_review.md
@@ -73,6 +73,6 @@ dependencies remain owned by the packages that use them.
## Verification
- `swift test --jobs 4`: 340 tests in 74 suites passed.
-- `zsh scripts/build.sh`: host binaries, signed app, and iOS guest built.
-- `zsh scripts/check_aux.sh`: all admission gates passed.
+- `zsh Scripts/build.sh`: host binaries, signed app, and iOS guest built.
+- `zsh Scripts/check_aux.sh`: all admission gates passed.
- `vphone-cli --help`: public `vm`, `fw`, and `cfw` command names remain present.
diff --git a/research/restore/p2_restore_off_python.md b/research/restore/p2_restore_off_python.md
index 5971d1c8..324b506c 100644
--- a/research/restore/p2_restore_off_python.md
+++ b/research/restore/p2_restore_off_python.md
@@ -279,7 +279,7 @@ Moving the restore backend into the package is what finally emptied `vendor/`.
- **`vendor/` is gone.** Every one of the seven dependencies resolves by URL;
`Package.resolved` pins fourteen once transitives are counted.
- **Submodules went from 9 to 3**: `scripts/resources`,
- `scripts/repos/trustcache`, `scripts/repos/insert_dylib`. The other six were
+ `scripts/repos/trustcache`, `Scripts/Repos/InsertDylib`. The other six were
SwiftPM checkouts 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
diff --git a/siblings/gpu/README.md b/siblings/gpu/README.md
index 10f75f21..04c6baf0 100644
--- a/siblings/gpu/README.md
+++ b/siblings/gpu/README.md
@@ -20,6 +20,6 @@ Metal compilation, leaving the host VM window black even while vphoned connects.
`main.mm` is the compiler-plugin reimplementation from
[0xjohnnydev's metal-patch](https://github.com/0xjohnnydev/0xjohnnydev.github.io/blob/main/blog/assets/metal-patch/main.mm).
`make -C siblings gpu` builds and ad-hoc signs it for iPhoneOS arm64e.
-`scripts/build.sh` stores it as `Resources/gpu/compiler-plugin.tar.zst` in the
+`Scripts/build.sh` stores it as `Resources/gpu/compiler-plugin.tar.zst` in the
app. `fw prepare` extracts that archive and puts the dylib alongside the
firmware-sourced GPU driver before exposing the complete restore tree.