From d03b9230175a9046ca395fadf81c703109bef8e6 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Sun, 29 Jan 2023 21:50:17 +0800 Subject: [PATCH] Do not show PwnDFU Tool Option on ASi Macs ASi Macs work with ipwnder only. Avoids issues like #252 --- restore.sh | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/restore.sh b/restore.sh index 4c3712f..75613fa 100755 --- a/restore.sh +++ b/restore.sh @@ -817,23 +817,22 @@ device_enter_mode() { device_ipwndfu pwn elif [[ $device_proc == 7 ]]; then # A7 uses gaster or ipwnder - opt="$gaster pwn" - input "PwnDFU Tool Option" - print "* Select tool to be used for entering pwned DFU mode." - print "* This option is set to ipwnder by default (1)." - input "Select your option:" - select opt2 in "ipwnder" "gaster"; do - case $opt2 in - "gaster" ) break;; - * ) - opt="$ipwnder" - if [[ $platform != "macos" ]]; then - opt+=" -p" - fi - break - ;; - esac - done + opt="$ipwnder" + if [[ $platform != "macos" ]]; then + opt+=" -p" + fi + if [[ $platform != "macos" ]] || [[ $platform == "macos" && $(uname -m) == "x86_64" ]]; then + input "PwnDFU Tool Option" + print "* Select tool to be used for entering pwned DFU mode." + print "* This option is set to ipwnder by default (1)." + input "Select your option:" + select opt2 in "ipwnder" "gaster"; do + case $opt2 in + "gaster" ) opt="$gaster pwn"; break;; + * ) break;; + esac + done + fi log "Placing device to pwnDFU mode using: $opt" $opt tool_pwned=$?