mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-12-24 23:31:48 +01:00
Delete saved baseband if verifying fails
This commit is contained in:
parent
53444cfa47
commit
55a493743b
10
restore.sh
10
restore.sh
@ -236,9 +236,9 @@ function Downgrade {
|
|||||||
mv tmp/$IPSW.ipsw .
|
mv tmp/$IPSW.ipsw .
|
||||||
fi
|
fi
|
||||||
Log "Verifying IPSW..."
|
Log "Verifying IPSW..."
|
||||||
SHA1IPSW=$(cat $Firmware/$BuildVer/sha1sum)
|
IPSWSHA1=$(cat $Firmware/$BuildVer/sha1sum)
|
||||||
SHA1IPSWL=$(sha1sum "$IPSW.ipsw" | awk '{print $1}')
|
IPSWSHA1L=$(sha1sum "$IPSW.ipsw" | awk '{print $1}')
|
||||||
[ $SHA1IPSW != $SHA1IPSWL ] && Error "SHA1 of IPSW does not match. Please run the script again"
|
[ $IPSWSHA1L != $IPSWSHA1 ] && Error "SHA1 of IPSW does not match. Please run the script again"
|
||||||
if [ ! $kDFUManual ]; then
|
if [ ! $kDFUManual ]; then
|
||||||
Log "Extracting iBSS from IPSW..."
|
Log "Extracting iBSS from IPSW..."
|
||||||
mkdir -p saved/$ProductType 2>/dev/null
|
mkdir -p saved/$ProductType 2>/dev/null
|
||||||
@ -270,7 +270,9 @@ function Downgrade {
|
|||||||
else
|
else
|
||||||
cp saved/$ProductType/*.bbfw saved/$ProductType/BuildManifest.plist .
|
cp saved/$ProductType/*.bbfw saved/$ProductType/BuildManifest.plist .
|
||||||
fi
|
fi
|
||||||
if [ ! -e *.bbfw ] && [ $(sha1sum $Baseband | awk '{print $1}') != $BasebandSHA1 ]; then
|
BasebandSHA1L=$(sha1sum $(ls *.bbfw) | awk '{print $1}')
|
||||||
|
if [ ! -e *.bbfw ] && [ $BasebandSHA1L != $BasebandSHA1 ]; then
|
||||||
|
rm saved/$ProductType/*.bbfw saved/$ProductType/BuildManifest.plist
|
||||||
echo "[Error] Downloading/verifying baseband failed!"
|
echo "[Error] Downloading/verifying baseband failed!"
|
||||||
echo "Your device is still in kDFU mode, you may run the script again"
|
echo "Your device is still in kDFU mode, you may run the script again"
|
||||||
echo "If you continue, futurerestore can attempt to download the baseband again"
|
echo "If you continue, futurerestore can attempt to download the baseband again"
|
||||||
|
Loading…
Reference in New Issue
Block a user