From 45594ec592491f4256d5404d9fcf49d432c9afdd Mon Sep 17 00:00:00 2001 From: LukeeGD Date: Thu, 22 Oct 2020 13:16:51 +0800 Subject: [PATCH] Give user option for iPhone5,1 baseband --- restore.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/restore.sh b/restore.sh index ccd8390..d578478 100755 --- a/restore.sh +++ b/restore.sh @@ -224,7 +224,21 @@ function Action { elif [[ $A7Device == 1 ]] && [[ $pwnDFUDevice != 0 ]]; then [[ $DFUDevice == 1 ]] && CheckM8 || Recovery fi - + + if [[ $Mode == 'Downgrade' ]] && [[ $ProductType == iPhone5,1 ]] && [[ $Jailbreak != 1 ]]; then + Echo "By default, iOS-OTA-Downgrader now flashes the iOS 8.4.1 baseband to iPhone5,1 by default" + Echo "Flashing the latest baseband is still available as an option but beware of problems it may cause" + Echo "There are potential network issues that with the latest baseband when used on iOS 8.4.1" + read -p "$(Input 'Flash the latest baseband? (y/N) (press ENTER when unsure): ')" Baseband5 + if [[ $Baseband5 == y ]] || [[ $Baseband5 == Y ]]; then + Baseband5=0 + else + BasebandURL=$(cat $Firmware/12H321/url) + Baseband=Mav5-8.02.00.Release.bbfw + BasebandSHA1=db71823841ffab5bb41341576e7adaaeceddef1c + fi + fi + [[ $Mode == 'Downgrade' ]] && Downgrade [[ $Mode == 'SaveOTABlobs' ]] && SaveOTABlobs [[ $Mode == 'kDFU' ]] && kDFU @@ -522,9 +536,9 @@ function Downgrade { else if [[ $A7Device == 1 ]]; then cp $IPSW/Firmware/$Baseband . - elif [ $ProductType == iPhone5,1 ]; then + elif [ $ProductType == iPhone5,1 ] && [[ $Baseband5 != 0 ]]; then unzip -o -j $IPSW.ipsw Firmware/$Baseband -d . - unzip -o -j $IPSW.ipsw BuildManifest.plist -d . + cp $BuildManifest BuildManifest.plist elif [ ! -e saved/$ProductType/*.bbfw ]; then Log "Downloading baseband..." $partialzip $BasebandURL Firmware/$Baseband $Baseband @@ -710,11 +724,8 @@ function BasebandDetect { elif [ $ProductType == iPhone4,1 ]; then Baseband=Trek-6.7.00.Release.bbfw BasebandSHA1=22a35425a3cdf8fa1458b5116cfb199448eecf49 - elif [ $ProductType == iPhone5,1 ]; then - BasebandURL=$(cat $Firmware/12H321/url) - Baseband=Mav5-8.02.00.Release.bbfw - BasebandSHA1=db71823841ffab5bb41341576e7adaaeceddef1c - elif [ $ProductType == iPad3,5 ] || [ $ProductType == iPad3,6 ] || [ $ProductType == iPhone5,2 ]; then + elif [ $ProductType == iPad3,5 ] || [ $ProductType == iPad3,6 ] || + [ $ProductType == iPhone5,1 ] || [ $ProductType == iPhone5,2 ]; then BasebandURL=$(cat $Firmware/14G61/url) # iOS 10.3.4 Baseband=Mav5-11.80.00.Release.bbfw BasebandSHA1=8951cf09f16029c5c0533e951eb4c06609d0ba7f