mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-06-03 04:34:57 +02:00
Fix the dfu mode helper option in the utilities menu
This commit is contained in:
parent
3bdfbfb34a
commit
fe052d675d
28
restore.sh
28
restore.sh
@ -1545,10 +1545,10 @@ device_dfuhelper3() {
|
|||||||
device_dfuhelper() {
|
device_dfuhelper() {
|
||||||
local opt
|
local opt
|
||||||
local rec=" recovery mode"
|
local rec=" recovery mode"
|
||||||
if [[ $1 == "norec" ]]; then
|
if [[ $1 == "norec" || $mode == "device_dfuhelper" ]]; then
|
||||||
rec=
|
rec=
|
||||||
fi
|
fi
|
||||||
if [[ $device_mode == "DFU" ]]; then
|
if [[ $device_mode == "DFU" && $mode != "device_dfuhelper" ]]; then
|
||||||
log "Device is already in DFU mode"
|
log "Device is already in DFU mode"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@ -2194,9 +2194,6 @@ device_ipwndfu() {
|
|||||||
if [[ $platform == "macos" ]]; then
|
if [[ $platform == "macos" ]]; then
|
||||||
print "* If you get the error \"No backend available,\" install libusb in Homebrew/MacPorts"
|
print "* If you get the error \"No backend available,\" install libusb in Homebrew/MacPorts"
|
||||||
fi
|
fi
|
||||||
if [[ $tool_pwned != 0 ]]; then
|
|
||||||
error "ipwndfu $1 failed. Please run the script again"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [[ $device_sudoloop == 1 ]]; then
|
if [[ $device_sudoloop == 1 ]]; then
|
||||||
@ -8607,7 +8604,6 @@ menu_miscutilities() {
|
|||||||
"Dump Baseband" ) mode="baseband";;
|
"Dump Baseband" ) mode="baseband";;
|
||||||
"Activation Records" ) mode="actrec";;
|
"Activation Records" ) mode="actrec";;
|
||||||
"Enable Flags" ) menu_flags;;
|
"Enable Flags" ) menu_flags;;
|
||||||
"DFU Mode Helper" ) mode="enterdfu";;
|
|
||||||
"(Re-)Install Dependencies" ) install_depends;;
|
"(Re-)Install Dependencies" ) install_depends;;
|
||||||
"Create Custom IPSW" ) menu_restore ipsw;;
|
"Create Custom IPSW" ) menu_restore ipsw;;
|
||||||
"Get iOS Version" ) mode="getversion";;
|
"Get iOS Version" ) mode="getversion";;
|
||||||
@ -8661,10 +8657,7 @@ menu_usefulutilities() {
|
|||||||
if (( device_proc <= 10 )) && [[ $device_latest_vers != "16"* && $device_checkm8ipad != 1 && $device_proc != 1 ]]; then
|
if (( device_proc <= 10 )) && [[ $device_latest_vers != "16"* && $device_checkm8ipad != 1 && $device_proc != 1 ]]; then
|
||||||
menu_items+=("SSH Ramdisk")
|
menu_items+=("SSH Ramdisk")
|
||||||
fi
|
fi
|
||||||
menu_items+=("Update DateTime")
|
menu_items+=("Update DateTime" "DFU Mode Helper")
|
||||||
if [[ $device_mode != "DFU" ]]; then
|
|
||||||
menu_items+=("DFU Mode Helper")
|
|
||||||
fi
|
|
||||||
menu_items+=("Go Back")
|
menu_items+=("Go Back")
|
||||||
menu_print_info
|
menu_print_info
|
||||||
# other utilities menu
|
# other utilities menu
|
||||||
@ -8683,6 +8676,7 @@ menu_usefulutilities() {
|
|||||||
"Install alloc8 Exploit" ) mode="device_alloc8";;
|
"Install alloc8 Exploit" ) mode="device_alloc8";;
|
||||||
"Just Boot" ) menu_justboot;;
|
"Just Boot" ) menu_justboot;;
|
||||||
"Update DateTime" ) device_update_datetime;;
|
"Update DateTime" ) device_update_datetime;;
|
||||||
|
"DFU Mode Helper" ) mode="device_dfuhelper";;
|
||||||
"Go Back" ) back=1;;
|
"Go Back" ) back=1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -8721,8 +8715,11 @@ device_ssh() {
|
|||||||
device_iproxy no-logging
|
device_iproxy no-logging
|
||||||
device_sshpass
|
device_sshpass
|
||||||
log "Connecting to device SSH..."
|
log "Connecting to device SSH..."
|
||||||
print "* For accessing data, note the following:"
|
print "* For SSH/SCP access, use the following:"
|
||||||
print "* Host: sftp://127.0.0.1 | User: $ssh_user | Password: <your password> (default is alpine) | Port: $ssh_port"
|
print "* Host: sftp://127.0.0.1 | Username: $ssh_user | Password: <your password> (default is alpine) | Port: $ssh_port"
|
||||||
|
if [[ $ssh_user == "root" ]]; then
|
||||||
|
print "* You may also use mobile as the username for SSH/SCP access."
|
||||||
|
fi
|
||||||
$ssh -p $ssh_port ${ssh_user}@127.0.0.1
|
$ssh -p $ssh_port ${ssh_user}@127.0.0.1
|
||||||
kill $iproxy_pid
|
kill $iproxy_pid
|
||||||
}
|
}
|
||||||
@ -8730,7 +8727,11 @@ device_ssh() {
|
|||||||
device_alloc8() {
|
device_alloc8() {
|
||||||
device_enter_mode pwnDFU alloc8
|
device_enter_mode pwnDFU alloc8
|
||||||
device_ipwndfu alloc8
|
device_ipwndfu alloc8
|
||||||
log "Done!"
|
if [[ $tool_pwned == 0 ]]; then
|
||||||
|
log "Done!"
|
||||||
|
else
|
||||||
|
warn "ipwndfu alloc8 seems to have failed. Just force restart the device, enter DFU, and try again."
|
||||||
|
fi
|
||||||
print "* This may take several tries. It can fail a lot with \"Operation timed out\" error."
|
print "* This may take several tries. It can fail a lot with \"Operation timed out\" error."
|
||||||
print "* If it fails, try to unplug and replug your device then run the script again."
|
print "* If it fails, try to unplug and replug your device then run the script again."
|
||||||
print "* You may also need to force restart the device and re-enter DFU mode before retrying."
|
print "* You may also need to force restart the device and re-enter DFU mode before retrying."
|
||||||
@ -9825,7 +9826,6 @@ main() {
|
|||||||
print " - If so, try to clear the device's NVRAM: go to Useful Utilities -> Clear NVRAM"
|
print " - If so, try to clear the device's NVRAM: go to Useful Utilities -> Clear NVRAM"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"enterdfu" ) device_enter_mode DFU;;
|
|
||||||
"dfuipswipsw" ) device_dfuipsw ipsw;;
|
"dfuipswipsw" ) device_dfuipsw ipsw;;
|
||||||
"customipsw" ) restore_customipsw;;
|
"customipsw" ) restore_customipsw;;
|
||||||
"getversion" ) device_ramdisk getversion;;
|
"getversion" ) device_ramdisk getversion;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user