mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-02-17 08:56:22 +01:00
Give option to continue
This commit is contained in:
parent
dd8a3449be
commit
8af72a66bd
23
restore.sh
23
restore.sh
@ -275,14 +275,14 @@ function CheckM8 {
|
|||||||
sudo python2 ipwndfu -p
|
sudo python2 ipwndfu -p
|
||||||
pwnDFUDevice=$(sudo lsusb -v -d 05ac:1227 2>/dev/null | grep -c 'checkm8')
|
pwnDFUDevice=$(sudo lsusb -v -d 05ac:1227 2>/dev/null | grep -c 'checkm8')
|
||||||
if [ $pwnDFUDevice == 1 ]; then
|
if [ $pwnDFUDevice == 1 ]; then
|
||||||
Log "Detected device in pwnDFU mode. Running rmsigchks.py..."
|
Log "Device in pwnDFU mode detected. Running rmsigchks.py..."
|
||||||
sudo python2 rmsigchks.py
|
sudo python2 rmsigchks.py
|
||||||
cd ../..
|
cd ../..
|
||||||
Log "Downgrading device $ProductType in pwnDFU mode..."
|
Log "Downgrading device $ProductType in pwnDFU mode..."
|
||||||
Mode='Downgrade'
|
Mode='Downgrade'
|
||||||
SelectVersion
|
SelectVersion
|
||||||
else
|
else
|
||||||
Error "Entering pwnDFU failed. Please run the script again" "./restore.sh Downgrade"
|
Error "Failed to detect device in pwnDFU mode. Please run the script again" "./restore.sh Downgrade"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -335,12 +335,23 @@ function Downgrade {
|
|||||||
cp $IPSW/Firmware/dfu/$iBEC.im4p .
|
cp $IPSW/Firmware/dfu/$iBEC.im4p .
|
||||||
cp $IPSW/Firmware/all_flash/$SEP .
|
cp $IPSW/Firmware/all_flash/$SEP .
|
||||||
fi
|
fi
|
||||||
Log "Entering PWNREC mode..."
|
Log "Entering pwnREC mode..."
|
||||||
$irecovery -f $iBSS.im4p
|
$irecovery -f $iBSS.im4p
|
||||||
$irecovery -f $iBEC.im4p
|
$irecovery -f $iBEC.im4p
|
||||||
sleep 5
|
sleep 5
|
||||||
RecoveryDevice=$(lsusb | grep -c '1281')
|
RecoveryDevice=$(lsusb | grep -c '1281')
|
||||||
[[ $RecoveryDevice != 1 ]] && Error "Failed to detect device in PWNREC mode. Please try again"
|
if [[ $RecoveryDevice != 1 ]]; then
|
||||||
|
echo "[Error] Failed to detect device in pwnREC mode."
|
||||||
|
echo "* If you device has backlight turned on, you may try re-plugging in your device and attempt to continue"
|
||||||
|
echo "* Press ENTER to continue (or press Ctrl+C to cancel)"
|
||||||
|
read
|
||||||
|
RecoveryDevice=$(lsusb | grep -c '1281')
|
||||||
|
if [[ $RecoveryDevice != 1 ]]; then
|
||||||
|
Log "Failed to detect device in pwnREC mode but continuing anyway."
|
||||||
|
else
|
||||||
|
Log "Device in pwnREC mode detected."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
SaveOTABlobs
|
SaveOTABlobs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -376,8 +387,8 @@ function Downgrade {
|
|||||||
echo "[Error] Downloading/verifying baseband failed."
|
echo "[Error] Downloading/verifying baseband failed."
|
||||||
echo "* Your device is still in kDFU mode and you may run the script again"
|
echo "* Your device is still in kDFU mode and you may run the script again"
|
||||||
echo "* You can also continue and futurerestore can attempt to download the baseband again"
|
echo "* You can also continue and futurerestore can attempt to download the baseband again"
|
||||||
echo "* Proceeding to futurerestore in 10 seconds (Press Ctrl+C to cancel)"
|
echo "* Press ENTER to continue (or press Ctrl+C to cancel)"
|
||||||
sleep 10
|
read
|
||||||
if [[ $A7Device == 1 ]]; then
|
if [[ $A7Device == 1 ]]; then
|
||||||
$futurerestore2 -t $SHSH -s $SEP -m $BuildManifest --latest-baseband $IPSW.ipsw
|
$futurerestore2 -t $SHSH -s $SEP -m $BuildManifest --latest-baseband $IPSW.ipsw
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user