Commit Graph

57 Commits

Author SHA1 Message Date
Adam McNight
ea55276f4c feat: add window menu with close/minimize shortcuts (#194) 2026-03-12 13:52:19 +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
tastyheadphones
7231f7206b apps: gate Open URL on url capability (#186) 2026-03-11 15:31:33 +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
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
Luka
1eb9f627c3 Fix: Replace emoji and non-ASCII characters (#177) 2026-03-10 18:30:01 +08:00
Lakr
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 <noreply@anthropic.com>
2026-03-10 17:12:13 +08:00
TastyHeadphones
490e024f9d menu: gate Install action on connection state (#174) 2026-03-10 11:32:27 +08:00
Lakr
100cd80c46 update_format 2026-03-10 00:55:29 +08:00
Luke Symons
cb409416af keychain: add remote keychain browser via vphoned (#169)
Co-authored-by: rezk <rezk>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 00:48:04 +08:00
TastyHeadphones
033960c9c0 menu: gate Connect actions on connection state (#161) 2026-03-09 13:40:27 +08:00
Huge_Black
76c7c9e513 allow opening symlinks pointing to folders in file manager (#156) 2026-03-09 01:17:20 +08:00
TastyHeadphones
e6f8ed8403 control: add handshake timeout and reconnect fallback (#153) 2026-03-08 22:59:26 +08:00
TastyHeadphones
c4cf6c2da6 record: always capture the VM window (#149) 2026-03-08 15:30:04 +08:00
Lakr
3a644b7332 docs: rework READMEs — fix patch counts, merge PR #148, sync translations
- Fix JB boot chain patch count: 66/78 → 112 (per research doc)
- Merge PR #148: remove cfw_install_jb_finalize, update SSH to openssh-server
- Keep dropbear instructions for Regular/Dev variants
- Add Option 2 (amfidont) to prerequisites and FAQ in all translations
- Add setup_machine options comment to all translations
- Add .tipa FAQ entry (from #142) to all translations
- Add openssh-server FAQ entries to all translations
- Run prettier on all docs
2026-03-08 13:23:34 +08:00
TastyHeadphones
4e14197e93 install: support tipa packages and show success alerts (#142) 2026-03-08 12:54:14 +08:00
Felipe Cavalcanti
32b73cd50b Rework JB finalization: drop dropbear, auto-bootstrap on first boot (#141)
* fix: build

* fix: remove [trusted=yes] from Havoc apt source

The inline [trusted=yes] option can cause issues with Sileo's
source parser. The apt-get calls already use AllowUnauthenticated
flags, making it redundant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: main actor crash in VPhoneControl + IPA extraction failures

VPhoneControl: pending request handlers are @MainActor-isolated closures
but were called from DispatchQueue.global() in the read loop and timeout
handler, causing dispatch_assert_queue_fail crashes. Wrap all
pending.handler() calls in DispatchQueue.main.async.

unarchive: the recent ARCHIVE_EXTRACT_SECURE_* hardening (ef02d50) broke
IPA extraction on iOS because:
- SECURE_NOABSOLUTEPATHS: we set absolute output paths on entries
- SECURE_SYMLINKS: iOS system paths (/var, /tmp) are symlinks
- archive_write_header failures were silently swallowed due to if/else if
  structure, making extraction report success with no files extracted

Fix by keeping only SECURE_NODOTDOT, resolving symlinks in extraction
path, fixing header error handling, removing unnecessary ACL/FFLAGS
flags, and surfacing libarchive errors in the install response.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* remove dropbear SSH daemon from guest

Drop all dropbear setup: LaunchDaemon plist injection, host key
generation, daemon deployment, and SSH availability messages.
Guest communication is handled by vphoned over vsock.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: liblaunch compat stub + automatic JB first-boot setup

liblaunch_compat.dylib: stub exporting _launch_active_user_switch
(missing from PCC VM's libSystem.B.dylib) so procursus binaries
like launchctl can load. Deployed to /cores/, loaded via
DYLD_INSERT_LIBRARIES in LaunchDaemon environment and JB profile.

vphone_jb_setup.sh: first-boot script replacing the SSH-based
cfw_install_jb_post.sh. Runs as a LaunchDaemon on first normal
boot and performs all JB finalization: /var/jb symlink,
prep_bootstrap, markers, Sileo, apt setup, TrollStore Lite.
Idempotent with done marker. Logs to /var/log/vphone_jb_setup.log.

Removes the cfw_install_jb_finalize make target and the entire
SSH/iproxy/sshpass-based post-boot flow from setup_machine.sh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update AGENTS.md firmware table, gitignore build artifacts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: launchctl wrapper uses absolute path + timeout to prevent hangs

- Use absolute path to launchctl.real instead of relative dirname,
  fixing "not found" when called via /var/jb/bin/launchctl symlink
- Add 5s timeout so launchctl doesn't hang when launchd is
  unresponsive on PCC VMs — always exits 0 for dpkg postinst compat
- Symlink /var/jb/bin/launchctl -> /var/jb/usr/bin/launchctl so both
  paths work (openssh postinst uses the /bin/ path)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: replace liblaunch_compat dylib stub with iosbinpack64 launchctl symlink

Procursus launchctl crashes on PCC VMs due to missing
_launch_active_user_switch symbol. Rather than a custom dylib stub,
simply symlink iosbinpack64's launchctl into /var/jb — it talks to
launchd fine and always exits 0, which is all dpkg scripts need.

- Remove liblaunch_compat.c, its build target, signing, and deployment
- Remove DYLD_INSERT_LIBRARIES from setup script and plist
- Replace launchctl wrapper with symlinks to /iosbinpack64/bin/launchctl
- Both /var/jb/usr/bin/launchctl and /var/jb/bin/launchctl are covered

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 12:54:00 +08:00
Lakr
b7448b7dc8 Persist window position per VM using ECID as frame autosave name 2026-03-08 02:11:25 +08:00
LiBr
b2a17f3cd1 use libarchive (#134) 2026-03-08 00:41:53 +08:00
Lakr
6b7b2cbbf1 Guard debug stub port query behind macOS 26+
The _configuration._debugStub private API causes SIGBUS on macOS 15.
Only query it on macOS 26+ where the API exists.

Closes #128
2026-03-07 23:58:59 +08:00
Lakr
5f525452c1 Remove dead code from PR #127 IPA install feature
- Remove unused installIPAWithTrollStoreLite() and bundleIdentifier(fromIPA:)
  (host only uses built-in installer path now)
- Remove canInstallIPA / ipaInstallUnavailableMessage (redundant with isConnected)
- Inline vp_resolve_ldid_path() trivial wrapper in vphoned_install.m
- Drop tslite_install from host-side timeout table
2026-03-07 23:56:32 +08:00
LiBr
56451c4d53 Merge pull request #127 from lbr77/main
ipa install
2026-03-07 23:51:33 +08:00
Morpheus
78b4f51330 Update VPhoneVirtualMachine.swift
use nonisolated(unsafe) handoff so VZVirtualMachine.start(options:) compiles under Swift 6.
2026-03-07 22:08:13 +07:00
Morpheus
a3a5347e30 Simplify URL loading from providers
fix returning non-Sendable any NSSecureCoding
2026-03-07 22:05:43 +07:00
Lakr
a6ce50b4c0 Fix unsafeBitCast warning in screenshot CF type conversion
Update VPhoneControl.swift

Update VPhoneControl.swift
2026-03-07 19:35:43 +08:00
Lakr
47f4003836 Merge branch 'main' into feature/private-display-recorder 2026-03-07 19:30:15 +08:00
Lakr
a576f5edf4 Update VPhoneVirtualMachine.swift 2026-03-07 18:47:20 +08:00
Lakr
1cbc389abc Update VPhoneWindowController.swift 2026-03-07 18:46:48 +08:00
Lakr
84af293029 Window title: show VPHONE+/- for daemon status, subtitle shows ECID 2026-03-07 18:44:09 +08:00
Lakr
cfee3ea076 Add JB finalizer script; remove IPA signing UI
Add scripts/cfw_install_jb_post.sh — an idempotent SSH-based finalizer to complete JB bootstrap on a normally-booted vphone (creates /var/jb symlink, fixes ownership, runs prep_bootstrap, creates markers, installs Sileo, and runs apt; requires sshpass). Add Makefile help, .PHONY and target cfw_install_jb_finalize to invoke the script. Remove host-side IPA signing/installing and related UI: delete VPhoneSigner, VPhoneIPAInstaller, VPhoneMenuInstall and remove signer/ipaInstaller fields and menu items/callbacks from the vphone-cli UI (also removed the DevMode enable WIP flow). Misc: minor table/formatting tweaks in AGENTS.md and research docs.
2026-03-07 18:34:49 +08:00
Lakr
b9b462d23f JB install: use external insert_dylib, preserve launchd entitlements, deploy pre-built dylibs
- Replace Python cfw_inject_dylib.py with tyilo/insert_dylib (built by setup_tools)
- Use --weak flag for LC_LOAD_WEAK_DYLIB injection (avoids crash on missing dylib)
- Preserve original launchd entitlements on re-sign (fixes "operation not permitted")
- Deploy dylibs from pre-built basebin payload instead of building from source
- Remove launchdhook, systemhook, treblehook sources (no longer needed)
- Print GDB debug stub port after VM starts
- Cleanup: remove test scripts, rename patch comparison doc
2026-03-07 18:07:27 +08:00
xcxmiku
a2cc587ffa Use private display capture for recording and screenshots 2026-03-07 15:31:00 +08:00
Lakr
239476ee38 Use auto kernel debug port by default and tighten manual range 2026-03-06 13:23:51 +08:00
Lakr
e08850a45e Isolate multi-VM setup with deterministic device targeting (#119) 2026-03-06 12:47:30 +08:00
TastyHeadphones
018b54fb94 Merge pull request #110 from TastyHeadphones/codex/control-request-timeout-cancel
Add request timeout and cancellation handling in VPhoneControl
2026-03-06 00:00:21 +08:00
Lakr
7d161d25fc Merge pull request #106 from TastyHeadphones/codex/location-presets-route-replay
Add location presets and route replay controls
2026-03-05 10:24:30 +08:00
tastyheadphones
596083f30f location: add presets and route replay controls 2026-03-05 09:31:06 +09:00
McNight
e8cb15fa72 fix: show alert on file transfer failure in File Browser
- Upload errors were silently cleared by refresh() before the alert
  could fire; fix by setting self.error after refresh()
- Unreadable local files were skipped silently; now surfaces an error
- Upload loop continued past failures unlike downloads; now breaks early
- Drag-and-drop with no resolvable URLs was silent; now shows an error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 00:32:26 +01:00
Lakr
8545dbd9bb Add kernel GDB debug stub option and validation
Introduce a kernel debug port option and wire it through the CLI and VM configuration. Adds a --kernelDebugPort CLI option (default 5909), a kernelDebugPort field in VPhoneVirtualMachine.Options, and validation (1..65535) that throws VPhoneError.invalidKernelDebugPort on invalid values. Configure the VM to use a fixed host GDB debug stub port when possible (with system-assigned fallback) and print the chosen stub info from the AppDelegate. Also include a small menu styling tweak (comma-style) in VPhoneMenuBattery.
2026-03-05 01:05:14 +08:00
xcxmiku
872bc98c3a Add synthetic battery simulation via Virtualization.framework private API
Use _VZMacSyntheticBatterySource to inject a virtual power source into the
guest VM. The guest kernel's AppleVirtualPlatformPowerSource driver picks it
up automatically via VirtIO, giving iOS a real battery indicator without any
guest-side changes.

- Default: 100% charge, charging state
- Runtime-adjustable via setBattery(charge:connectivity:)
- Battery menu in menu bar with level presets and charging toggle
2026-03-04 22:25:23 +08:00
Lakr
62b1564e20 refactor: split patchers into base/mixin modules and format scripts 2026-03-04 15:19:17 +08:00
Lakr
e695526840 Merge pull request #93 from jalyfeng/bugfix/jb
support input for vphone window
2026-03-04 13:39:23 +08:00
Lakr
fa054ca719 Add Git LFS instructions and fix Makefile help alignment
- Add git-lfs to brew deps and document git lfs install/pull steps
  in both English and Chinese READMEs
- Fix continuation line alignment in make help (off by one)
- Add missing blank line before VM management section
2026-03-03 13:09:31 +08:00
Lakr
8c7d9911a2 Clean up location passthrough PR: consistent formatting and logging 2026-03-02 19:28:53 +08:00
Lakr
c0f0efa492 Merge pull request #51 from SongXiaoXi/main
feat: add host location passthrough to guest VM
2026-03-02 18:36:38 +08:00
Lakr
e5fdad341f Skip vsock control connection in DFU mode
No guest OS is running in DFU, so attempting to connect causes
endless "Connection reset by peer, retrying..." log spam.
2026-03-02 18:36:12 +08:00