mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-30 11:54:18 +01:00
Add Disable/Enable Exploit to ramdisk menu, also always show Start Restore option for 2G and touch 1 devices
This commit is contained in:
parent
efcdfb23d2
commit
be0223dd9f
43
restore.sh
43
restore.sh
@ -2201,7 +2201,9 @@ ipsw_preference_set() {
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $device_target_powder == 1 || $device_target_tethered == 1 ||
|
||||
if [[ $device_proc == 1 && $device_type != "iPhone1,2" ]]; then
|
||||
ipsw_canmemory=
|
||||
elif [[ $device_target_powder == 1 || $device_target_tethered == 1 ||
|
||||
$ipsw_jailbreak == 1 || $ipsw_gasgauge_patch == 1 || $ipsw_nskip == 1 ||
|
||||
$device_type == "$device_disable_bbupdate" ]]; then
|
||||
ipsw_canmemory=1
|
||||
@ -5007,6 +5009,8 @@ ipsw_prepare() {
|
||||
1 )
|
||||
if [[ $ipsw_jailbreak == 1 ]]; then
|
||||
ipsw_prepare_s5l8900
|
||||
elif [[ $device_target_vers == "$device_latest_vers" && ! -s "../$ipsw_latest_path.ipsw" ]]; then
|
||||
ipsw_download "../$ipsw_latest_path"
|
||||
fi
|
||||
;;
|
||||
|
||||
@ -5712,6 +5716,21 @@ device_ramdisk() {
|
||||
;;
|
||||
|
||||
"setnvram" )
|
||||
device_ramdisk_setnvram
|
||||
log "Rebooting device"
|
||||
$ssh -p $ssh_port root@127.0.0.1 "reboot_bak"
|
||||
return
|
||||
;;
|
||||
|
||||
* ) log "Device should now boot to SSH ramdisk mode.";;
|
||||
esac
|
||||
echo
|
||||
print "* Mount filesystems with this command:"
|
||||
print " mount.sh"
|
||||
menu_ramdisk
|
||||
}
|
||||
|
||||
device_ramdisk_setnvram() {
|
||||
log "Sending commands for setting NVRAM variables..."
|
||||
$ssh -p $ssh_port root@127.0.0.1 "nvram -c; nvram boot-partition=$rec"
|
||||
if [[ $rec == 2 ]]; then
|
||||
@ -5736,17 +5755,7 @@ device_ramdisk() {
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
$ssh -p $ssh_port root@127.0.0.1 "reboot_bak"
|
||||
log "Done, your device should reboot now"
|
||||
return
|
||||
;;
|
||||
|
||||
* ) log "Device should now boot to SSH ramdisk mode.";;
|
||||
esac
|
||||
echo
|
||||
print "* Mount filesystems with this command:"
|
||||
print " mount.sh"
|
||||
menu_ramdisk
|
||||
log "Done"
|
||||
}
|
||||
|
||||
device_ramdisk_ios3exploit() {
|
||||
@ -5812,7 +5821,6 @@ device_ramdisk_iosvers() {
|
||||
|
||||
menu_ramdisk() {
|
||||
local loop
|
||||
local mode
|
||||
local menu_items=("Connect to SSH" "Dump Blobs")
|
||||
local reboot="reboot_bak"
|
||||
if (( device_proc >= 7 )); then
|
||||
@ -5831,6 +5839,10 @@ menu_ramdisk() {
|
||||
if (( device_proc >= 5 )); then
|
||||
menu_items+=("Erase All (iOS 9+)")
|
||||
fi
|
||||
case $device_type in
|
||||
iPhone3,[13] | iPhone[45]* | iPad1,1 | iPad2,4 | iPod[35],1 ) menu_items+=("Disable/Enable Exploit");;
|
||||
esac
|
||||
menu_items+=("Disable/Enable Exploit")
|
||||
menu_items+=("Clear NVRAM" "Get iOS Version" "Reboot Device" "Exit")
|
||||
|
||||
print "* For accessing data, note the following:"
|
||||
@ -5865,9 +5877,11 @@ menu_ramdisk() {
|
||||
"Erase All (iOS 9+)" ) mode="erase9";;
|
||||
"Clear NVRAM" ) mode="clearnvram";;
|
||||
"Dump SEP Firmware" ) mode="dump-sep";;
|
||||
"Disable/Enable Exploit" ) menu_remove4;;
|
||||
"Exit" ) mode="exit";;
|
||||
esac
|
||||
done
|
||||
|
||||
case $mode in
|
||||
"ssh" )
|
||||
log "Use the \"exit\" command to go back to SSH Ramdisk Menu"
|
||||
@ -6019,6 +6033,7 @@ menu_ramdisk() {
|
||||
$ssh -p $ssh_port root@127.0.0.1 "nvram oblit-inprogress=5"
|
||||
log "Done. Reboot to apply changes, or clear NVRAM now to cancel erase"
|
||||
;;
|
||||
"remove4" ) device_ramdisk_setnvram;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
@ -7227,6 +7242,8 @@ menu_ipsw() {
|
||||
if [[ -n $ipsw_path ]]; then
|
||||
print "* Selected IPSW: $ipsw_path.ipsw"
|
||||
menu_items+=("$start")
|
||||
elif [[ $device_proc == 1 && $device_type != "iPhone1,2" ]]; then
|
||||
menu_items+=("$start")
|
||||
else
|
||||
print "* Select $1 IPSW to continue"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user