From 0afe0bc7a18228ad2fcef7f404b2c0bcc20419a3 Mon Sep 17 00:00:00 2001 From: LukeZGD Date: Tue, 31 May 2022 15:43:24 +0800 Subject: [PATCH] Workaround when latest bb is not signed should be helpful especially for iPad2,3 users --- resources/blobs.sh | 17 +++++++++++------ resources/downgrade.sh | 8 ++++++-- resources/ipsw.sh | 2 +- restore.sh | 1 + 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/resources/blobs.sh b/resources/blobs.sh index cebb369..53f15a1 100755 --- a/resources/blobs.sh +++ b/resources/blobs.sh @@ -8,7 +8,7 @@ SaveOTABlobs() { local SHSHLatest local SHSHExisting - if [[ $DeviceProc != 7 && $Baseband != 0 ]]; then + if [[ $DeviceProc != 7 && $Baseband != 0 && $platform != "win" ]]; then if [[ ! -e saved/$ProductType/BuildManifest.plist ]]; then Log "Downloading BuildManifest of iOS $LatestVer..." $partialzip $BasebandURL BuildManifest.plist BuildManifest.plist @@ -21,12 +21,17 @@ SaveOTABlobs() { Log "Checking signing status of iOS $LatestVer..." SHSHChk=*_${ProductType}_${HWModel}ap_${LatestVer}*.shsh* $tsschecker -d $ProductType -i $LatestVer -e $UniqueChipID -m saved/$ProductType/BuildManifest.plist -s -B ${HWModel}ap - SHSHLatest=$(ls $SHSHChk) - if [[ ! -e $SHSHLatest ]]; then - Error "For some reason, the latest version for your device (iOS $LatestVer) is not signed. Cannot continue." + SHSHLatest=$(ls $SHSHChk 2>/dev/null) + if [[ -e $SHSHLatest ]]; then + Log "Latest version for $ProductType (iOS $LatestVer) is signed." + else + Log "For some reason, the latest version for your device (iOS $LatestVer) is not signed." + Log "Disabling baseband update for the custom IPSW." + BBUpdate=0 + [[ $Jailbreak != 1 ]] && IPSWCustom+="N" + IPSWCustom+="B" fi - Log "Latest version for $ProductType (iOS $LatestVer) is signed." - rm $SHSHLatest + rm $SHSHLatest 2>/dev/null fi Log "Saving iOS $OSVer blobs with tsschecker..." diff --git a/resources/downgrade.sh b/resources/downgrade.sh index 54145ce..ff53f70 100755 --- a/resources/downgrade.sh +++ b/resources/downgrade.sh @@ -108,11 +108,15 @@ DowngradeOther() { } DowngradeOTA() { - [[ $DeviceProc != 7 ]] && JailbreakOption + if [[ $DeviceProc != 7 ]]; then + JailbreakOption + fi SaveOTABlobs IPSWFindVerify kDFU - [[ $Jailbreak == 1 ]] && IPSW32 + if [[ $Jailbreak == 1 || $BBUpdate == 0 ]]; then + IPSW32 + fi IPSWSetExtract FutureRestore } diff --git a/resources/ipsw.sh b/resources/ipsw.sh index 23afb96..1a4779d 100755 --- a/resources/ipsw.sh +++ b/resources/ipsw.sh @@ -197,7 +197,7 @@ IPSW32() { fi if [[ $platform == "win" ]]; then WinBundles="windows/" - else + elif [[ $BBUpdate != 0 ]]; then ExtraArgs+="-bbupdate" fi diff --git a/restore.sh b/restore.sh index 34bdbd4..897adc7 100755 --- a/restore.sh +++ b/restore.sh @@ -176,6 +176,7 @@ Main() { fi fi + SaveOTABlobs IPSWFindVerify if [[ $DeviceProc == 4 ]]; then IPSWFindVerify 712