Commit Graph
303 Commits
Author SHA1 Message Date
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
Adam McNight 06e12c94a1 feat: many file browser improvements (#195)
* toolbar with many shortcuts + search bar
* drag & drop improvements
* QuickLook feature
2026-03-12 13:51:31 +08:00
TastyHeadphones 11048d6c00 apps: gate Install on ipa_install capability (#191) 2026-03-11 23:10:17 +08:00
Felipe Cavalcanti 5da047bddd Add firmware listing and selectable IPSW resolution (#188) 2026-03-11 15:32:03 +08:00
matteo zappia e8c29f3a82 fix: prefer project venv Python for patchers (#187) 2026-03-11 15:31:44 +08:00
tastyheadphones 7231f7206b apps: gate Open URL on url capability (#186) 2026-03-11 15:31:33 +08:00
itsmylife44 3fd048d232 fix: use wildcard for vphoned sources in cfw_install.sh (#185) 2026-03-11 15:31:15 +08:00
Managed via Tart d042596cc0 Complete Swift firmware patcher parity and CLI wiring
Run SwiftFormat on firmware patcher

Remove legacy Python firmware patchers

Fix compare pipeline pyimg4 PATH handling

Restore Python patchers and prefer fresh restore

Update BinaryBuffer.swift

Avoid double scanning in patcher apply

Prefer Python TXM site before fallback

Retarget TXM trustcache finder for 26.1

Remove legacy Python firmware patchers

Fail fast on nested virtualization hosts

Return nonzero on fatal boot startup

Add amfidont helper for signed boot binary

Stage AMFI boot args for next host reboot

Add host preflight for boot entitlements

Fail fast when boot entitlements are unavailable

Switch firmware patch targets to Swift CLI

Record real Swift firmware parity results

Verify Swift firmware pipeline end-to-end parity

Fix Swift firmware pipeline JB dry-run
2026-03-11 15:05:49 +08:00
Lakr 08eb9d260f 🐦 iBSS iBEC LLB TXM
update

update
2026-03-11 04:22:50 +08:00
Lakr e189b80cf7 feat: Add vphoned modules, consolidate menus, and SwiftUI App Browser
- Add vphoned modules: accessibility, apps, clipboard, settings, url
- Consolidate menus into Connect (file browser, keychain, devmode, ping,
  clipboard, settings, location, battery) and Apps (app browser, open URL,
  install IPA)
- Simplify CLI to manifest-only config (remove individual CLI flags)
- Add SwiftUI App Browser window with filter/search/scroll table
- Fix Location and Battery submenu items missing titles
- Remove broken foreground app detection and launch/terminate commands
2026-03-11 01:15:14 +08:00
Joshua Seltzer b18e95524d Fix cp command (#183) 2026-03-11 00:42:34 +08:00
X Sanchez 674a7f108e feat: add dock app icon (#182) 2026-03-11 00:42:26 +08:00
TastyHeadphones db752baaec record: show saved path after stopping (#181) 2026-03-10 23:02:59 +08:00
X Sanchez 6a6373a608 🐛 fix platform fusing one error (#180) 2026-03-10 23:01:46 +08:00
Luka 1eb9f627c3 Fix: Replace emoji and non-ASCII characters (#177) 2026-03-10 18:30:01 +08:00
LakrandClaude Sonnet 4.6 6d11093152 feat: Add VM manifest system and code clarity improvements
Implement VM configuration manifest system compatible with security-pcc's
VMBundle.Config format, storing VM settings in config.plist.

**Manifest System:**
- Add VPhoneVirtualMachineManifest.swift with security-pcc compatible structure
- Add scripts/vm_manifest.py for manifest generation during vm_new
- Update VPhoneCLI to support --config option with CLI overrides
- Update vm_create.sh to generate config.plist with CPU/memory/screen settings

**Environment Variables:**
- CPU/MEMORY/DISK_SIZE now only used during vm_new (written to manifest)
- boot/boot_dfu automatically read from config.plist
- Remove unused CFW_INPUT variable (overridden by scripts internally)
- Document remaining variables with their usage scope

**Documentation:**
- Update README.md with VM configuration section
- Update docs/README_{zh,ja,ko}.md with translated VM configuration docs
- Update Makefile help output with vm_new options and config.plist usage
- Fix fw_patch_jb description: "dev + JB extensions"
- Fix restore_get_shsh description: "Dump SHSH response from Apple"

**Code Quality:**
- Add VPhoneVirtualMachineRefactored.swift demonstrating code-clarity principles
- Extract 200+ line init into focused configuration methods
- Improve naming: hardwareModel, graphicsConfiguration, soundDevice
- Add BatteryConnectivity enum for magic numbers
- Create research/manifest_and_refactoring_summary.md with full analysis

**Compatibility with security-pcc:**
- Platform type: Fixed vresearch101 (iPhone-only)
- Network: NAT only (no bridging/host-only needed)
- Added: ScreenConfig and SEP storage (iPhone-specific)
- Removed: VirtMesh plugin support (PCC-specific)

docs: add machineIdentifier storage analysis

Research and validate the integration of machineIdentifier into config.plist.

**Findings:**
- security-pcc stores machineIdentifier in config.plist (same approach)
- VZMacAuxiliaryStorage creation is independent of machineIdentifier
- VZMacMachineIdentifier only requires Data representation, not file source
- No binding or validation between components

**Conclusion:**
-  No compatibility issues
-  Matches security-pcc official implementation
-  Proper handling of first-boot creation and data recovery
-  Safe to use

Delete VPhoneVirtualMachineRefactored.swift

refactor: integrate machineIdentifier into config.plist

Move machineIdentifier storage from standalone machineIdentifier.bin file
into the central config.plist manifest for simpler VM configuration.

**Changes:**
- VPhoneVirtualMachineManifest: Remove machineIDFile field
- VPhoneVirtualMachine: Load/create machineIdentifier from manifest
- VPhoneCLI: Remove --machine-id parameter, require --config
- Makefile: Remove --machine-id from boot/boot_dfu targets
- vm_manifest.py: Remove machineIDFile from manifest structure

**Behavior:**
- First boot: Creates machineIdentifier and saves to config.plist
- Subsequent boots: Loads machineIdentifier from config.plist
- Invalid/empty machineIdentifier: Auto-regenerates and updates manifest
- All VM configuration now centralized in single config.plist file

**File cleanup:**
- Move VPhoneVirtualMachineRefactored.swift to research/ as reference

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-10 17:12:13 +08:00
Lakr 7514e10d06 Tidy tweakloader README and adjust table spacing
Convert README header to ATX style and add spacing/blank lines for improved Markdown readability in scripts/tweakloader/README.md. Also adjust spacing in a table row in research/0_binary_patch_comparison.md to correct alignment/formatting.
0.1.4
2026-03-10 12:15:44 +08:00
TastyHeadphones 490e024f9d menu: gate Install action on connection state (#174) 2026-03-10 11:32:27 +08:00
Felipe Cavalcanti cd389412ec Add tweakloader to jailbreak install flow (#173) 2026-03-10 11:32:08 +08:00
Felipe Cavalcanti 97f96a86e0 Fix TrollStore Lite install failure handling (#172) 2026-03-10 11:31:42 +08:00
zqxwce e040c3e422 dtree: Implement device tree patching (#170) 2026-03-10 02:52:21 +08:00