Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

setup: Default to non-interactive, add INTERACTIVE opt-in

zqxwce3e05c8982695
diff --git a/Makefile b/Makefile
index 899ed465..1cde1971 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ help:
@echo " DT identity properties, post-restore DT rewrite, opt-in build spoof)"
@echo " LESS=1 Build, keeping iOS security mitigations enabled."
@echo " SKIP_PROJECT_SETUP=1 Skip setup_tools/build"
- @echo " NON_INTERACTIVE=1 Auto-continue prompts + boot analysis"
+ @echo " INTERACTIVE=1 Prompt at first-boot stages (default: non-interactive)"
@echo " SUDO_PASSWORD=... Preload sudo credential for setup flow"
@echo " NO_BINPACK=1 Excludes the SSH, VNC, ... binaries from being installed (patchless-only, currently)"
@echo " NO_VPHONED=1 Excludes vphoned from being installed (patchless-only, currently)"
@@ -150,7 +150,7 @@ setup_machine:
exit 1; \
fi
SUDO_PASSWORD="$(SUDO_PASSWORD)" \
- NON_INTERACTIVE="$(NON_INTERACTIVE)" \
+ INTERACTIVE="$(INTERACTIVE)" \
NO_BINPACK="$(NO_BINPACK)" \
NO_VPHONED="$(NO_VPHONED)" \
SPOOF_BUILD="$(SPOOF_BUILD)" \
diff --git a/scripts/setup_machine.sh b/scripts/setup_machine.sh
index af06f99d..aa3e91dd 100755
--- a/scripts/setup_machine.sh
+++ b/scripts/setup_machine.sh
@@ -54,8 +54,8 @@ BOOT_PROMPT_FALLBACK_TIMEOUT="${BOOT_PROMPT_FALLBACK_TIMEOUT:-60}"
BOOT_BASH_PROMPT_REGEX="${BOOT_BASH_PROMPT_REGEX:-bash-[0-9]+(\.[0-9]+)+#|:/[^ ]* root#}"
BOOT_PANIC_REGEX="${BOOT_PANIC_REGEX:-(^|[^p])(panic|kernel panic|panic\\.apple\\.com|stackshot succeeded)}"
PMD3_BRIDGE="${PMD3_BRIDGE:-${PROJECT_ROOT}/scripts/pymobiledevice3_bridge.py}"
-NON_INTERACTIVE_RAW="${NON_INTERACTIVE:-0}"
-NON_INTERACTIVE=0
+INTERACTIVE_RAW="${INTERACTIVE:-0}"
+NON_INTERACTIVE=1
NO_BINPACK_RAW="${NO_BINPACK:-0}"
NO_BINPACK=0
NO_VPHONED_RAW="${NO_VPHONED:-0}"
@@ -987,7 +987,7 @@ Options:
--skip-project-setup Skip setup_tools/build stage.
Environment:
- NON_INTERACTIVE=1 Auto-continue first-boot prompts + run final boot analysis.
+ INTERACTIVE=1 Prompt at first-boot stages (default: non-interactive — auto-continue + boot analysis).
SUDO_PASSWORD=... Preload sudo credential via askpass.
NO_BINPACK=1 Excludes the SSH, VNC, ... binaries from being installed (patchless-only, currently)
NO_VPHONED=1 Excludes vphoned from being installed (patchless-only, currently)
@@ -1005,8 +1005,8 @@ EOF
main() {
parse_args "$@"
- if parse_bool "$NON_INTERACTIVE_RAW"; then
- NON_INTERACTIVE=1
+ if parse_bool "$INTERACTIVE_RAW"; then
+ NON_INTERACTIVE=0
fi
if parse_bool "$NO_BINPACK_RAW"; then
NO_BINPACK=1
@@ -1107,7 +1107,7 @@ main() {
if [[ "$NON_INTERACTIVE" -eq 0 ]]; then
read -r "?[*] press Enter to start VM, after the VM has finished booting, press Enter again to finish last stage"
else
- echo "[*] NON_INTERACTIVE=1: auto-starting first boot"
+ echo "[*] non-interactive (default): auto-starting first boot"
fi
start_first_boot