mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-01-11 15:59:08 +01:00
More updates to menu and others
This commit is contained in:
parent
accadccd28
commit
cc0ff26cf0
@ -13,7 +13,8 @@
|
|||||||
- Restore to iOS 10.3.3 on supported A7 devices **(OTA signed)**
|
- Restore to iOS 10.3.3 on supported A7 devices **(OTA signed)**
|
||||||
- Option to **jailbreak** iOS 6.1.3 and 8.4.1 restores
|
- Option to **jailbreak** iOS 6.1.3 and 8.4.1 restores
|
||||||
- Restore to unsigned iOS versions **with SHSH blobs**
|
- Restore to unsigned iOS versions **with SHSH blobs**
|
||||||
- Supports 32-bit/A7/A8 devices, iOS 5 to 12
|
- Supports 32-bit devices, iOS 5 to 10
|
||||||
|
- Supports A7/A8 devices, see [SEP/BB Compatibility Chart](https://docs.google.com/spreadsheets/d/1Mb1UNm6g3yvdQD67M413GYSaJ4uoNhLgpkc7YKi3LBs/edit#gid=1191207636)
|
||||||
- Also supports iPad 2 iOS 4.3.x, iPhone 4 iOS 4.x
|
- Also supports iPad 2 iOS 4.3.x, iPhone 4 iOS 4.x
|
||||||
- Restore to unsigned iOS versions **with iOS 7.1.x blobs (powdersn0w)**
|
- Restore to unsigned iOS versions **with iOS 7.1.x blobs (powdersn0w)**
|
||||||
- Device support is limited, see below
|
- Device support is limited, see below
|
||||||
@ -30,6 +31,7 @@
|
|||||||
- Restoring with powdersn0w supports the following devices:
|
- Restoring with powdersn0w supports the following devices:
|
||||||
- iPhone 4 GSM - iOS 4.3 to 6.1.3
|
- iPhone 4 GSM - iOS 4.3 to 6.1.3
|
||||||
- iPhone 4S, iPhone 5 (not 5C), iPad 2 Rev A, iPod 5th generation - iOS 5.0 to 6.1.3, 8.0 to 9.3.5
|
- iPhone 4S, iPhone 5 (not 5C), iPad 2 Rev A, iPod 5th generation - iOS 5.0 to 6.1.3, 8.0 to 9.3.5
|
||||||
|
- Using powdersn0w requires iOS 7.1.x blobs for your device
|
||||||
- **iPhone 5C and iPad mini 3 devices are NOT supported by OTA downgrades**
|
- **iPhone 5C and iPad mini 3 devices are NOT supported by OTA downgrades**
|
||||||
- These devices still support restoring to other iOS versions with SHSH blobs
|
- These devices still support restoring to other iOS versions with SHSH blobs
|
||||||
- See the table below for OTA downgrading support:
|
- See the table below for OTA downgrading support:
|
||||||
|
146
restore.sh
146
restore.sh
@ -142,7 +142,7 @@ set_tool_paths() {
|
|||||||
elif [[ $ID == "opensuse-tumbleweed" ]]; then
|
elif [[ $ID == "opensuse-tumbleweed" ]]; then
|
||||||
distro="opensuse"
|
distro="opensuse"
|
||||||
else
|
else
|
||||||
error "Distro not detected/supported. See the repo README for supported OS versions/distros"
|
error "Your distro is not detected/supported. See the repo README for supported OS versions/distros"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
jq="$(which jq)"
|
jq="$(which jq)"
|
||||||
@ -286,6 +286,10 @@ set_tool_paths() {
|
|||||||
jq="$dir/jq"
|
jq="$dir/jq"
|
||||||
zenity="$dir/zenity"
|
zenity="$dir/zenity"
|
||||||
fi
|
fi
|
||||||
|
ideviceactivation="$(which ideviceactivation 2>/dev/null)"
|
||||||
|
if [[ -z $ideviceactivation ]]; then
|
||||||
|
ideviceactivation="$dir/ideviceactivation"
|
||||||
|
fi
|
||||||
gaster+="$dir/gaster"
|
gaster+="$dir/gaster"
|
||||||
idevicerestore+="$dir/idevicerestore"
|
idevicerestore+="$dir/idevicerestore"
|
||||||
idevicererestore+="$dir/idevicererestore"
|
idevicererestore+="$dir/idevicererestore"
|
||||||
@ -1732,10 +1736,10 @@ ipsw_prepare_powder() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cp -R ../resources/firmware/powdersn0wBundles ./FirmwareBundles
|
cp -R ../resources/firmware/powdersn0wBundles ./FirmwareBundles
|
||||||
|
cp -R ../resources/firmware/src .
|
||||||
if [[ $device_target_vers == "4.3"* ]]; then
|
if [[ $device_target_vers == "4.3"* ]]; then
|
||||||
ExtraArgs+="-apticket $shsh_path"
|
ExtraArgs+="-apticket $shsh_path"
|
||||||
fi
|
fi
|
||||||
cp -R ../resources/firmware/src .
|
|
||||||
if [[ $ipsw_jailbreak == 1 && -z ${JBFiles[0]} ]]; then
|
if [[ $ipsw_jailbreak == 1 && -z ${JBFiles[0]} ]]; then
|
||||||
ipsw_prepare_config true true
|
ipsw_prepare_config true true
|
||||||
else
|
else
|
||||||
@ -1816,7 +1820,7 @@ ipsw_prepare_powder2() {
|
|||||||
cp ../resources/jailbreak/freeze.tar .
|
cp ../resources/jailbreak/freeze.tar .
|
||||||
fi
|
fi
|
||||||
if [[ $device_type != "$device_disable_bbupdate" && $device_proc != 4 ]]; then
|
if [[ $device_type != "$device_disable_bbupdate" && $device_proc != 4 ]]; then
|
||||||
ExtraArgs+=" -bbupdate"
|
ExtraArgs+="-bbupdate"
|
||||||
fi
|
fi
|
||||||
if [[ $ipsw_memory == 1 ]]; then
|
if [[ $ipsw_memory == 1 ]]; then
|
||||||
ExtraArgs+=" -memory"
|
ExtraArgs+=" -memory"
|
||||||
@ -1925,6 +1929,7 @@ restore_download_bbsep() {
|
|||||||
|
|
||||||
restore_idevicerestore() {
|
restore_idevicerestore() {
|
||||||
local ExtraArgs="-e -w"
|
local ExtraArgs="-e -w"
|
||||||
|
local idevicerestore2="$idevicerestore"
|
||||||
local re
|
local re
|
||||||
|
|
||||||
mkdir shsh
|
mkdir shsh
|
||||||
@ -1934,7 +1939,7 @@ restore_idevicerestore() {
|
|||||||
log "Device $device_type has no baseband/disabled baseband update"
|
log "Device $device_type has no baseband/disabled baseband update"
|
||||||
elif [[ $device_type != "iPhone3"* ]]; then
|
elif [[ $device_type != "iPhone3"* ]]; then
|
||||||
ExtraArgs="-r"
|
ExtraArgs="-r"
|
||||||
idevicerestore="$idevicererestore"
|
idevicerestore2="$idevicererestore"
|
||||||
re="re"
|
re="re"
|
||||||
cp shsh/$device_ecid-$device_type-$device_target_vers.shsh shsh/$device_ecid-$device_type-$device_target_vers-$device_target_build.shsh # remove this if i get my fork of idevicererestore compiled on macos
|
cp shsh/$device_ecid-$device_type-$device_target_vers.shsh shsh/$device_ecid-$device_type-$device_target_vers-$device_target_build.shsh # remove this if i get my fork of idevicererestore compiled on macos
|
||||||
fi
|
fi
|
||||||
@ -1949,8 +1954,8 @@ restore_idevicerestore() {
|
|||||||
ExtraArgs+=" -d"
|
ExtraArgs+=" -d"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "Running idevicere${re}store with command: $idevicerestore $ExtraArgs \"$ipsw_custom.ipsw\""
|
log "Running idevicere${re}store with command: $idevicerestore2 $ExtraArgs \"$ipsw_custom.ipsw\""
|
||||||
$idevicerestore $ExtraArgs "$ipsw_custom.ipsw"
|
$idevicerestore2 $ExtraArgs "$ipsw_custom.ipsw"
|
||||||
echo
|
echo
|
||||||
log "Restoring done! Read the message below if any error has occurred:"
|
log "Restoring done! Read the message below if any error has occurred:"
|
||||||
if [[ $platform == "windows" ]]; then
|
if [[ $platform == "windows" ]]; then
|
||||||
@ -1965,6 +1970,7 @@ restore_idevicerestore() {
|
|||||||
|
|
||||||
restore_futurerestore() {
|
restore_futurerestore() {
|
||||||
local ExtraArgs=()
|
local ExtraArgs=()
|
||||||
|
local futurerestore2="$futurerestore"
|
||||||
local mac_ver=0
|
local mac_ver=0
|
||||||
local port=8888
|
local port=8888
|
||||||
|
|
||||||
@ -2013,19 +2019,19 @@ restore_futurerestore() {
|
|||||||
fi
|
fi
|
||||||
if [[ $platform != "macos" ]]; then
|
if [[ $platform != "macos" ]]; then
|
||||||
if (( device_proc < 7 )); then
|
if (( device_proc < 7 )); then
|
||||||
futurerestore+="_old"
|
futurerestore2+="_old"
|
||||||
else
|
else
|
||||||
futurerestore+="_new"
|
futurerestore2+="_new"
|
||||||
fi
|
fi
|
||||||
elif [[ $device_target_other != 1 && $device_target_vers == "10.3.3" && $device_proc == 7 ]]; then
|
elif [[ $device_target_other != 1 && $device_target_vers == "10.3.3" && $device_proc == 7 ]]; then
|
||||||
futurerestore="$dir/futurerestore_194"
|
futurerestore2+="_194"
|
||||||
ipsw_path="$ipsw_custom"
|
ipsw_path="$ipsw_custom"
|
||||||
fi
|
fi
|
||||||
ExtraArgs+=("-t" "$shsh_path" "$ipsw_path.ipsw")
|
ExtraArgs+=("-t" "$shsh_path" "$ipsw_path.ipsw")
|
||||||
ipsw_extract
|
ipsw_extract
|
||||||
|
|
||||||
log "Running futurerestore with command: $futurerestore ${ExtraArgs[*]}"
|
log "Running futurerestore with command: $futurerestore2 ${ExtraArgs[*]}"
|
||||||
$futurerestore "${ExtraArgs[@]}"
|
$futurerestore2 "${ExtraArgs[@]}"
|
||||||
log "Restoring done! Read the message below if any error has occurred:"
|
log "Restoring done! Read the message below if any error has occurred:"
|
||||||
print "* Please read the \"Troubleshooting\" wiki page in GitHub before opening any issue!"
|
print "* Please read the \"Troubleshooting\" wiki page in GitHub before opening any issue!"
|
||||||
print "* Your problem may have already been addressed within the wiki page."
|
print "* Your problem may have already been addressed within the wiki page."
|
||||||
@ -2601,59 +2607,60 @@ menu_ipsw() {
|
|||||||
device_target_build=
|
device_target_build=
|
||||||
device_base_vers=
|
device_base_vers=
|
||||||
device_base_build=
|
device_base_build=
|
||||||
case $1 in
|
|
||||||
"iOS 10.3.3" )
|
|
||||||
device_target_vers="10.3.3"
|
|
||||||
device_target_build="14G60"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"iOS 8.4.1" )
|
|
||||||
device_target_vers="8.4.1"
|
|
||||||
device_target_build="12H321"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"iOS 6.1.3" )
|
|
||||||
device_target_vers="6.1.3"
|
|
||||||
device_target_build="10B329"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"Latest iOS" )
|
|
||||||
device_target_vers="$device_latest_vers"
|
|
||||||
device_target_build="$device_latest_build"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if [[ $device_target_vers == "$device_latest_vers" ]]; then
|
|
||||||
case $device_type in
|
|
||||||
iPad3,[456] ) newpath="iPad_32bit";;
|
|
||||||
iPad4,[123456] ) newpath="iPad_64bit";;
|
|
||||||
iPad4,[789] ) newpath="iPad_64bit_TouchID";;
|
|
||||||
iPhone5,[1234] ) newpath="iPhone_4.0_32bit";;
|
|
||||||
iPhone6,[12] ) newpath="iPhone_4.0_64bit";;
|
|
||||||
iPhone7,1 ) newpath="iPhone_5.5";;
|
|
||||||
iPhone7,2 ) newpath="iPhone_4.7";;
|
|
||||||
iPod7,1 ) newpath="iPodtouch";;
|
|
||||||
* ) newpath="${device_type}";;
|
|
||||||
esac
|
|
||||||
newpath+="_${device_target_vers}_${device_target_build}_Restore"
|
|
||||||
|
|
||||||
else
|
|
||||||
case $device_type in
|
|
||||||
iPad4,[12345] ) newpath="iPad_64bit";;
|
|
||||||
iPhone6,[12] ) newpath="iPhone_4.0_64bit";;
|
|
||||||
* ) newpath="${device_type}";;
|
|
||||||
esac
|
|
||||||
newpath+="_${device_target_vers}_${device_target_build}"
|
|
||||||
ipsw_custom_set $newpath
|
|
||||||
newpath+="_Restore"
|
|
||||||
fi
|
|
||||||
if [[ -n $device_target_vers && -e "../$newpath.ipsw" ]]; then
|
|
||||||
ipsw_verify "../$newpath" "$device_target_build" nopause
|
|
||||||
if [[ $? == 0 ]]; then
|
|
||||||
ipsw_path="../$newpath"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [[ -z "$mode" && -z "$back" ]]; do
|
while [[ -z "$mode" && -z "$back" ]]; do
|
||||||
|
case $1 in
|
||||||
|
"iOS 10.3.3" )
|
||||||
|
device_target_vers="10.3.3"
|
||||||
|
device_target_build="14G60"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"iOS 8.4.1" )
|
||||||
|
device_target_vers="8.4.1"
|
||||||
|
device_target_build="12H321"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"iOS 6.1.3" )
|
||||||
|
device_target_vers="6.1.3"
|
||||||
|
device_target_build="10B329"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"Latest iOS" )
|
||||||
|
device_target_vers="$device_latest_vers"
|
||||||
|
device_target_build="$device_latest_build"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if [[ $device_target_vers == "$device_latest_vers" ]]; then
|
||||||
|
case $device_type in
|
||||||
|
iPad3,[456] ) newpath="iPad_32bit";;
|
||||||
|
iPad4,[123456] ) newpath="iPad_64bit";;
|
||||||
|
iPad4,[789] ) newpath="iPad_64bit_TouchID";;
|
||||||
|
iPhone5,[1234] ) newpath="iPhone_4.0_32bit";;
|
||||||
|
iPhone6,[12] ) newpath="iPhone_4.0_64bit";;
|
||||||
|
iPhone7,1 ) newpath="iPhone_5.5";;
|
||||||
|
iPhone7,2 ) newpath="iPhone_4.7";;
|
||||||
|
iPod7,1 ) newpath="iPodtouch";;
|
||||||
|
* ) newpath="${device_type}";;
|
||||||
|
esac
|
||||||
|
newpath+="_${device_target_vers}_${device_target_build}_Restore"
|
||||||
|
|
||||||
|
else
|
||||||
|
case $device_type in
|
||||||
|
iPad4,[12345] ) newpath="iPad_64bit";;
|
||||||
|
iPhone6,[12] ) newpath="iPhone_4.0_64bit";;
|
||||||
|
* ) newpath="${device_type}";;
|
||||||
|
esac
|
||||||
|
newpath+="_${device_target_vers}_${device_target_build}"
|
||||||
|
ipsw_custom_set $newpath
|
||||||
|
newpath+="_Restore"
|
||||||
|
fi
|
||||||
|
if [[ -n $device_target_vers && -e "../$newpath.ipsw" ]]; then
|
||||||
|
ipsw_verify "../$newpath" "$device_target_build" nopause
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
|
ipsw_path="../$newpath"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
menu_items=("Select Target IPSW")
|
menu_items=("Select Target IPSW")
|
||||||
menu_print_info
|
menu_print_info
|
||||||
if [[ $1 == *"powdersn0w"* ]]; then
|
if [[ $1 == *"powdersn0w"* ]]; then
|
||||||
@ -2688,8 +2695,7 @@ menu_ipsw() {
|
|||||||
print "* Select Base $text2 SHSH to continue"
|
print "* Select Base $text2 SHSH to continue"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n $ipsw_path && -n $ipsw_base_path && -n $shsh_path ]] ||
|
if [[ -n $ipsw_path && -n $ipsw_base_path ]] && [[ -n $shsh_path || $2 == "ipsw" ]]; then
|
||||||
[[ -n $ipsw_path && -n $ipsw_base_path && $device_target_vers != "4"* && $2 == "ipsw" ]]; then
|
|
||||||
menu_items+=("$start")
|
menu_items+=("$start")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2702,14 +2708,14 @@ menu_ipsw() {
|
|||||||
else
|
else
|
||||||
print "* Select Target IPSW to continue"
|
print "* Select Target IPSW to continue"
|
||||||
fi
|
fi
|
||||||
echo
|
|
||||||
if [[ -n $shsh_path ]]; then
|
if [[ -n $shsh_path ]]; then
|
||||||
|
echo
|
||||||
print "* Selected Target SHSH: $shsh_path"
|
print "* Selected Target SHSH: $shsh_path"
|
||||||
elif [[ $2 != "ipsw" ]]; then
|
elif [[ $2 != "ipsw" ]]; then
|
||||||
|
echo
|
||||||
print "* Select Target SHSH to continue"
|
print "* Select Target SHSH to continue"
|
||||||
fi
|
fi
|
||||||
if [[ -n $ipsw_path && -n $shsh_path ]] ||
|
if [[ -n $ipsw_path ]] && [[ -n $shsh_path || $2 == "ipsw" ]]; then
|
||||||
[[ -n $ipsw_path && $2 == "ipsw" ]]; then
|
|
||||||
menu_items+=("$start")
|
menu_items+=("$start")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2891,10 +2897,8 @@ menu_other() {
|
|||||||
fi
|
fi
|
||||||
menu_items+=("SSH Ramdisk")
|
menu_items+=("SSH Ramdisk")
|
||||||
fi
|
fi
|
||||||
if [[ $device_type == "iPhone3,1" ]]; then
|
|
||||||
menu_items+=("Disable/Enable Exploit")
|
|
||||||
fi
|
|
||||||
case $device_type in
|
case $device_type in
|
||||||
|
iPhone3,1 ) menu_items+=("Disable/Enable Exploit");;&
|
||||||
iPhone3,[123] | iPhone4,1 | iPhone5,[1234] | iPad2,4 | iPod5,1 ) menu_items+=("Clear NVRAM");;
|
iPhone3,[123] | iPhone4,1 | iPhone5,[1234] | iPad2,4 | iPod5,1 ) menu_items+=("Clear NVRAM");;
|
||||||
esac
|
esac
|
||||||
menu_items+=("Attempt Activation")
|
menu_items+=("Attempt Activation")
|
||||||
@ -2983,7 +2987,7 @@ main() {
|
|||||||
"pwned-ibss" ) device_enter_mode pwnDFU;;
|
"pwned-ibss" ) device_enter_mode pwnDFU;;
|
||||||
"save-onboard-blobs" ) shsh_save_onboard;;
|
"save-onboard-blobs" ) shsh_save_onboard;;
|
||||||
"save-cydia-blobs" ) shsh_save_cydia;;
|
"save-cydia-blobs" ) shsh_save_cydia;;
|
||||||
"activate" ) "$dir/ideviceactivation" activate;;
|
"activate" ) $ideviceactivation activate;;
|
||||||
* ) :;;
|
* ) :;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user