mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-23 16:39:17 +01:00
Things are working!
This commit is contained in:
parent
abf6c0dc16
commit
60660bec6d
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,5 +2,6 @@
|
|||||||
*.shsh2
|
*.shsh2
|
||||||
iP*/
|
iP*/
|
||||||
tmp/
|
tmp/
|
||||||
tools/
|
|
||||||
BuildManifest.plist
|
BuildManifest.plist
|
||||||
|
tools/futurerestore*
|
||||||
|
tools/tsschecker*
|
||||||
|
33
README.md
33
README.md
@ -1,4 +1,33 @@
|
|||||||
# 841-OTA-Downgrader
|
# 841-OTA-Downgrader
|
||||||
Downgrade almost any 32-bit device to iOS 8.4.1
|
Script that can be used to downgrade almost any 32-bit device to iOS 8.4.1
|
||||||
|
|
||||||
|
### Tools used by this script:
|
||||||
|
- cURL
|
||||||
|
- partialZipBrowser
|
||||||
|
- tsschecker
|
||||||
|
- bsdiff (bspatch)
|
||||||
|
- kloader
|
||||||
|
- futurerestore
|
||||||
|
|
||||||
|
### Tested on:
|
||||||
|
- iPad3,3
|
||||||
|
|
||||||
|
### Supported devices:
|
||||||
|
- iPad2,1
|
||||||
|
- iPad2,2
|
||||||
|
- iPad2,3
|
||||||
|
- iPad2,4
|
||||||
|
- iPad2,5
|
||||||
|
- iPad2,6
|
||||||
|
- iPad2,7
|
||||||
|
- iPad3,1
|
||||||
|
- iPad3,2
|
||||||
|
- iPad3,3
|
||||||
|
- iPad3,4
|
||||||
|
- iPad3,5
|
||||||
|
- iPad3,6
|
||||||
|
- iPod5,1
|
||||||
|
- iPhone4,1
|
||||||
|
- iPhone5,1
|
||||||
|
- iPhone5,2
|
||||||
|
|
||||||
### WIP
|
|
||||||
|
59
restore.sh
59
restore.sh
@ -53,10 +53,7 @@ key_n41=baf05fe0282f78c18c2e3842be4f9021919d586b55594281f5b5abd0f6e61495
|
|||||||
iv_n42=fdad2b7a35384fa2ffc7221213ca1082
|
iv_n42=fdad2b7a35384fa2ffc7221213ca1082
|
||||||
key_n42=74cd68729b800a20b1f8e8a3cb5517024a09f074eaa05b099db530fb5783275e
|
key_n42=74cd68729b800a20b1f8e8a3cb5517024a09f074eaa05b099db530fb5783275e
|
||||||
|
|
||||||
rm -rf iP*/
|
rm -rf iP*/ tmp/ $(ls *.shsh2) BuildManifest.plist
|
||||||
rm -rf tmp/
|
|
||||||
rm -rf $(ls *.shsh2)
|
|
||||||
rm -rf BuildManifest.plist
|
|
||||||
|
|
||||||
clear
|
clear
|
||||||
echo "******* 841-OTA-Downgrader *******"
|
echo "******* 841-OTA-Downgrader *******"
|
||||||
@ -93,35 +90,72 @@ then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Downloading tsschecker..."
|
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
curl -L -# "https://github.com/tihmstar/tsschecker/releases/download/v212/tsschecker_v212_mac_win_linux.zip" > "tmp/tsschecker.zip"
|
|
||||||
|
if [ ! -e tools/tsschecker_$platform ]
|
||||||
|
then
|
||||||
|
echo "Downloading tsschecker..."
|
||||||
|
curl -L -# "https://github.com/tihmstar/tsschecker/releases/download/v212/tsschecker_v212_mac_win_linux.zip" -o "tmp/tsschecker.zip"
|
||||||
echo "Extracting tsschecker..."
|
echo "Extracting tsschecker..."
|
||||||
unzip -j tmp/tsschecker.zip tsschecker_$platform -d tools/
|
unzip -j tmp/tsschecker.zip tsschecker_$platform -d tools/
|
||||||
chmod +x tools/tsschecker_$platform
|
chmod +x tools/tsschecker_$platform
|
||||||
echo
|
echo
|
||||||
|
fi
|
||||||
|
if [ ! -e tools/tsschecker_$platform ]
|
||||||
|
then
|
||||||
|
echo "Download/extract tsschecker failed. Please run the script again"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e tools/futurerestore_$platform ]
|
||||||
|
then
|
||||||
echo "Downloading futurerestore..."
|
echo "Downloading futurerestore..."
|
||||||
curl -L -# "http://api.tihmstar.net/builds/futurerestore/futurerestore-latest.zip" > "tmp/futurerestore.zip"
|
curl -L -# "http://api.tihmstar.net/builds/futurerestore/futurerestore-latest.zip" -o "tmp/futurerestore.zip"
|
||||||
echo "Extracting futurerestore..."
|
echo "Extracting futurerestore..."
|
||||||
unzip -j tmp/futurerestore.zip futurerestore_$platform -d tools/
|
unzip -j tmp/futurerestore.zip futurerestore_$platform -d tools/
|
||||||
chmod +x tools/futurerestore_$platform
|
chmod +x tools/futurerestore_$platform
|
||||||
echo
|
echo
|
||||||
|
fi
|
||||||
|
if [ ! -e tools/futurerestore_$platform ]
|
||||||
|
then
|
||||||
|
echo "Download/extract futurerestore failed. Please run the script again"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Downloading ota.json..."
|
echo "Downloading ota.json..."
|
||||||
curl -L -# "https://api.ipsw.me/v2.1/ota.json/condensed" > "tmp/ota.json"
|
curl -L -# "https://api.ipsw.me/v2.1/ota.json/condensed" -o "tmp/ota.json"
|
||||||
echo "Copying ota.json to /tmp..."
|
echo 'Copying ota.json to /tmp or $TMPDIR...'
|
||||||
|
if [ $platform == macos ]
|
||||||
|
then
|
||||||
|
cp tmp/ota.json $TMPDIR
|
||||||
|
else
|
||||||
cp tmp/ota.json /tmp
|
cp tmp/ota.json /tmp
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
|
if [ ! -e tmp/ota.json ]
|
||||||
|
then
|
||||||
|
echo "Download ota.json failed. Please run the script again"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Downloading BuildManifest.plist..."
|
echo "Downloading BuildManifest.plist..."
|
||||||
OTAFirmware=$(curl "https://api.ipsw.me/v4/ota/download/$ProductType/12H321?prerequisite=12H143" -s -L -I -o /dev/null -w '%{url_effective}')
|
OTAFirmware=$(curl "https://api.ipsw.me/v4/ota/download/$ProductType/12H321?prerequisite=12H143" -s -L -I -o /dev/null -w '%{url_effective}')
|
||||||
pzb -g AssetData/boot/BuildManifest.plist $OTAFirmware
|
pzb -g AssetData/boot/BuildManifest.plist $OTAFirmware
|
||||||
echo
|
echo
|
||||||
|
if [ ! -e BuildManifest.plist ]
|
||||||
|
then
|
||||||
|
echo "Download BuildManifest.plist failed. Please run the script again"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Saving 8.4.1 blobs with tsschecker..."
|
echo "Saving 8.4.1 blobs with tsschecker..."
|
||||||
env "LD_PRELOAD=libcurl.so.3" tools/tsschecker_$platform -d $ProductType -i 8.4.1 -o -s -e $UniqueChipID -m BuildManifest.plist
|
env "LD_PRELOAD=libcurl.so.3" tools/tsschecker_$platform -d $ProductType -i 8.4.1 -o -s -e $UniqueChipID -m BuildManifest.plist
|
||||||
echo
|
echo
|
||||||
|
if [ ! -e $(ls *.shsh2) ]
|
||||||
|
then
|
||||||
|
echo "Saving 8.4.1 blobs failed. Please run the script again"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Extracting 8.4.1 IPSW..."
|
echo "Extracting 8.4.1 IPSW..."
|
||||||
unzip -q ${IPSW}.ipsw -d $IPSW/
|
unzip -q ${IPSW}.ipsw -d $IPSW/
|
||||||
@ -133,16 +167,17 @@ key=key_$HardwareModelLower
|
|||||||
echo "IV = ${!iv}"
|
echo "IV = ${!iv}"
|
||||||
echo "Key = ${!key}"
|
echo "Key = ${!key}"
|
||||||
tools/xpwntool_$platform $IPSW/Firmware/dfu/$iBSS.dfu tmp/iBSS.dec -k ${!key} -iv ${!iv} -decrypt
|
tools/xpwntool_$platform $IPSW/Firmware/dfu/$iBSS.dfu tmp/iBSS.dec -k ${!key} -iv ${!iv} -decrypt
|
||||||
|
dd bs=64 skip=1 if=tmp/iBSS.dec of=tmp/iBSS.dec2
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "Patching iBSS..."
|
echo "Patching iBSS..."
|
||||||
bspatch tmp/iBSS.dec tmp/pwnediBSS patches/$iBSS.patch
|
bspatch tmp/iBSS.dec2 tmp/pwnediBSS patches/$iBSS.patch
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [ $(echo $version | cut -c 1) == 1 ]
|
if [[ $(echo $ProductVersion | cut -c 1) == 1 ]]
|
||||||
then
|
then
|
||||||
kloader="kloader_hgsp"
|
kloader="kloader_hgsp"
|
||||||
elif [ $(echo $version | cut -c 1) == 5 ]
|
elif [[ $(echo $ProductVersion | cut -c 1) == 5 ]]
|
||||||
then
|
then
|
||||||
kloader="kloader5"
|
kloader="kloader5"
|
||||||
else
|
else
|
||||||
|
BIN
tools/kloader
Executable file
BIN
tools/kloader
Executable file
Binary file not shown.
BIN
tools/kloader5
Executable file
BIN
tools/kloader5
Executable file
Binary file not shown.
BIN
tools/kloader_hgsp
Executable file
BIN
tools/kloader_hgsp
Executable file
Binary file not shown.
BIN
tools/xpwntool_linux
Executable file
BIN
tools/xpwntool_linux
Executable file
Binary file not shown.
BIN
tools/xpwntool_macos
Executable file
BIN
tools/xpwntool_macos
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user