mirror of
https://github.com/Lakr233/vphone-cli.git
synced 2026-09-02 02:34:29 +00:00
pymobiledevice3: Replace most external tools with pymobiledevice3
This commit is contained in:
+20
-10
@@ -75,10 +75,13 @@ Apple の Virtualization.framework と PCC の研究用 VM インフラを使用
|
||||
sudo amfree --path [PATH_TO_VPHONE_DIR]
|
||||
```
|
||||
|
||||
このリポジトリでは、`make amfidont_allow_vphone` を実行すると
|
||||
`amfidont` 用のエンコード済みパスと CDHash の許可設定をまとめて行えます。
|
||||
|
||||
**依存関係のインストール:**
|
||||
|
||||
```bash
|
||||
brew install aria2 ideviceinstaller wget gnu-tar openssl@3 ldid-procursus sshpass keystone autoconf automake pkg-config libtool cmake
|
||||
brew install aria2 wget gnu-tar openssl@3 ldid-procursus sshpass keystone libusb ipsw
|
||||
```
|
||||
|
||||
`scripts/fw_prepare.sh` は高速な多重接続ダウンロードのために `aria2c` を優先し、必要に応じて `curl` または `wget` にフォールバックします。
|
||||
@@ -94,12 +97,14 @@ git clone --recurse-submodules https://github.com/Lakr233/vphone-cli.git
|
||||
```bash
|
||||
make setup_machine # 初回起動までを完全自動化(復元/ラムディスク/CFWを含む)
|
||||
# オプション:NONE_INTERACTIVE=1 SUDO_PASSWORD=...
|
||||
# DEV=1 で開発バリアント(+ TXM entitlement/デバッグバイパス)
|
||||
# JB=1 で脱獄バリアント(dev + 完全セキュリティバイパス)
|
||||
```
|
||||
|
||||
## 手動セットアップ
|
||||
|
||||
```bash
|
||||
make setup_tools # brew の依存関係インストール(aria2c を含む)、submodule ソースから trustcache + insert_dylib + libimobiledevice をビルド、Python venv の作成
|
||||
make setup_tools # brew 依存関係のインストール、trustcache + insert_dylib のビルド、Python venv 作成(pymobiledevice3/aria2c を含む)
|
||||
make build # vphone-cli のビルド + 署名
|
||||
make vm_new # VM ディレクトリとマニフェスト(config.plist)の作成
|
||||
# オプション:CPU=8 MEMORY=8192 DISK_SIZE=64
|
||||
@@ -135,7 +140,7 @@ make boot_dfu # DFUモードでVMを起動(実行したまま
|
||||
```bash
|
||||
# ターミナル 2
|
||||
make restore_get_shsh # SHSH blob の取得
|
||||
make restore # idevicerestore 経由でファームウェアを焼き込み
|
||||
make restore # pymobiledevice3 restore バックエンドでファームウェアを焼き込み
|
||||
```
|
||||
|
||||
## カスタムファームウェアのインストール
|
||||
@@ -153,11 +158,11 @@ sudo make ramdisk_build # 署名済みSSH Ramdisk のビルド
|
||||
make ramdisk_send # デバイスへ送信
|
||||
```
|
||||
|
||||
Ramdisk が起動したら(出力に `Running server` と表示されるはずです)、iproxy トンネル用に **3つ目のターミナル** を開き、ターミナル 2 から CFW をインストールします:
|
||||
Ramdisk が起動したら(出力に `Running server` と表示されるはずです)、usbmux トンネル用に **3つ目のターミナル** を開き、ターミナル 2 から CFW をインストールします:
|
||||
|
||||
```bash
|
||||
# ターミナル 3 — 実行したままにする
|
||||
iproxy 2222 22
|
||||
python3 -m pymobiledevice3 usbmux forward 2222 22
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -200,13 +205,13 @@ shutdown -h now
|
||||
make boot
|
||||
```
|
||||
|
||||
別のターミナルで iproxy トンネルを開始します:
|
||||
別のターミナルで usbmux 転送トンネルを開始します:
|
||||
|
||||
```bash
|
||||
iproxy 2222 22222 # SSH(dropbear)
|
||||
iproxy 2222 22 # SSH(脱獄版:Sileo で openssh-server を入れた場合)
|
||||
iproxy 5901 5901 # VNC
|
||||
iproxy 5910 5910 # RPC
|
||||
python3 -m pymobiledevice3 usbmux forward 2222 22222 # SSH(dropbear)
|
||||
python3 -m pymobiledevice3 usbmux forward 2222 22 # SSH(脱獄版:Sileo で openssh-server を入れた場合)
|
||||
python3 -m pymobiledevice3 usbmux forward 5901 5901 # VNC
|
||||
python3 -m pymobiledevice3 usbmux forward 5910 5910 # RPC
|
||||
```
|
||||
|
||||
以下で接続します:
|
||||
@@ -247,6 +252,11 @@ AMFI/デバッグ制限が正しくバイパスされていません。以下の
|
||||
|
||||
- **方法 2(デバッグ制限のみ無効化):**
|
||||
復旧モードで `csrutil enable --without debug`(完全な SIP 無効化は不要)を使用し、[`amfidont`](https://github.com/zqxwce/amfidont) または [`amfree`](https://github.com/retX0/amfree) をインストール/ロードして AMFI のその他の機能は有効のままにします。
|
||||
このリポジトリでは、`make amfidont_allow_vphone` により `amfidont` で必要なエンコード済みパスと CDHash の許可設定を自動で行えます。
|
||||
|
||||
**Q: `make boot` / `make boot_dfu` が `VZErrorDomain Code=2 "Virtualization is not available on this hardware."` で失敗します**
|
||||
|
||||
ホスト自体が Apple 仮想マシン上で動作しているため、ネストされた Virtualization.framework のゲスト起動は利用できません。ネストされていない macOS 15+ ホストで実行してください。`make boot_host_preflight` ではこの状態を `Model Name: Apple Virtual Machine 1` と `kern.hv_vmm_present=1` として確認できます。現在は `boot_binary_check` により、該当ホストでは起動前に早期失敗します。
|
||||
|
||||
**Q: システムアプリ(App Store、メッセージなど)がダウンロード・インストールできません**
|
||||
|
||||
|
||||
+20
-10
@@ -75,10 +75,13 @@ PCC 리서치 VM 인프라와 Apple의 Virtualization.framework를 사용하여
|
||||
sudo amfree --path [PATH_TO_VPHONE_DIR]
|
||||
```
|
||||
|
||||
이 저장소에서는 `make amfidont_allow_vphone`으로 `amfidont`에 필요한
|
||||
인코딩 경로와 CDHash 허용 설정을 한 번에 적용할 수 있습니다.
|
||||
|
||||
**의존성(Dependencies) 설치:**
|
||||
|
||||
```bash
|
||||
brew install aria2 ideviceinstaller wget gnu-tar openssl@3 ldid-procursus sshpass keystone autoconf automake pkg-config libtool cmake
|
||||
brew install aria2 wget gnu-tar openssl@3 ldid-procursus sshpass keystone libusb ipsw
|
||||
```
|
||||
|
||||
`scripts/fw_prepare.sh` 는 더 빠른 다중 연결 다운로드를 위해 `aria2c` 를 우선 사용하고, 필요하면 `curl` 또는 `wget` 으로 폴백합니다.
|
||||
@@ -94,12 +97,14 @@ git clone --recurse-submodules https://github.com/Lakr233/vphone-cli.git
|
||||
```bash
|
||||
make setup_machine # "First Boot"까지의 전체 과정 자동화 (복원/Ramdisk/커스텀 펌웨어 포함)
|
||||
# 옵션: NONE_INTERACTIVE=1 SUDO_PASSWORD=...
|
||||
# DEV=1 개발 변형 (+ TXM 권한/디버그 우회)
|
||||
# JB=1 탈옥 변형 (dev + 전체 보안 우회)
|
||||
```
|
||||
|
||||
## 수동 설정
|
||||
|
||||
```bash
|
||||
make setup_tools # brew 의존성 설치(aria2c 포함), submodule 소스에서 trustcache + insert_dylib + libimobiledevice 빌드, Python venv 생성
|
||||
make setup_tools # brew 의존성 설치, trustcache + insert_dylib 빌드, Python venv 생성(pymobiledevice3/aria2c 포함)
|
||||
make build # vphone-cli 빌드 및 서명
|
||||
make vm_new # VM 디렉토리 및 매니페스트(config.plist) 생성
|
||||
# 옵션: CPU=8 MEMORY=8192 DISK_SIZE=64
|
||||
@@ -135,7 +140,7 @@ make boot_dfu # VM을 DFU 모드로 부팅 (계속 실행 유지
|
||||
```bash
|
||||
# 터미널 2
|
||||
make restore_get_shsh # SHSH blob 가져오기
|
||||
make restore # idevicerestore를 통해 펌웨어 플래싱
|
||||
make restore # pymobiledevice3 restore 백엔드로 펌웨어 플래싱
|
||||
```
|
||||
|
||||
## 커스텀 펌웨어 설치
|
||||
@@ -153,11 +158,11 @@ sudo make ramdisk_build # 서명된 SSH 램디스크 빌드
|
||||
make ramdisk_send # 장치로 전송
|
||||
```
|
||||
|
||||
램디스크가 실행되면(출력에 `Running server`가 표시됨), **세 번째 터미널**을 열어 iproxy 터널을 시작한 후, 터미널 2에서 커스텀 펌웨어를 설치합니다:
|
||||
램디스크가 실행되면(출력에 `Running server`가 표시됨), **세 번째 터미널**을 열어 usbmux 터널을 시작한 후, 터미널 2에서 커스텀 펌웨어를 설치합니다:
|
||||
|
||||
```bash
|
||||
# 터미널 3 — 계속 실행 유지
|
||||
iproxy 2222 22
|
||||
python3 -m pymobiledevice3 usbmux forward 2222 22
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -200,13 +205,13 @@ shutdown -h now
|
||||
make boot
|
||||
```
|
||||
|
||||
별도의 터미널에서 iproxy 터널을 시작합니다:
|
||||
별도의 터미널에서 usbmux 포워딩 터널을 시작합니다:
|
||||
|
||||
```bash
|
||||
iproxy 2222 22222 # SSH (dropbear)
|
||||
iproxy 2222 22 # SSH (탈옥: Sileo에서 openssh-server를 설치한 경우)
|
||||
iproxy 5901 5901 # VNC
|
||||
iproxy 5910 5910 # RPC
|
||||
python3 -m pymobiledevice3 usbmux forward 2222 22222 # SSH (dropbear)
|
||||
python3 -m pymobiledevice3 usbmux forward 2222 22 # SSH (탈옥: Sileo에서 openssh-server를 설치한 경우)
|
||||
python3 -m pymobiledevice3 usbmux forward 5901 5901 # VNC
|
||||
python3 -m pymobiledevice3 usbmux forward 5910 5910 # RPC
|
||||
```
|
||||
|
||||
다음을 통해 연결합니다:
|
||||
@@ -247,6 +252,11 @@ AMFI/디버그 제한이 올바르게 우회되지 않았습니다. 다음 중
|
||||
|
||||
- **방법 2 (디버그 제한만 비활성화):**
|
||||
복구 모드에서 `csrutil enable --without debug`(완전한 SIP 비활성화 없음)를 사용한 다음, [`amfidont`](https://github.com/zqxwce/amfidont) 또는 [`amfree`](https://github.com/retX0/amfree)를 설치/로드하여 AMFI의 나머지 기능은 활성 상태로 유지합니다.
|
||||
이 저장소에서는 `make amfidont_allow_vphone`으로 `amfidont`에 필요한 인코딩 경로와 CDHash 허용 설정을 자동 적용할 수 있습니다.
|
||||
|
||||
**Q: `make boot` / `make boot_dfu` 실행 시 `VZErrorDomain Code=2 "Virtualization is not available on this hardware."`로 실패합니다.**
|
||||
|
||||
호스트 자체가 Apple 가상 머신에서 실행 중이기 때문에, 중첩된 Virtualization.framework 게스트 부팅은 지원되지 않습니다. 중첩이 아닌 macOS 15+ 호스트에서 실행하세요. `make boot_host_preflight`에서 `Model Name: Apple Virtual Machine 1` 및 `kern.hv_vmm_present=1`로 이를 확인할 수 있습니다. 현재는 이런 호스트에서 `boot_binary_check`가 VM 시작 전에 빠르게 실패 처리합니다.
|
||||
|
||||
**Q: 시스템 앱(App Store, 메시지 등)을 다운로드하거나 설치할 수 없습니다.**
|
||||
|
||||
|
||||
+18
-10
@@ -75,10 +75,13 @@
|
||||
sudo amfree --path [PATH_TO_VPHONE_DIR]
|
||||
```
|
||||
|
||||
在本仓库中,可以运行 `make amfidont_allow_vphone` 一次性配置
|
||||
`amfidont` 所需的编码路径与 CDHash 允许项。
|
||||
|
||||
**安装依赖:**
|
||||
|
||||
```bash
|
||||
brew install aria2 ideviceinstaller wget gnu-tar openssl@3 ldid-procursus sshpass keystone autoconf automake pkg-config libtool cmake
|
||||
brew install aria2 wget gnu-tar openssl@3 ldid-procursus sshpass keystone libusb ipsw
|
||||
```
|
||||
|
||||
`scripts/fw_prepare.sh` 会优先使用 `aria2c` 进行更快的多连接下载,必要时再回退到 `curl` 或 `wget`。
|
||||
@@ -101,7 +104,7 @@ make setup_machine # 完全自动化完成"首次启动"流程(包
|
||||
## 手动设置
|
||||
|
||||
```bash
|
||||
make setup_tools # 安装 brew 依赖(含 aria2c)、从 submodule 源码构建 trustcache + insert_dylib + libimobiledevice、创建 Python 虚拟环境
|
||||
make setup_tools # 安装 brew 依赖,构建 trustcache + insert_dylib,创建 Python 虚拟环境(含 pymobiledevice3/aria2c)
|
||||
make build # 构建并签名 vphone-cli
|
||||
make vm_new # 创建 VM 目录及清单文件(config.plist)
|
||||
# 选项:CPU=8 MEMORY=8192 DISK_SIZE=64
|
||||
@@ -137,7 +140,7 @@ make boot_dfu # 以 DFU 模式启动 VM(保持运行)
|
||||
```bash
|
||||
# 终端 2
|
||||
make restore_get_shsh # 获取 SHSH blob
|
||||
make restore # 通过 idevicerestore 刷写固件
|
||||
make restore # 通过 pymobiledevice3 restore 后端刷写固件
|
||||
```
|
||||
|
||||
## 安装自定义固件
|
||||
@@ -155,11 +158,11 @@ sudo make ramdisk_build # 构建签名的 SSH ramdisk
|
||||
make ramdisk_send # 发送到设备
|
||||
```
|
||||
|
||||
当 ramdisk 运行后(输出中应显示 `Running server`),打开**第三个终端**运行 iproxy 隧道,然后在终端 2 安装 CFW:
|
||||
当 ramdisk 运行后(输出中应显示 `Running server`),打开**第三个终端**运行 usbmux 隧道,然后在终端 2 安装 CFW:
|
||||
|
||||
```bash
|
||||
# 终端 3 —— 保持运行
|
||||
iproxy 2222 22
|
||||
python3 -m pymobiledevice3 usbmux forward 2222 22
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -202,13 +205,13 @@ shutdown -h now
|
||||
make boot
|
||||
```
|
||||
|
||||
在另一个终端中启动 iproxy 隧道:
|
||||
在另一个终端中启动 usbmux 转发隧道:
|
||||
|
||||
```bash
|
||||
iproxy 2222 22222 # SSH(dropbear)
|
||||
iproxy 2222 22 # SSH(越狱版:在 Sileo 中安装 openssh-server 后)
|
||||
iproxy 5901 5901 # VNC
|
||||
iproxy 5910 5910 # RPC
|
||||
python3 -m pymobiledevice3 usbmux forward 2222 22222 # SSH(dropbear)
|
||||
python3 -m pymobiledevice3 usbmux forward 2222 22 # SSH(越狱版:在 Sileo 中安装 openssh-server 后)
|
||||
python3 -m pymobiledevice3 usbmux forward 5901 5901 # VNC
|
||||
python3 -m pymobiledevice3 usbmux forward 5910 5910 # RPC
|
||||
```
|
||||
|
||||
连接方式:
|
||||
@@ -249,6 +252,11 @@ AMFI/调试限制未正确绕过。选择以下任一方式:
|
||||
|
||||
- **方式 2(仅禁用调试限制):**
|
||||
在恢复模式中使用 `csrutil enable --without debug`(不完全禁用 SIP),然后安装/加载 [`amfidont`](https://github.com/zqxwce/amfidont) 或 [`amfree`](https://github.com/retX0/amfree),保持 AMFI 其他功能不变。
|
||||
在本仓库中,也可通过 `make amfidont_allow_vphone` 自动写入 `amfidont` 所需的编码路径与 CDHash 允许配置。
|
||||
|
||||
**问:`make boot` / `make boot_dfu` 启动后报错 `VZErrorDomain Code=2 "Virtualization is not available on this hardware."`。**
|
||||
|
||||
这是因为宿主机本身运行在 Apple 虚拟机中,无法再进行嵌套 Virtualization.framework 来启动 guest。请在非嵌套的 macOS 15+ 主机上运行。可用 `make boot_host_preflight` 检查,若显示 `Model Name: Apple Virtual Machine 1` 和 `kern.hv_vmm_present=1` 即为该情况。当前版本会在此类宿主机上通过 `boot_binary_check` 在启动前快速失败。
|
||||
|
||||
**问:系统应用(App Store、信息等)无法下载或安装。**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user