Skip to content

Commit e942b7e

Browse files
committed
kdfu/pwndfu selection/option changes
1 parent fe8d1a4 commit e942b7e

1 file changed

Lines changed: 18 additions & 15 deletions

File tree

restore.sh

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5235,15 +5235,26 @@ restore_prepare_pwnrec64() {
52355235
}
52365236

52375237
device_buttons() {
5238-
local selection=("pwnDFU" "kDFU")
5238+
local selection=("kDFU" "pwnDFU")
52395239
if [[ $device_mode != "Normal" ]]; then
52405240
device_enter_mode pwnDFU
52415241
return
52425242
fi
52435243
input "pwnDFU/kDFU Mode Option"
52445244
print "* This device needs to be in pwnDFU/kDFU mode before proceeding."
5245-
print "* Selecting 1 (pwnDFU) is recommended. Both your home and power buttons must be working properly for entering DFU mode."
5246-
print "* Selecting 2 (kDFU) is for those that prefer the jailbroken method instead (have OpenSSH installed)."
5245+
if [[ $device_proc == 6 && $platform != "macos" ]]; then
5246+
print "* Selecting kDFU is recommended. Your device must be jailbroken and have OpenSSH installed for this option."
5247+
print "* Selecting pwnDFU is only for those that do not want to/cannot jailbreak their device."
5248+
print "* Selecting pwnDFU will use checkm8 which has low success rates on Linux for A6 devices."
5249+
elif [[ $device_proc == 5 ]]; then
5250+
print "* Selecting kDFU is recommended. Your device must be jailbroken and have OpenSSH installed for this option."
5251+
print "* Selecting pwnDFU is only for those that have the option to use checkm8-a5 (needs Arduino+USB Host Shield or Pi Pico)."
5252+
print "* For more info about checkm8-a5, go here: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/checkm8-a5"
5253+
else
5254+
selection=("pwnDFU" "kDFU")
5255+
print "* Selecting pwnDFU is recommended. Both your home and power buttons must be working properly for entering DFU mode."
5256+
print "* Selecting kDFU is for those that prefer the jailbroken method instead (have OpenSSH installed)."
5257+
fi
52475258
input "Select your option:"
52485259
select_option "${selection[@]}"
52495260
opt2="${selection[$?]}"
@@ -5259,7 +5270,7 @@ device_buttons2() {
52595270
return
52605271
fi
52615272
input "Jailbroken/pwnDFU Mode Option"
5262-
print "* This device needs to be jailbroken/in kDFU mode before proceeding."
5273+
print "* This device needs to be jailbroken/in pwnDFU mode before proceeding."
52635274
print "* Selecting 1 (Jailbroken) is recommended. Your device must be jailbroken and have OpenSSH installed for this option."
52645275
print "* Selecting 2 (pwnDFU) is for those that prefer the ramdisk method instead."
52655276
if [[ $device_proc == 5 ]]; then
@@ -5387,11 +5398,7 @@ restore_prepare() {
53875398
if [[ $device_target_vers == "$device_latest_vers" && $ipsw_gasgauge_patch != 1 ]]; then
53885399
restore_latest
53895400
else
5390-
if [[ $device_proc == 6 && $platform == "macos" ]]; then
5391-
device_buttons
5392-
else
5393-
device_enter_mode kDFU
5394-
fi
5401+
device_buttons
53955402
if [[ $ipsw_jailbreak == 1 || -e "$ipsw_custom.ipsw" ]]; then
53965403
restore_idevicerestore
53975404
else
@@ -5989,12 +5996,10 @@ device_ramdisk() {
59895996

59905997
if [[ $1 == "jailbreak" || $1 == "justboot" ]]; then
59915998
device_enter_mode pwnDFU
5992-
elif [[ $device_proc == 4 ]] || [[ $device_proc == 6 && $platform == "macos" ]]; then
5993-
device_buttons
59945999
elif [[ $device_proc == 1 ]]; then
59956000
device_enter_mode DFU
59966001
else
5997-
device_enter_mode kDFU
6002+
device_buttons
59986003
fi
59996004

60006005
if [[ $device_type == "iPad1,1" && $build_id != "9"* ]]; then
@@ -6590,10 +6595,8 @@ shsh_save_onboard() {
65906595
if (( device_proc >= 7 )); then
65916596
shsh_save_onboard64
65926597
return
6593-
elif [[ $device_proc == 4 ]] || [[ $device_proc == 6 && $platform == "macos" ]]; then
6594-
device_buttons
65956598
else
6596-
device_enter_mode kDFU
6599+
device_buttons
65976600
fi
65986601
if [[ $device_proc == 4 && $device_pwnrec != 1 ]]; then
65996602
patch_ibss

0 commit comments

Comments
 (0)