From 3bdfbfb34a57911123ca23e10353111dca0ef66c Mon Sep 17 00:00:00 2001 From: LukeeGD <26163116+LukeZGD@users.noreply.github.com> Date: Tue, 11 Feb 2025 22:55:49 +0800 Subject: [PATCH] Some changes in ipwndfu error handling should address issues like #671 --- restore.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/restore.sh b/restore.sh index 35ace69..e2e13d5 100755 --- a/restore.sh +++ b/restore.sh @@ -2174,6 +2174,13 @@ device_ipwndfu() { "rmsigchks" ) log "Running rmsigchks..." $p2_sudo "$python2" rmsigchks.py + tool_pwned=$? + if [[ $platform == "macos" ]]; then + print "* If you get the error \"No backend available,\" install libusb in Homebrew/MacPorts" + fi + if [[ $tool_pwned != 0 ]]; then + error "ipwndfu $1 failed. Please run the script again" + fi ;; "alloc8" ) @@ -2183,9 +2190,13 @@ device_ipwndfu() { fi log "Installing alloc8 to device" $p2_sudo "$python2" ipwndfu -x + tool_pwned=$? if [[ $platform == "macos" ]]; then print "* If you get the error \"No backend available,\" install libusb in Homebrew/MacPorts" fi + if [[ $tool_pwned != 0 ]]; then + error "ipwndfu $1 failed. Please run the script again" + fi ;; esac if [[ $device_sudoloop == 1 ]]; then