mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-23 16:39:17 +01:00
Add restore tool selection, switch to m1stadev futurerestore, other fixes
- Restore selection is for 32-bit restores without jailbreak option - In case that futurerestore fails, users can select 2 (idevicerestore) and create custom IPSW without jailbreak - Switch to m1stadev fork of futurerestore (194), I tested it and works for 10.3.3 A7 restores, hopefully it works fine for others as well - Other fixes in the scripts
This commit is contained in:
parent
5e34ef5f94
commit
0a3d69fda3
@ -131,9 +131,8 @@
|
||||
- ipsw tool from [xpwn](https://github.com/LukeeGD/xpwn) (OdysseusOTA/2)
|
||||
- Python 2 (for ipwndfu, rmsigchks, SimpleHTTPServer)
|
||||
- [tsschecker](https://github.com/tihmstar/tsschecker)
|
||||
- [futurerestore 152](http://api.tihmstar.net/builds/futurerestore/futurerestore-latest.zip) (32-bit)
|
||||
- [futurerestore 251 (Linux)](https://github.com/LukeeGD/futurerestore) (A7)
|
||||
- [futurerestore 245 (macOS)](https://github.com/MatthewPierson/Vieux/blob/master/resources/bin/futurerestore) (A7)
|
||||
- [futurerestore](http://api.tihmstar.net/builds/futurerestore/futurerestore-latest.zip) used for 32-bit devices
|
||||
- [futurerestore](https://github.com/m1stadev/futurerestore) used for A7 devices
|
||||
- [kloader](https://www.youtube.com/watch?v=fh0tB6fp0Sc)
|
||||
- [kloader5 for iOS 5](https://www.pmbonneau.com/cydia/com.pmbonneau.kloader5_1.2_iphoneos-arm.deb)
|
||||
- [kloader_hgsp for iOS 10](https://twitter.com/nyan_satan/status/945203180522045440)
|
||||
|
@ -6,6 +6,7 @@ SetToolPaths() {
|
||||
platform="linux"
|
||||
platformver="$PRETTY_NAME"
|
||||
|
||||
bspatch="$(which bspatch)"
|
||||
futurerestore1="sudo LD_PRELOAD=./resources/lib/libcurl.so.3 LD_LIBRARY_PATH=./resources/lib ./resources/tools/futurerestore1_linux"
|
||||
futurerestore2="sudo LD_LIBRARY_PATH=./resources/lib ./resources/tools/futurerestore2_linux"
|
||||
idevicerestore="sudo LD_LIBRARY_PATH=./resources/lib ./resources/tools/idevicerestore_linux"
|
||||
@ -18,6 +19,7 @@ SetToolPaths() {
|
||||
platform="macos"
|
||||
platformver="${1:-$(sw_vers -productVersion)}"
|
||||
|
||||
bspatch="/usr/bin/bspatch"
|
||||
futurerestore1="./resources/tools/futurerestore1_macos"
|
||||
futurerestore2="./resources/tools/futurerestore2_macos"
|
||||
idevicerestore="./resources/tools/idevicerestore_macos"
|
||||
@ -27,7 +29,6 @@ SetToolPaths() {
|
||||
rmsigchks="$python rmsigchks.py"
|
||||
SimpleHTTPServer="$python -m SimpleHTTPServer 80"
|
||||
fi
|
||||
bspatch="$(which bspatch)"
|
||||
git="$(which git)"
|
||||
ideviceenterrecovery="./resources/libimobiledevice_$platform/ideviceenterrecovery"
|
||||
ideviceinfo="./resources/libimobiledevice_$platform/ideviceinfo"
|
||||
|
@ -62,6 +62,7 @@ FutureRestore() {
|
||||
}
|
||||
|
||||
Downgrade() {
|
||||
local IPSWCustomW
|
||||
local IPSWExtract
|
||||
local IPSWSHA1
|
||||
local IPSWSHA1L
|
||||
@ -76,9 +77,9 @@ Downgrade() {
|
||||
read -p "$(Input 'Path to SHSH (drag SHSH to terminal window):')" SHSH
|
||||
|
||||
elif [[ $Mode == "Downgrade" && $DeviceProc != 7 ]]; then
|
||||
read -p "$(Input 'Jailbreak the selected iOS version? (y/N):')" Jailbreak
|
||||
read -p "$(Input 'Jailbreak the selected iOS version? (Y/n):')" Jailbreak
|
||||
|
||||
if [[ $Jailbreak == 'Y' || $Jailbreak == 'y' ]]; then
|
||||
if [[ $Jailbreak != 'N' && $Jailbreak != 'n' ]]; then
|
||||
Jailbreak=1
|
||||
if [[ $ProductType == "iPad2,5" || $ProductType == "iPad2,6" ||
|
||||
$ProductType == "iPad2,7" || $ProductType == "iPod5,1" ]]; then
|
||||
@ -108,6 +109,19 @@ Downgrade() {
|
||||
|
||||
IPSW="${IPSWType}_${OSVer}_${BuildVer}_Restore"
|
||||
IPSWCustom="${IPSWType}_${OSVer}_${BuildVer}_Custom"
|
||||
if [[ $Jailbreak != 1 && $DeviceProc != 7 ]]; then
|
||||
Selection=("futurerestore" "idevicerestore")
|
||||
Echo "* Select 1 (futurerestore) if unsure"
|
||||
Echo "* Select 2 (idevicerestore) if you experience issues with futurerestore"
|
||||
Input "Select restore tool to use:"
|
||||
select opt in "${Selection[@]}"; do
|
||||
case $opt in
|
||||
"idevicerestore" ) IPSWCustom="${IPSWCustom}W"; IPSWCustomW=1; break;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ ! -e "$IPSW.ipsw" && ! -e "$IPSWCustom.ipsw" ]]; then
|
||||
Log "iOS $OSVer IPSW cannot be found."
|
||||
Echo "* If you already downloaded the IPSW, did you put it in the same directory as the script?"
|
||||
@ -117,9 +131,11 @@ Downgrade() {
|
||||
mv tmp/$IPSW.ipsw .
|
||||
fi
|
||||
|
||||
if [[ $Jailbreak == 1 || $DeviceProc == 7 ]]; then
|
||||
if [[ ! -e "$IPSWCustom.ipsw" && $IPSWCustomW == 1 ]]; then
|
||||
Verify=1
|
||||
elif [[ $Jailbreak == 1 || $DeviceProc == 7 ]]; then
|
||||
[[ ! -e "$IPSWCustom.ipsw" ]] && Verify=1
|
||||
elif [[ $Jailbreak != 1 ]]; then
|
||||
elif [[ $Jailbreak != 1 && $IPSWCustomW != 1 ]]; then
|
||||
Verify=1
|
||||
fi
|
||||
|
||||
@ -131,7 +147,7 @@ Downgrade() {
|
||||
Error "Verifying IPSW failed. Your IPSW may be corrupted or incomplete." \
|
||||
"Delete/replace the IPSW and run the script again"
|
||||
fi
|
||||
elif [[ $Jailbreak == 1 && -e "$IPSWCustom.ipsw" ]]; then
|
||||
elif [[ -e "$IPSWCustom.ipsw" ]]; then
|
||||
Log "Found existing Custom IPSW. Skipping verification."
|
||||
Log "Setting restore IPSW to: $IPSWCustom.ipsw"
|
||||
IPSWRestore=$IPSWCustom
|
||||
@ -146,8 +162,8 @@ Downgrade() {
|
||||
|
||||
[[ $DeviceState == "Normal" ]] && kDFU
|
||||
|
||||
if [[ $Jailbreak == 1 || $IPSWRestore == $IPSWCustom ]]; then
|
||||
[[ $Jailbreak == 1 ]] && IPSW32
|
||||
if [[ $Jailbreak == 1 || $IPSWRestore == $IPSWCustom || $IPSWCustomW == 1 ]]; then
|
||||
[[ $Jailbreak == 1 || $IPSWCustomW == 1 ]] && IPSW32
|
||||
IPSWExtract=$IPSWCustom
|
||||
else
|
||||
IPSWExtract=$IPSW
|
||||
@ -160,7 +176,7 @@ Downgrade() {
|
||||
IPSW64
|
||||
pwnREC
|
||||
SaveOTABlobs
|
||||
elif [[ $Jailbreak != 1 && $OSVer != "Other" ]]; then
|
||||
elif [[ $Jailbreak != 1 && $OSVer != "Other" && $IPSWCustomW != 1 ]]; then
|
||||
Log "Preparing for futurerestore... (Enter root password of your PC/Mac when prompted)"
|
||||
cd resources
|
||||
$SimpleHTTPServer &
|
||||
@ -173,7 +189,7 @@ Downgrade() {
|
||||
IPSWRestore="$IPSW"
|
||||
fi
|
||||
|
||||
if [[ $Jailbreak == 1 ]]; then
|
||||
if [[ $Jailbreak == 1 || $IPSWCustomW == 1 ]]; then
|
||||
iDeviceRestore
|
||||
else
|
||||
FutureRestore
|
||||
|
@ -11,14 +11,15 @@ IPSW32() {
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ $Jailbreak == 1 ]]; then
|
||||
if [[ $OSVer == 8.4.1 ]]; then
|
||||
JBFiles=("fstab.tar" "etasonJB-untether.tar" "Cydia8.tar")
|
||||
JBSHA1="6459dbcbfe871056e6244d23b33c9b99aaeca970"
|
||||
JBPartSize=2305
|
||||
JBPartSize="-s 2305"
|
||||
else
|
||||
JBFiles=("fstab_rw.tar" "p0sixspwn.tar" "Cydia6.tar")
|
||||
JBSHA1="1d5a351016d2546aa9558bc86ce39186054dc281"
|
||||
JBPartSize=1260
|
||||
JBPartSize="-s 1260"
|
||||
fi
|
||||
if [[ ! -e resources/jailbreak/${JBFiles[2]} ]]; then
|
||||
cd tmp
|
||||
@ -30,6 +31,7 @@ IPSW32() {
|
||||
for i in {0..2}; do
|
||||
JBFiles[$i]=jailbreak/${JBFiles[$i]}
|
||||
done
|
||||
fi
|
||||
if [[ ! -e $IPSWCustom.ipsw ]]; then
|
||||
Echo "* By default, memory option is set to Y, you may select N later if you encounter problems"
|
||||
Echo "* If it doesn't work with both, you might not have enough RAM and/or tmp storage"
|
||||
@ -38,7 +40,7 @@ IPSW32() {
|
||||
Log "Preparing custom IPSW..."
|
||||
cd resources
|
||||
ln -sf firmware/FirmwareBundles FirmwareBundles
|
||||
$ipsw ../$IPSW.ipsw ../$IPSWCustom.ipsw $JBMemory -bbupdate -s $JBPartSize ${JBFiles[@]}
|
||||
$ipsw ./../$IPSW.ipsw ./../$IPSWCustom.ipsw $JBMemory -bbupdate $JBPartSize ${JBFiles[@]}
|
||||
cd ..
|
||||
fi
|
||||
if [[ ! -e $IPSWCustom.ipsw ]]; then
|
||||
|
Binary file not shown.
Binary file not shown.
@ -89,8 +89,8 @@ Main() {
|
||||
Error "Only 64-bit (x86_64) distributions are supported."
|
||||
fi
|
||||
|
||||
if [[ $1 == "Install" || ! $bspatch || ! $git ||
|
||||
! $ideviceinfo || ! $irecoverychk || ! $python ]]; then
|
||||
if [[ $1 == "Install" || ! $bspatch || ! $git || ! $ideviceinfo || ! $irecoverychk || ! $python ||
|
||||
! -d ./resources/libimobiledevice_$platform ]]; then
|
||||
Clean
|
||||
InstallDepends
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user