323 Commits
Author SHA1 Message Date
Maximilian Paß e6dd6ef722 Add Entropy and Accelerator Devices 2026-04-21 22:05:47 +03:00
sindo 5f151aca45 make: fix vm_list exit code when backups exist
[ "$$found" = "0" ] && echo ... returns exit 1 when backups exist,
which propagates as a make rule failure. Replace it with if/fi so the
target exits successfully in both cases.
2026-04-21 22:04:00 +03:00
zqxwce 120d6f9862 venv: Fix python3 locating for enviornments using uv 2026-04-20 17:23:32 +03:00
zqxwce 3b48ce6cf3 iosbinpack64: dev_overlay: Move dev overlay to before install 2026-04-20 17:23:32 +03:00
24a9acdf71 kernel: add patch 27 — disable thread_guard_violation (EXC_GUARD)
* kernel: add patch #27 — disable thread_guard_violation (EXC_GUARD)

Research kernels fatally enforce Mach port guard violations via
thread_guard_violation() → AST delivery → EXC_GUARD. This kills any
app whose crash reporting SDK (Bugly, Crashlytics, KSCrash, etc.)
calls task_swap_exception_ports() to register Mach exception handlers.
Production iOS does not enforce these fatally.

Patch strategy: locate thread_guard_violation through an anchor chain
(entitlement string → set_exception_behavior_violation → inner BL) and
replace its PACIBSP prologue with RET so it returns immediately without
recording or delivering the violation.

Closes #291

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* review: remove SDK mentions, add patch #27 to patch comparison table

Address PR review feedback:
1. Remove specific SDK names from KernelPatchExcGuard.swift comments
2. Add patch #27 (thread_guard_violation) to research/0_binary_patch_comparison.md
3. Update kernel base patch counts 28→29 across all references

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* kernel: scope thread_guard_violation patch to dev variant only

Per maintainer review, the EXC_GUARD disable patch is only needed for the
dev variant. Regular cannot sideload the affected apps at all (no developer
mode), and JB already masks the crash via its extended patch set.

Add `isDev` flag to KernelPatcher, gate patchExcGuardBehavior() on it, and
have FirmwarePipeline pass the right value per variant.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* Apply suggestions from code review

Co-authored-by: zqxwce <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Co-authored-by: zqxwce <[email protected]>
2026-04-20 14:56:14 +03:00
zqxwce 367209a1e4 amfidont: Simplify start_amfidont_for_vphone.sh 2026-04-15 16:41:07 +03:00
zqxwce 7d09a1bb0e patchless: Add support for non SIP/AMFI disabled systems 2026-04-15 16:41:07 +03:00
RowSalmon 65aa42f2c1 Update README.md
It could be more clear that git submodules must be installed.

In my case, I  missed this, leading to hours of troubleshooting. 

This commit seeks to make it more clear what steps are needed to install dependencies.
2026-04-10 14:40:58 +03:00
zqxwce 45c3df7609 setup_tools: Limit apfs_sealvolume download to patchless variant only 2026-04-08 18:31:14 +03:00
Maximilian Paßandzqxwce 8188761e24 [Patchless] Add AMFI preflight test
Co-authored-by: zqxwce <[email protected]>
2026-04-08 18:29:01 +03:00
Maximilian Paßanddevin d3395aee95 [Patchless] Fix Posix file permissions
Co-authored-by: devin <[email protected]>
2026-04-08 18:29:01 +03:00
Maximilian Paß ecf1c327fc [Patchless] Add vphoned 2026-04-08 18:29:01 +03:00
Maximilian Paß a65eacf126 [Patchless] Add iBEC/LLB Patching for Serial Logs 2026-04-08 18:29:01 +03:00
Maximilian Paß b81fa62a11 Introduce Patchless Variant 2026-04-08 18:29:01 +03:00
Maximilian Paß 3024223b0c [Patchless] Add Mobile Activation Patch 2026-04-08 18:29:01 +03:00
Maximilian Paß c5ee950a95 [Patchless] Add GPU Driver 2026-04-08 18:29:01 +03:00
Maximilian Paß 07081afbe3 [Patchless] Add Filesystem Patcher 2026-04-08 18:29:01 +03:00
Maximilian Paß b5466c205b [Patchless] Add BuildManifest Hash Update
for the regular mode.
2026-04-08 18:29:01 +03:00
Maximilian Paß 210d58823d Allow use of default / unpatched AVPBooter 2026-04-08 18:29:01 +03:00
Maximilian Paß c1b590f697 [Patchless] Disable patches 2026-04-08 18:29:01 +03:00
pluginslabandClaude Opus 4.6 a7dd34fb56 docs: add Automation section with vphone-mcp reference
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-04 18:54:10 +03:00
pluginslabandClaude Opus 4.6 2c9238524e hostctl: return compact grayscale screenshot with every action
Every command response now includes an "image" field with a base64-
encoded grayscale JPEG of the current screen (~40-60KB vs multi-MB PNG).
This eliminates the need for a separate screenshot call after each action.

