From 5dd0d78d84d44c406bbda0b11f1019de4f953166 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Sun, 4 Sep 2022 10:08:03 +0800 Subject: [PATCH] Update and add retry option - the retry option will only be prompted once - also do not reset with gaster --- README.md | 2 +- resources/device.sh | 1 - resources/downgrade.sh | 18 ++++++++++++++++-- restore.sh | 1 + 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 39deecb..4d484ee 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ - cURL - bspatch - python2 (ipwndfu, rmsigchks, SimpleHTTPServer), python3 (http.server) -- [powdersn0w](https://github.com/dora2-iOS/powdersn0w_pub) - dora2ios ([LukeZGD fork](https://github.com/LukeZGD/powdersn0w_pub)) +- [powdersn0w](https://github.com/dora2-iOS/powdersn0w_pub) - dora2ios; [LukeZGD fork](https://github.com/LukeZGD/powdersn0w_pub) - [ch3rryflower](https://web.archive.org/web/20200708040313/https://github.com/dora2-iOS/ch3rryflower) - dora2ios (used for iOS 4.3.x only) - [ipwndfu](https://github.com/LukeZGD/ipwndfu) - LukeZGD fork - [iPwnder32](https://github.com/dora2-iOS/iPwnder32) - dora2ios diff --git a/resources/device.sh b/resources/device.sh index 0b1deb0..cad1689 100755 --- a/resources/device.sh +++ b/resources/device.sh @@ -265,7 +265,6 @@ EnterPwnDFU() { elif [[ $pwnDFUTool == "$gaster" ]]; then $pwnDFUTool pwn pwnDFUDevice=$? - $pwnDFUTool reset else $pwnDFUTool -p pwnDFUDevice=$? diff --git a/resources/downgrade.sh b/resources/downgrade.sh index cbb480b..ceea329 100755 --- a/resources/downgrade.sh +++ b/resources/downgrade.sh @@ -75,7 +75,6 @@ FutureRestore() { Echo "* Your problem may have already been addressed within the wiki page." Echo "* If opening an issue in GitHub, please provide a FULL log. Otherwise, your issue may be dismissed." echo - Log "Downgrade script done!" } DowngradeOther() { @@ -164,7 +163,6 @@ iDeviceRestore() { Echo "* Your problem may have already been addressed within the wiki page." Echo "* If opening an issue in GitHub, please provide a FULL log. Otherwise, your issue may be dismissed." echo - Log "Downgrade script done!" } IPSWCustomA7() { @@ -196,6 +194,19 @@ IPSWCustomA7() { fi } +RetryOption() { + Input "Retry Command Option" + Echo "* This gives users the option to retry the restore command." + Echo "* It can be useful in case that the restore failed early." + Echo "* If the restore failed with the device no longer in DFU, this will not work." + Echo "* This option is disabled by default (N)." + read -p "$(Input 'Enable this option? (y/N):')" Retry + if [[ $Retry != 'Y' && $Retry != 'y' ]]; then + return + fi + $1 +} + DowngradeOTA() { if [[ $DeviceProc != 7 ]]; then JailbreakOption @@ -210,6 +221,7 @@ DowngradeOTA() { fi IPSWSetExtract FutureRestore + RetryOption FutureRestore } DowngradeOTAWin() { @@ -235,6 +247,7 @@ DowngradeOTAWin() { IPSW32 IPSWSetExtract iDeviceRestore + RetryOption iDeviceRestore } Downgrade() { @@ -269,4 +282,5 @@ Downgrade4() { IPSW4 IPSWSetExtract iDeviceRestore + RetryOption iDeviceRestore } diff --git a/restore.sh b/restore.sh index 65ab158..8d805ad 100755 --- a/restore.sh +++ b/restore.sh @@ -293,6 +293,7 @@ Main() { fi Downgrade + Log "Downgrade script done!" ExitWin 0 }