From 7632a6c88b1dd7b60cc58e6220b49afd5e8346e2 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Wed, 21 Dec 2022 16:57:20 +0800 Subject: [PATCH] Add warning Windows baseband issues, other stuff - add A5 send iBSS error check - Use uname instead of cmd /c ver for platformver on Windows --- resources/depends.sh | 4 ++-- resources/device.sh | 7 +++++++ resources/downgrade.sh | 21 +++++---------------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/resources/depends.sh b/resources/depends.sh index 4ea686e..c3de970 100755 --- a/resources/depends.sh +++ b/resources/depends.sh @@ -53,7 +53,7 @@ SetToolPaths() { elif [[ $OSTYPE == "msys" ]]; then platform="win" - platformver="$(cmd /c ver)" + platformver="$(uname)" MPath+="$platform" bspatch="./resources/tools/bspatch_win" futurerestore="./resources/tools/futurerestore_win" @@ -109,7 +109,7 @@ SetToolPaths() { Echo "* Please use it on Linux or macOS instead." Echo "* You may still continue, but you might encounter problems with restoring the device." Echo "* You have been warned." - sleep 10 + sleep 5 Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel)" read -s fi diff --git a/resources/device.sh b/resources/device.sh index e3d4906..505518e 100755 --- a/resources/device.sh +++ b/resources/device.sh @@ -383,6 +383,7 @@ SendPwnediBSSA5() { echo "${Color_Y}* For usage of kDFU/pwnDFU, read the \"Troubleshooting\" wiki page in GitHub ${Color_N}" ExitWin 1 fi + echo Input "No iBSS Option" Echo "* If you already have sent pwned iBSS manually, select Y. If not, select N." Echo "* This option is disabled by default (N)." @@ -412,6 +413,12 @@ SendPwnediBSS() { cd resources/ipwndfu Log "Sending iBSS..." $ipwndfu -l ../../tmp/pwnediBSS + if [[ $? != 0 ]]; then + echo -e "\n${Color_R}[Error] Failed to send iBSS. Your device has likely failed to enter PWNED DFU mode. ${Color_N}" + echo "${Color_Y}* Please exit DFU and (re-)enter PWNED DFU mode before retrying. ${Color_N}" + Echo "* Exit DFU mode by holding the TOP and HOME buttons for 15 seconds." + ExitWin 1 + fi cd ../.. } diff --git a/resources/downgrade.sh b/resources/downgrade.sh index 6b08eaf..92c8d05 100755 --- a/resources/downgrade.sh +++ b/resources/downgrade.sh @@ -149,22 +149,11 @@ iDeviceRestore() { FRBaseband cp saved/baseband/$Baseband tmp/bbfw.tmp cp $BuildManifest tmp/ - BasebandSHA1L=$($sha1sum tmp/bbfw.tmp | awk '{print $1}') - if [[ $BasebandSHA1L != $BasebandSHA1 ]]; then - rm -f saved/baseband/$Baseband saved/$ProductType/BuildManifest.plist - Error "Downloading/verifying baseband failed. Please run the script again" - fi - if [[ ! -e tmp/bbfw.tmp || ! -e tmp/BuildManifest.plist ]]; then - Log "Downloading/verifying baseband failed." - Echo "* You may still attempt to continue, but $OSVer baseband will be flashed instead of latest." - Echo "* This may cause ACTIVATION ERRORS after the restore, it is recommended to not continue." - Echo "* I highly suggest to do the restore in Linux/macOS instead to avoid issues." - Input "Press Enter/Return to continue (or press Ctrl+C to cancel)" - read -s - ExtraArgs="-e -w" - idevicerestore="./resources/tools/idevicerestore_$platform" - re= - fi + Log "WARNING - The restore is most likely to fail on updating baseband!!" + Echo "* This may or may not be fixed anytime soon." + Echo "* I highly suggest to do the restore in Linux/macOS instead to avoid issues." + Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel)" + read -s fi Log "Running idevicere${re}store with command: $idevicerestore $ExtraArgs \"$IPSWRestore.ipsw\"" $idevicerestore $ExtraArgs "$IPSWRestore.ipsw"