From bbdef97ea03bb4617d5f5963abdeddad91fdf309 Mon Sep 17 00:00:00 2001 From: LukeeGD <26163116+LukeZGD@users.noreply.github.com> Date: Sun, 13 Apr 2025 18:55:23 +0800 Subject: [PATCH] fix irecovery device check on ipwndfu send_ibss, part 2 --- restore.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/restore.sh b/restore.sh index a12d5b9..9d4fd70 100755 --- a/restore.sh +++ b/restore.sh @@ -2161,8 +2161,9 @@ device_ipwndfu() { print "* ipwndfu should have \"done!\" as output. If not, sending iBEC will fail." sleep 1 log "Checking for device" - device_pwnd="$($irecovery3 -q | grep "PWND" | cut -c 7-)" - if [[ -z $device_pwnd ]]; then + local irec="$($irecovery3 -q 2>&1)" + device_pwnd="$(echo "$irec" | grep "PWND" | cut -c 7-)" + if [[ -z $device_pwnd && $irec != "ERROR"* ]]; then log "Device should now be in pwned iBSS mode." else warn "Device may have failed to enter pwned iBSS mode. Sending iBEC will fail."