The image is:
- Downscaled to 1/3 resolution (430x932)
- Converted to grayscale for high contrast
- JPEG compressed at quality 0.35

Optional parameters on any command:
- "screen":false  → skip the screenshot capture
- "delay":800     → ms to wait before capture (default 500)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-04 18:52:47 +03:00
pluginslabandClaude Opus 4.6 1f6a64aae4 hostctl: add type command (clipboard_set + paste)
Sets the guest clipboard via the vsock control channel, enabling
text input from external automation. Callers can then tap Paste in
the iOS context menu to insert the text.

  echo '{"t":"type","text":"Hello"}' | nc -U vm/vphone.sock

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-04 18:52:47 +03:00
pluginslabandClaude Opus 4.6 dfdec8c393 feat: add host-side automation socket for programmatic VM control
Add a Unix domain socket server (vm/vphone.sock) that accepts JSON
commands from external processes, enabling programmatic E2E testing
of iOS apps running in the VM.

Supported commands:
- screenshot: capture VM display to file (PNG/JPEG by extension)
- tap: inject touch at pixel coordinates (matching screenshot dims)
- swipe: inject swipe gesture between two points
- key: send hardware keys (home/power/volup/voldown) via HID

The socket uses a simple one-line JSON protocol: connect, send request,
receive response, disconnect.  Example usage from CLI:

  echo '{"t":"screenshot","path":"/tmp/s.png"}' | nc -U vm/vphone.sock
  echo '{"t":"tap","x":500,"y":1900}' | nc -U vm/vphone.sock
  echo '{"t":"key","name":"home"}' | nc -U vm/vphone.sock

New files:
- VPhoneHostControl.swift: socket server, command dispatch

Modified:
- VPhoneScreenRecorder: add saveScreenshot(view:to:) with PNG support
- VPhoneVirtualMachineView: add injectTap/injectSwipe via synthetic
  NSEvents routed through the existing mouse event handlers
