From b4fd3f4ae59dd6b3f2ab57e82c6aebde54b6b91a Mon Sep 17 00:00:00 2001 From: alexia Date: Sun, 5 Feb 2023 20:41:47 +0100 Subject: [PATCH] dfuhelper: check if device is already in DFU mode (#348) If the user runs it manually, or in some cases while running the script, the device may be already in DFU, so don't wait around in that case. --- palera1n.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/palera1n.sh b/palera1n.sh index 42a9c55..f506f70 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -268,6 +268,11 @@ _wait() { dfuhelper_first_try=true _dfuhelper() { + if [ "$(get_device_mode)" = "dfu" ]; then + echo "[*] Device is already in DFU" + return + fi + local step_one; deviceid=$( [ -z "$deviceid" ] && _info normal ProductType || echo $deviceid ) if [[ "$1" = 0x801* && "$deviceid" != *"iPad"* ]]; then