From 51c34b9b93e68931f664a8727e026618294a943d Mon Sep 17 00:00:00 2001 From: LukeeGD Date: Wed, 8 Apr 2020 20:01:21 +0800 Subject: [PATCH] Some small changes --- restore.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/restore.sh b/restore.sh index 2b670e1..8bb9809 100755 --- a/restore.sh +++ b/restore.sh @@ -43,13 +43,7 @@ function MainMenu { read -p "[Input] Device in DFU mode detected. Is the device in kDFU mode? (y/N) " kDFUManual if [[ $kDFUManual == y ]] || [[ $kDFUManual == Y ]]; then read -p "[Input] Enter ProductType (eg. iPad2,1): " ProductType - if [ $(which irecovery) ]; then - # Get ECID with irecovery (optional) - Log "Getting UniqueChipID (ECID) with irecovery..." - UniqueChipID=$(sudo irecovery -q | grep 'ECID:' | cut -c 7-) - else - read -p "[Input] Enter UniqueChipID (ECID): " UniqueChipID - fi + read -p "[Input] Enter UniqueChipID (ECID): " UniqueChipID BasebandDetect Log "Downgrading device $ProductType in kDFU mode..." Mode='Downgrade' @@ -256,9 +250,11 @@ function Downgrade { if [ $SHA1IPSW != $SHA1IPSWL ]; then Error "SHA1 of IPSW does not match. Please run the script again" fi - Log "Extracting iBSS from IPSW..." - mkdir -p saved/$ProductType 2>/dev/null - unzip -o -j "$IPSW.ipsw" Firmware/dfu/$iBSS.dfu -d saved/$ProductType + if [ ! $kDFUManual ]; then + Log "Extracting iBSS from IPSW..." + mkdir -p saved/$ProductType 2>/dev/null + unzip -o -j "$IPSW.ipsw" Firmware/dfu/$iBSS.dfu -d saved/$ProductType + fi fi [ ! $kDFUManual ] && kDFU