mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 10:24:16 +01:00
Tested other downgrade
- also fix saving shsh blobs getting deleted
This commit is contained in:
parent
5419adcf27
commit
222323414f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
*.ipsw
|
*.ipsw
|
||||||
*.json
|
*.json
|
||||||
|
*.shsh
|
||||||
*.shsh2
|
*.shsh2
|
||||||
iP*
|
iP*
|
||||||
tmp/
|
tmp/
|
||||||
|
19
restore.sh
19
restore.sh
@ -77,7 +77,7 @@ function BasebandDetect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Clean {
|
function Clean {
|
||||||
rm -r iP*/ tmp/ $(ls *.shsh2 2>/dev/null) 2>/dev/null
|
rm -r iP*/ tmp/ $(ls ${UniqueChipID}_${ProductType}_${DowngradeVersion}-*.shsh2 2>/dev/null) 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
function MainMenu {
|
function MainMenu {
|
||||||
@ -189,6 +189,7 @@ function SelectOther {
|
|||||||
key=key_$HardwareModelLower
|
key=key_$HardwareModelLower
|
||||||
NotOTA=1
|
NotOTA=1
|
||||||
read -p "[Input] Path to IPSW (drag IPSW to terminal window): " IPSW
|
read -p "[Input] Path to IPSW (drag IPSW to terminal window): " IPSW
|
||||||
|
IPSW="$(basename "$IPSW" .ipsw)"
|
||||||
read -p "[Input] Path to SHSH (drag SHSH to terminal window): " SHSH
|
read -p "[Input] Path to SHSH (drag SHSH to terminal window): " SHSH
|
||||||
Downgrade
|
Downgrade
|
||||||
}
|
}
|
||||||
@ -228,10 +229,12 @@ function SaveOTABlobs {
|
|||||||
env "LD_PRELOAD=libcurl.so.3" resources/tools/tsschecker_$platform -d $ProductType -i $DowngradeVersion -o -s -e $UniqueChipID -m $BuildManifest
|
env "LD_PRELOAD=libcurl.so.3" resources/tools/tsschecker_$platform -d $ProductType -i $DowngradeVersion -o -s -e $UniqueChipID -m $BuildManifest
|
||||||
echo
|
echo
|
||||||
SHSH=$(ls *.shsh2)
|
SHSH=$(ls *.shsh2)
|
||||||
if [ ! -e $SHSH ]; then
|
if [ ! -e "$SHSH" ]; then
|
||||||
echo "[Error] Saving $DowngradeVersion blobs failed. Please run the script again"
|
echo "[Error] Saving $DowngradeVersion blobs failed. Please run the script again"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
mkdir output 2>/dev/null
|
||||||
|
cp "$SHSH" output
|
||||||
}
|
}
|
||||||
|
|
||||||
function kDFU {
|
function kDFU {
|
||||||
@ -337,11 +340,11 @@ function Downgrade {
|
|||||||
if [ ! $NotOTA ]; then
|
if [ ! $NotOTA ]; then
|
||||||
SaveOTABlobs
|
SaveOTABlobs
|
||||||
IPSW="${ProductType}_${DowngradeVersion}_${DowngradeBuildVer}_Restore"
|
IPSW="${ProductType}_${DowngradeVersion}_${DowngradeBuildVer}_Restore"
|
||||||
if [ ! -e $IPSW.ipsw ]; then
|
if [ ! -e "$IPSW.ipsw" ]; then
|
||||||
echo "[Log] iOS $DowngradeVersion IPSW is missing, downloading IPSW..."
|
echo "[Log] iOS $DowngradeVersion IPSW is missing, downloading IPSW..."
|
||||||
curl -L https://api.ipsw.me/v4/ipsw/download/$ProductType/$DowngradeBuildVer -o $IPSW.ipsw
|
curl -L https://api.ipsw.me/v4/ipsw/download/$ProductType/$DowngradeBuildVer -o "$IPSW.ipsw"
|
||||||
fi
|
fi
|
||||||
unzip -j $IPSW.ipsw Firmware/dfu/$iBSS.dfu -d tmp/
|
unzip -j "$IPSW.ipsw" Firmware/dfu/$iBSS.dfu -d tmp/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! $kDFUManual ]; then
|
if [ ! $kDFUManual ]; then
|
||||||
@ -349,7 +352,7 @@ function Downgrade {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[Log] Extracting IPSW..."
|
echo "[Log] Extracting IPSW..."
|
||||||
unzip -q $IPSW.ipsw -d "$IPSW/"
|
unzip -q "$IPSW.ipsw" -d $IPSW/
|
||||||
|
|
||||||
echo "[Log] Preparing for futurerestore (starting local server)..."
|
echo "[Log] Preparing for futurerestore (starting local server)..."
|
||||||
cd resources
|
cd resources
|
||||||
@ -362,10 +365,10 @@ function Downgrade {
|
|||||||
|
|
||||||
while [[ $ScriptDone != 1 ]]; do
|
while [[ $ScriptDone != 1 ]]; do
|
||||||
if [ ! $NoBaseband ]; then
|
if [ ! $NoBaseband ]; then
|
||||||
sudo env "LD_PRELOAD=libcurl.so.3" resources/tools/futurerestore_$platform -t $SHSH --latest-baseband --use-pwndfu $IPSW.ipsw
|
sudo env "LD_PRELOAD=libcurl.so.3" resources/tools/futurerestore_$platform -t "$SHSH" --latest-baseband --use-pwndfu "$IPSW.ipsw"
|
||||||
else
|
else
|
||||||
echo "[Log] Device $ProductType has no baseband"
|
echo "[Log] Device $ProductType has no baseband"
|
||||||
sudo env "LD_PRELOAD=libcurl.so.3" resources/tools/futurerestore_$platform -t $SHSH --no-baseband --use-pwndfu $IPSW.ipsw
|
sudo env "LD_PRELOAD=libcurl.so.3" resources/tools/futurerestore_$platform -t "$SHSH" --no-baseband --use-pwndfu "$IPSW.ipsw"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user