mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 18:34:14 +01:00
Some fixes regarding 64-bit devices ramdisks and restores
This commit is contained in:
parent
c952d4d60e
commit
1a249819e3
27
restore.sh
27
restore.sh
@ -4667,6 +4667,9 @@ restore_futurerestore() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
ExtraArr+=("--no-rsep")
|
ExtraArr+=("--no-rsep")
|
||||||
|
if [[ $device_target_setnonce == 1 ]]; then
|
||||||
|
ExtraArr+=("--set-nonce")
|
||||||
|
fi
|
||||||
log "futurerestore nightly will be used for this restore: https://github.com/futurerestore/futurerestore"
|
log "futurerestore nightly will be used for this restore: https://github.com/futurerestore/futurerestore"
|
||||||
if [[ $platform == "linux" && $platform_arch != "x86_64" ]]; then
|
if [[ $platform == "linux" && $platform_arch != "x86_64" ]]; then
|
||||||
warn "futurerestore nightly is not supported on $platform_arch, cannot continue. x86_64 only."
|
warn "futurerestore nightly is not supported on $platform_arch, cannot continue. x86_64 only."
|
||||||
@ -5003,6 +5006,7 @@ restore_pwned64() {
|
|||||||
download_file https://api.ipsw.me/v2.1/firmwares.json/condensed firmwares.json
|
download_file https://api.ipsw.me/v2.1/firmwares.json/condensed firmwares.json
|
||||||
cp firmwares.json ../saved
|
cp firmwares.json ../saved
|
||||||
fi
|
fi
|
||||||
|
rm -f /tmp/firmwares.json
|
||||||
cp ../saved/firmwares.json /tmp
|
cp ../saved/firmwares.json /tmp
|
||||||
if [[ $device_proc == 7 ]]; then
|
if [[ $device_proc == 7 ]]; then
|
||||||
log "gaster reset"
|
log "gaster reset"
|
||||||
@ -5021,6 +5025,7 @@ restore_notpwned64() {
|
|||||||
print "* Before continuing, make sure to set the nonce generator of your device!"
|
print "* Before continuing, make sure to set the nonce generator of your device!"
|
||||||
print "* For iOS 10 and older: https://github.com/tihmstar/futurerestore#how-to-use"
|
print "* For iOS 10 and older: https://github.com/tihmstar/futurerestore#how-to-use"
|
||||||
print "* For iOS 11 and newer: https://github.com/futurerestore/futurerestore/#using-dimentio"
|
print "* For iOS 11 and newer: https://github.com/futurerestore/futurerestore/#using-dimentio"
|
||||||
|
print "* Using \"Set Nonce Only\" in the Restore/Downgrade menu is also an option"
|
||||||
pause
|
pause
|
||||||
if [[ $device_mode == "Normal" ]]; then
|
if [[ $device_mode == "Normal" ]]; then
|
||||||
device_enter_mode Recovery
|
device_enter_mode Recovery
|
||||||
@ -5108,7 +5113,9 @@ restore_usepwndfu64_option() {
|
|||||||
print "* If you want to disable Pwned Restore Option, place the device in Normal/Recovery mode"
|
print "* If you want to disable Pwned Restore Option, place the device in Normal/Recovery mode"
|
||||||
restore_usepwndfu64=1
|
restore_usepwndfu64=1
|
||||||
return
|
return
|
||||||
elif [[ $platform == "macos" && $platform_arch == "arm64" ]]; then
|
elif [[ $device_target_vers == "10.3.3" && $device_target_other != 1 &&
|
||||||
|
$platform == "macos" && $platform_arch == "arm64" ]] ||
|
||||||
|
[[ $device_target_setnonce == 1 ]]; then
|
||||||
restore_usepwndfu64=1
|
restore_usepwndfu64=1
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@ -5311,7 +5318,7 @@ device_ramdisk64() {
|
|||||||
"$dir/img4" -i $getcomp.orig0 -o $getcomp.orig -k ${iv}${key} -D
|
"$dir/img4" -i $getcomp.orig0 -o $getcomp.orig -k ${iv}${key} -D
|
||||||
else
|
else
|
||||||
reco+=" -P ../resources/sshrd/$name.bpatch"
|
reco+=" -P ../resources/sshrd/$name.bpatch"
|
||||||
if [[ $platform == "linux" && $build_id == "18"* ]]; then
|
if [[ $platform == "linux" && $build_id == "18"* ]] || [[ $device_proc == 10 ]]; then
|
||||||
reco+=" -J"
|
reco+=" -J"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -6046,7 +6053,7 @@ menu_ramdisk() {
|
|||||||
;;
|
;;
|
||||||
"clearnvram" )
|
"clearnvram" )
|
||||||
log "Sending command for clearing NVRAM..."
|
log "Sending command for clearing NVRAM..."
|
||||||
$ssh -p $ssh_port root@127.0.0.1 "nvram -c"
|
$ssh -p $ssh_port root@127.0.0.1 "/usr/sbin/nvram -c"
|
||||||
log "Done"
|
log "Done"
|
||||||
;;
|
;;
|
||||||
"erase9" )
|
"erase9" )
|
||||||
@ -6773,7 +6780,9 @@ menu_restore() {
|
|||||||
if [[ $device_type != "iPod2,1" ]] && (( device_proc <= 10 )); then
|
if [[ $device_type != "iPod2,1" ]] && (( device_proc <= 10 )); then
|
||||||
menu_items+=("Other (Use SHSH Blobs)")
|
menu_items+=("Other (Use SHSH Blobs)")
|
||||||
fi
|
fi
|
||||||
if [[ $device_proc == 5 || $device_proc == 6 ]]; then
|
if (( device_proc >= 7 )) && (( device_proc <= 10 )); then
|
||||||
|
menu_items+=("Set Nonce Only")
|
||||||
|
elif [[ $device_proc == 5 || $device_proc == 6 ]]; then
|
||||||
menu_items+=("Other (Tethered)")
|
menu_items+=("Other (Tethered)")
|
||||||
fi
|
fi
|
||||||
case $device_type in
|
case $device_type in
|
||||||
@ -6990,6 +6999,10 @@ menu_ipsw() {
|
|||||||
elif [[ $2 == "fourthree" ]]; then
|
elif [[ $2 == "fourthree" ]]; then
|
||||||
nav=" > Main Menu > FourThree Utility > Step 1: Restore"
|
nav=" > Main Menu > FourThree Utility > Step 1: Restore"
|
||||||
start="Start Restore"
|
start="Start Restore"
|
||||||
|
elif [[ $1 == "Set Nonce Only" ]]; then
|
||||||
|
nav=" > Main Menu > Restore/Downgrade > $1"
|
||||||
|
start="Set Nonce"
|
||||||
|
device_target_setnonce=1
|
||||||
else
|
else
|
||||||
nav=" > Main Menu > Restore/Downgrade > $1"
|
nav=" > Main Menu > Restore/Downgrade > $1"
|
||||||
start="Start Restore"
|
start="Start Restore"
|
||||||
@ -7093,7 +7106,7 @@ menu_ipsw() {
|
|||||||
ipsw_custom_set $newpath
|
ipsw_custom_set $newpath
|
||||||
newpath+="_Restore"
|
newpath+="_Restore"
|
||||||
fi
|
fi
|
||||||
if [[ $1 == "Other (Use SHSH Blobs)" ]]; then
|
if [[ $1 == "Other (Use SHSH Blobs)" || $1 == "Set Nonce Only" ]]; then
|
||||||
device_target_other=1
|
device_target_other=1
|
||||||
if [[ $device_type == "iPhone2,1" ]]; then
|
if [[ $device_type == "iPhone2,1" ]]; then
|
||||||
ipsw_canhacktivate=1
|
ipsw_canhacktivate=1
|
||||||
@ -7223,7 +7236,7 @@ menu_ipsw() {
|
|||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
elif [[ $1 == "Other"* ]]; then
|
elif [[ $1 == "Other"* || $1 == "Set Nonce Only" ]]; then
|
||||||
# menu for other (shsh) restores
|
# menu for other (shsh) restores
|
||||||
if [[ -n $ipsw_path ]]; then
|
if [[ -n $ipsw_path ]]; then
|
||||||
print "* Selected Target IPSW: $ipsw_path.ipsw"
|
print "* Selected Target IPSW: $ipsw_path.ipsw"
|
||||||
@ -7352,8 +7365,8 @@ menu_ipsw() {
|
|||||||
break
|
break
|
||||||
done
|
done
|
||||||
case $selected in
|
case $selected in
|
||||||
"Start Restore" ) mode="downgrade";;
|
|
||||||
"Create IPSW" ) mode="custom-ipsw";;
|
"Create IPSW" ) mode="custom-ipsw";;
|
||||||
|
"$start" ) mode="downgrade";;
|
||||||
"Select Target IPSW" ) menu_ipsw_browse "$1";;
|
"Select Target IPSW" ) menu_ipsw_browse "$1";;
|
||||||
"Select Base IPSW" ) menu_ipsw_browse "base";;
|
"Select Base IPSW" ) menu_ipsw_browse "base";;
|
||||||
"Select Target SHSH" ) menu_shsh_browse "$1";;
|
"Select Target SHSH" ) menu_shsh_browse "$1";;
|
||||||
|
Loading…
Reference in New Issue
Block a user