From c8c814b0a484f36f2e7f36486a5b235d5eb150e2 Mon Sep 17 00:00:00 2001 From: LukeeGD Date: Tue, 19 Nov 2019 19:56:44 +0800 Subject: [PATCH] Create restore.sh --- restore.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 restore.sh diff --git a/restore.sh b/restore.sh new file mode 100644 index 0000000..5577d6c --- /dev/null +++ b/restore.sh @@ -0,0 +1,34 @@ +#!/bin/bash +clear + +echo "******* 841-OTA-Downgrader *******" +echo " - by LukeZGD " +echo + +HardwareModel=$(ideviceinfo | grep 'HardwareModel' | cut -c 16-) +HardwareModelLower=$(echo $HardwareModel | tr '[:upper:]' '[:lower:]' | sed 's/.\{2\}$//') +ProductType=$(ideviceinfo | grep 'ProductType' | cut -c 14-) + +if [ ! $HardwareModel ] +then + echo "Please plug in the device before proceeding" + echo + exit +fi + +echo "HardwareModel = $HardwareModel" +echo "ProductType = $ProductType" +echo "HardwareModelLower = $HardwareModelLower" +echo + +IPSW="${HardwareModel}_8.4.1_12H321_Restore.ipsw" + +if [ -e $IPSW ] +then + echo "iOS 8.4.1 IPSW is missing! Please put the IPSW on the same directory of this script" + echo + exit +fi + +echo "Downloading kloader..." +wget -q "https://github.com/axi0mX/ios-kexec-utils/raw/master/kloader"