Add warning Windows baseband issues, other stuff

- add A5 send iBSS error check
- Use uname instead of cmd /c ver for platformver on Windows
This commit is contained in:
LukeZGD 2022-12-21 16:57:20 +08:00
parent c385b3aaef
commit 7632a6c88b
3 changed files with 14 additions and 18 deletions

View File

@ -53,7 +53,7 @@ SetToolPaths() {
elif [[ $OSTYPE == "msys" ]]; then elif [[ $OSTYPE == "msys" ]]; then
platform="win" platform="win"
platformver="$(cmd /c ver)" platformver="$(uname)"
MPath+="$platform" MPath+="$platform"
bspatch="./resources/tools/bspatch_win" bspatch="./resources/tools/bspatch_win"
futurerestore="./resources/tools/futurerestore_win" futurerestore="./resources/tools/futurerestore_win"
@ -109,7 +109,7 @@ SetToolPaths() {
Echo "* Please use it on Linux or macOS instead." 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 may still continue, but you might encounter problems with restoring the device."
Echo "* You have been warned." Echo "* You have been warned."
sleep 10 sleep 5
Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel)" Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel)"
read -s read -s
fi fi

View File

@ -383,6 +383,7 @@ SendPwnediBSSA5() {
echo "${Color_Y}* For usage of kDFU/pwnDFU, read the \"Troubleshooting\" wiki page in GitHub ${Color_N}" echo "${Color_Y}* For usage of kDFU/pwnDFU, read the \"Troubleshooting\" wiki page in GitHub ${Color_N}"
ExitWin 1 ExitWin 1
fi fi
echo
Input "No iBSS Option" Input "No iBSS Option"
Echo "* If you already have sent pwned iBSS manually, select Y. If not, select N." Echo "* If you already have sent pwned iBSS manually, select Y. If not, select N."
Echo "* This option is disabled by default (N)." Echo "* This option is disabled by default (N)."
@ -412,6 +413,12 @@ SendPwnediBSS() {
cd resources/ipwndfu cd resources/ipwndfu
Log "Sending iBSS..." Log "Sending iBSS..."
$ipwndfu -l ../../tmp/pwnediBSS $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 ../.. cd ../..
} }

View File

@ -149,22 +149,11 @@ iDeviceRestore() {
FRBaseband FRBaseband
cp saved/baseband/$Baseband tmp/bbfw.tmp cp saved/baseband/$Baseband tmp/bbfw.tmp
cp $BuildManifest tmp/ cp $BuildManifest tmp/
BasebandSHA1L=$($sha1sum tmp/bbfw.tmp | awk '{print $1}') Log "WARNING - The restore is most likely to fail on updating baseband!!"
if [[ $BasebandSHA1L != $BasebandSHA1 ]]; then Echo "* This may or may not be fixed anytime soon."
rm -f saved/baseband/$Baseband saved/$ProductType/BuildManifest.plist Echo "* I highly suggest to do the restore in Linux/macOS instead to avoid issues."
Error "Downloading/verifying baseband failed. Please run the script again" Input "Press Enter/Return to continue anyway (or press Ctrl+C to cancel)"
fi read -s
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
fi fi
Log "Running idevicere${re}store with command: $idevicerestore $ExtraArgs \"$IPSWRestore.ipsw\"" Log "Running idevicere${re}store with command: $idevicerestore $ExtraArgs \"$IPSWRestore.ipsw\""
$idevicerestore $ExtraArgs "$IPSWRestore.ipsw" $idevicerestore $ExtraArgs "$IPSWRestore.ipsw"