From 559d8d15633c61d8239245dd0de19d9175e64621 Mon Sep 17 00:00:00 2001 From: LukeZGD Date: Tue, 8 Jun 2021 11:04:40 +0800 Subject: [PATCH] Update fix potential error for iPhone5,1 baseband --- resources/depends.sh | 4 ++-- resources/device.sh | 1 + resources/downgrade.sh | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/depends.sh b/resources/depends.sh index 3a99332..c4c4361 100755 --- a/resources/depends.sh +++ b/resources/depends.sh @@ -46,8 +46,8 @@ SetToolPaths() { } SaveExternal() { - ExternalURL="https://github.com/LukeZGD/$1.git" - External=$1 + local ExternalURL="https://github.com/LukeZGD/$1.git" + local External=$1 [[ $1 == "iOS-OTA-Downgrader-Keys" ]] && External="firmware" cd resources if [[ ! -d $External || ! -d $External/.git ]]; then diff --git a/resources/device.sh b/resources/device.sh index 5b50347..560c200 100755 --- a/resources/device.sh +++ b/resources/device.sh @@ -135,6 +135,7 @@ GetDeviceValues() { CheckM8() { local pwnDFUTool + local pwnDFUDevice [[ $platform == macos ]] && pwnDFUTool="iPwnder32" || pwnDFUTool="ipwndfu" Log "Entering pwnDFU mode with $pwnDFUTool..." diff --git a/resources/downgrade.sh b/resources/downgrade.sh index d3fb7c3..f446f52 100755 --- a/resources/downgrade.sh +++ b/resources/downgrade.sh @@ -17,11 +17,9 @@ iDeviceRestore() { FRBaseband() { local BasebandSHA1L - if [[ $DeviceProc == 7 ]]; then + if [[ $DeviceProc == 7 ]] || [[ $ProductType == "iPhone5,1" && $Baseband5 != 0 ]]; then mkdir -p saved/baseband 2>/dev/null cp -f $IPSWRestore/Firmware/$Baseband saved/baseband - elif [[ $ProductType == "iPhone5,1" && $Baseband5 != 0 ]]; then - unzip -o -j $IPSW.ipsw Firmware/$Baseband -d . elif [[ ! -e saved/baseband/$Baseband ]]; then Log "Downloading baseband..." $partialzip $BasebandURL Firmware/$Baseband $Baseband