- VPhoneAppDelegate: wire up VPhoneHostControl lifecycle

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-04 18:52:47 +03:00
tastyheadphones a36b797a6e boot: validate --install-ipa before startup 2026-04-04 17:31:36 +03:00
zqxwce 20d3f1a217 pymobiledevice3: Replace most external tools with pymobiledevice3 2026-04-03 13:47:09 +03:00
pluginslab 981f2cfcc9 setup_machine: fix ECID mismatch race in DFU recovery wait (#260) 2026-03-31 07:59:36 +08:00
TastyHeadphones 5ab5e5b6f8 setup: install and document aria2c (#237) 2026-03-19 03:24:01 +09:00
James Jackson 1e3d6d75ee boot: add --install-ipa auto-install option (#236) 2026-03-18 11:49:18 +09:00
Xin Huang c7205642e5 docs: add amfree support as an alternative to amfidont for Option 2 (#235) 2026-03-18 11:48:39 +09:00
TastyHeadphones e0ad9e87ed boot_preflight: skip /dev/tty fallback without a tty (#225) 2026-03-17 18:31:34 +09:00
Brandon Lekai 9c90286b70 Implement a battery sync between the VM and the host (#230)
* Implement battery sync with host

* Clean up the previous sync implementation

* Enable the battery sync functionality by default

* Re-sync the VM's battery state when vphoned reconnects
2026-03-17 18:31:13 +09:00
Mustafa Dur 78e4c0cb6d Prevent script exit when nvram boot-args is missing (#219) 2026-03-16 01:40:17 +09:00
zqxwce 30fcc05ca5 refactor: Move all manual clones to be submodules (#218) 2026-03-16 01:40:05 +09:00
Casper Ngo-yat ONG 5516de8557 Update README for more quick setup options (#217) 2026-03-16 01:39:41 +09:00
Casper Ngo-yat ONG 80e1d686ac Fix iproxy port number mapping typo in all languages docs (#214)
* Fix iproxy port number for SSH connection

* Fix iproxy port number in README_zh.md

* Fix iproxy port number in Japanese README

* Fix iproxy port number in README_ko.md
2026-03-15 23:04:02 +09:00
Adam McNight 5484151149 fix: handle multi-volume csrutil prompt in boot preflight (#209) 2026-03-15 16:59:42 +09:00
TastyHeadphones 71b8f8e53b vm: validate restore and switch backup names (#210) 2026-03-15 16:59:16 +09:00
Adam McNight a2fc0d37ca feat: forward host Touch ID events to VM (#208)
Support single & double taps
2026-03-15 01:40:42 +09:00
maybe developer fea8d88513 feat: add aria2c support instead of shitty wget/curl (#207) 2026-03-15 01:39:57 +09:00
matteo zappia 624ed4de31 add: VM backup, restore, and switch support (#206)
* fix: prefer project venv Python for patchers

* add: VM backup, restore, and switch support

Named backups via rsync --sparse for efficient sparse disk handling.
- vm_backup.sh: save current VM as a named backup to vm.backups/
- vm_restore.sh: restore a named backup into vm/
- vm_switch.sh: save current + restore target in one step
- Makefile targets: vm_backup, vm_restore, vm_switch, vm_list
- Documentation added to all READMEs (EN, ZH, KO, JA)

Closes #204

Made-with: Cursor
2026-03-15 01:39:10 +09:00
Luka 23cf4eadbc Fix: macOS ImageIO SIGBUS crash fixes (#205)
* fix: macOS 26.3 ImageIO SIGBUS crash fixes

All crashes share the same root cause: a corrupt function pointer in
macOS 26.3's ImageIO PNG decoder (EXC_BAD_ACCESS SIGBUS at 0x0bad4007).

Fixes:
- Replace emoji and non-ASCII characters in UI strings that trigger
  the broken PNG decoder via AppKit's text rendering pipeline
- Replace all NSAlert usage with NSPanel to avoid the crash when
  NSAlert loads a NIB containing an NSImageView that triggers
  IconServices -> ImageIO -> PNGReadPlugin
- Replace requireConnection() NSAlert in VPhoneKeyHelper with a print
  statement to prevent crash on home gesture before vphoned connects
- Switch screenshot output format from PNG to JPEG to avoid the crash
  in CGImageDestinationFinalize -> PNGWritePlugin

* fix: additional macOS 26.3 ImageIO SIGBUS crash fixes

- Fix copyScreenshotToPasteboard crash by writing JPEG data directly
  to pasteboard instead of using NSImage writeObjects which internally
  triggers the broken TIFF encoder
- Replace requireConnection() print statement with NSPanel to properly
  notify user when key injection is attempted before VM connects

* fix: additional macOS 26.3 ImageIO SIGBUS crash fixes

- Fix copyScreenshotToPasteboard crash by writing JPEG data directly
  to pasteboard instead of using NSImage writeObjects which internally
  triggers the broken TIFF encoder
- Replace requireConnection() print statement with NSPanel to properly
  notify user when key injection is attempted before VM connects
2026-03-15 01:38:40 +09:00
TastyHeadphones d4d2515970 control: gate accessibility_tree on guest capability (#203) 2026-03-14 12:48:18 +09:00
TastyHeadphones c67de21483 setup_machine: avoid errexit-sensitive arithmetic increments (#201) 2026-03-13 22:16:40 +09:00
TastyHeadphones 3fb8245001 apps: refresh App Browser after reconnect (#200) 2026-03-13 01:11:48 +08:00
zqxwce 4b052cc1ca setup_machine: Fix (( waited++ )) causing exit on first iteration (#199)
In the first iteration, waited would be 0 and cause the expression to be evaluated to `(( 0 ))`, which exists as it returns 1.
2026-03-13 01:11:13 +08:00
Adam McNight ea55276f4c feat: add window menu with close/minimize shortcuts (#194) 2026-03-12 13:52:19 +08:00
Robert H 0320c9142c Update vm_manifest.py (#198)
fix issue with older python versions erroring out on line 20 (formerly 19)
2026-03-12 13:52:08 +08:00
TastyHeadphones 6cc5a11b09 fw_prepare: avoid cloudOS cache key collisions for extensionless sources (#197) 2026-03-12 13:51:57 +08:00
Xin Huang 08c9cb78ee Nix PATH preservation, amfidont boot, and preflight stability (#196)
* fix: preserve caller PATH through Nix zshenv reset in cfw scripts

Nix darwin's /etc/zshenv resets PATH on every zsh subprocess,
discarding the Makefile's carefully constructed PATH (which includes
.venv/bin and /opt/homebrew/bin). This caused 'Missing Python deps'
and ldid PKCS12_parse errors during cfw_install.

Pass the Makefile PATH through _VPHONE_PATH env var (which zshenv
won't touch), and restore it at the top of each cfw_install script.

* fix(cfw_install_dev): add python resolver, use glob for vphoned sources

- Add _resolve_python3() matching cfw_install.sh so the venv python
  is used instead of Nix system python (which lacks capstone/keystone).
- Replace hardcoded VPHONED_SRCS list with glob pattern to auto-pick
  up new .m files (was missing 5 files: accessibility, apps, clipboard,
  settings, url — causing linker errors).

* fix: amfidont uses bundle binary CDHash and .build path

make boot launches the bundle binary (.build/vphone-cli.app/Contents/
MacOS/vphone-cli), not the release binary. amfidont's --path must
cover the .app bundle location.

- amfidont_allow_vphone depends on bundle (not build)
- start_amfidont_for_vphone.sh extracts CDHash from bundle binary
- --path points to .build/ so amfidont covers .app bundle contents

* fix(preflight): prevent run_capture errexit on non-zero return

zsh set -e is global scope — set -e inside run_capture then
return 137 triggers errexit and kills the script before reaching
the assert-bootable check. Use '|| rc=$?' instead to capture
the exit code without modifying errexit state.
2026-03-12 13:51:45 +08:00