mirror of
https://github.com/Lakr233/vphone-cli.git
synced 2026-09-02 02:34:29 +00:00
- pymobiledevice3_bridge.py: colorized restore logs (coloredlogs.install, mirroring pmd3's own CLI) gated by a -v count - cfw_install*.sh / fw_prepare.sh honor VPHONE_PYTHON/IPSW_DIR/VPHONE_SEAL_DIR and forward SPOOF_BUILD / FORCE_DSC_MAXSLIDE from the environment - patch_camera_userland.sh / patch_hv_vmm_userland.sh adjustments Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y4VDqWf5pVakcFLqB23CKe
61 lines
1.6 KiB
Bash
Executable File
61 lines
1.6 KiB
Bash
Executable File
#!/bin/zsh
|
|
# patch_camera_userland.sh — Apply the Camera.app accessibility DSC patches.
|
|
#
|
|
# Mirrors patch_hv_vmm_userland.sh's shape so the EXP install pipeline can
|
|
# call into both via a single entry-point style. The actual work happens
|
|
# in scripts/patchers/cfw_patch_camera_dsc.py::apply_all_camera_patches,
|
|
# invoked through cfw.py's `patch-camera-dsc` subcommand.
|
|
#
|
|
# Usage:
|
|
# patch_camera_userland.sh dsc <chunks_dir> <dsc_header>
|
|
#
|
|
# <chunks_dir> is the directory containing dyld_shared_cache_arm64e[.NN]
|
|
# files (the mounted SystemOS Cryptex's System/Library/Caches/com.apple.dyld).
|
|
# <dsc_header> is the dyld_shared_cache_arm64e file itself (sans suffix),
|
|
# used by `ipsw dyld symaddr` for per-build symbol resolution.
|
|
#
|
|
# Used by: cfw_install_exp.sh
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="${0:a:h}"
|
|
|
|
[[ -n "${_VPHONE_PATH:-}" ]] && export PATH="$_VPHONE_PATH"
|
|
|
|
_resolve_python3() {
|
|
if [[ -n "${VPHONE_PYTHON:-}" ]]; then
|
|
echo "$VPHONE_PYTHON"
|
|
return
|
|
fi
|
|
local venv_py="${SCRIPT_DIR:h}/.venv/bin/python3"
|
|
if [[ -x "$venv_py" ]]; then
|
|
echo "$venv_py"
|
|
else
|
|
command -v python3 || true
|
|
fi
|
|
}
|
|
PYTHON3="$(_resolve_python3)"
|
|
|
|
usage() {
|
|
cat <<EOF >&2
|
|
Usage:
|
|
$0 dsc <chunks_dir> <dsc_header>
|
|
EOF
|
|
exit 2
|
|
}
|
|
|
|
(( $# >= 1 )) || usage
|
|
op="$1"; shift
|
|
|
|
case "$op" in
|
|
dsc)
|
|
(( $# >= 2 )) || usage
|
|
echo "[*] Patching camera consumers in DSC chunks under: $1"
|
|
echo "[*] (symbol resolution against: $2)"
|
|
"$PYTHON3" "$SCRIPT_DIR/patchers/cfw.py" patch-camera-dsc "$1" "$2"
|
|
;;
|
|
*)
|
|
usage
|
|
;;
|
|
esac
|