From 492147eebcf061fd2dc4e8a5149445cd184c04a1 Mon Sep 17 00:00:00 2001 From: LukeZGD Date: Tue, 6 Jul 2021 11:35:19 +0800 Subject: [PATCH] Small change in pwnDFU check --- resources/device.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/device.sh b/resources/device.sh index 30062b7..604e312 100755 --- a/resources/device.sh +++ b/resources/device.sh @@ -166,10 +166,9 @@ CheckM8() { cd ../.. elif [[ $pwnDFUTool == "iPwnder32" ]]; then $ipwnder32 -p - pwnDFUDevice=$? fi - if [[ $pwnDFUDevice != 0 ]]; then + if [[ $pwnDFUDevice != 0 && $($irecovery -q | grep -c "PWND") != 1 ]]; then echo -e "\n${Color_R}[Error] Failed to enter pwnDFU mode. Please run the script again: ./restore.sh Downgrade ${Color_N}" echo "${Color_Y}* This step may fail a lot, especially on Linux, and unfortunately there is nothing I can do about the low success rates. ${Color_N}" echo "${Color_Y}* The only option is to make sure you are using an Intel or M1 device, and to try multiple times ${Color_N}"