mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-01-12 00:09:10 +01:00
Update kDFU/pwnDFU stuff
This commit is contained in:
parent
bcb605e340
commit
ba1de61a4b
37
restore.sh
37
restore.sh
@ -1449,7 +1449,7 @@ ipsw_preference_set() {
|
|||||||
if [[ $device_target_powder == 1 ]] ||
|
if [[ $device_target_powder == 1 ]] ||
|
||||||
[[ $device_type == "iPhone3,1" && $device_target_vers == "4"* && $device_target_vers != "4.2.1" ]]; then
|
[[ $device_type == "iPhone3,1" && $device_target_vers == "4"* && $device_target_vers != "4.2.1" ]]; then
|
||||||
ipsw_canjailbreak=1
|
ipsw_canjailbreak=1
|
||||||
elif [[ $device_proc == 4 && $device_target_other == 1 && $ipsw_canjailbreak != 1 ]]; then
|
elif [[ $device_target_other == 1 && $ipsw_canjailbreak != 1 ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2701,14 +2701,28 @@ restore_prepare_1033() {
|
|||||||
shsh_save apnonce $($irecovery -q | grep "NONC" | cut -c 7-)
|
shsh_save apnonce $($irecovery -q | grep "NONC" | cut -c 7-)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
device_buttons() {
|
||||||
|
local opt
|
||||||
|
print "* This device needs to be in pwnDFU/kDFU mode before proceeding."
|
||||||
|
print "* Select Y for pwnDFU mode, N for kDFU mode. Select Y if unsure."
|
||||||
|
read -p "$(input 'Are both your home and power buttons working properly? (Y/n): ')" opt
|
||||||
|
if [[ $opt != 'N' && $opt != 'n' ]]; then
|
||||||
|
device_enter_mode pwnDFU
|
||||||
|
else
|
||||||
|
device_enter_mode kDFU
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
restore_prepare() {
|
restore_prepare() {
|
||||||
case $device_proc in
|
case $device_proc in
|
||||||
4 )
|
4 )
|
||||||
if [[ $device_target_other == 1 ]] && [[ $device_target_vers == "3"* || $device_target_vers == "4"* ]]; then
|
if [[ $device_target_other == 1 ]] && [[ $device_target_vers == "3"* || $device_target_vers == "4"* ]]; then
|
||||||
if [[ $device_type != "iPhone3,1" ]]; then
|
if [[ $device_type == "iPhone3,1" ]]; then
|
||||||
ipsw_custom="../${device_type}_${device_target_vers}_${device_target_build}_Restore"
|
|
||||||
fi
|
|
||||||
device_enter_mode pwnDFU
|
device_enter_mode pwnDFU
|
||||||
|
else
|
||||||
|
ipsw_custom="../${device_type}_${device_target_vers}_${device_target_build}_Restore"
|
||||||
|
device_enter_mode DFU
|
||||||
|
fi
|
||||||
restore_idevicerestore
|
restore_idevicerestore
|
||||||
if [[ $device_type == "iPhone2,1" ]]; then
|
if [[ $device_type == "iPhone2,1" ]]; then
|
||||||
log "Ignore the baseband error and do not disconnect your device yet"
|
log "Ignore the baseband error and do not disconnect your device yet"
|
||||||
@ -2718,7 +2732,7 @@ restore_prepare() {
|
|||||||
log "Done, your device should boot now"
|
log "Done, your device should boot now"
|
||||||
fi
|
fi
|
||||||
elif [[ $device_target_other == 1 ]]; then
|
elif [[ $device_target_other == 1 ]]; then
|
||||||
device_enter_mode pwnDFU
|
device_buttons
|
||||||
restore_idevicerestore
|
restore_idevicerestore
|
||||||
elif [[ $device_target_vers == "4.1" && $ipsw_jailbreak != 1 ]]; then
|
elif [[ $device_target_vers == "4.1" && $ipsw_jailbreak != 1 ]]; then
|
||||||
device_enter_mode DFU
|
device_enter_mode DFU
|
||||||
@ -2741,7 +2755,11 @@ restore_prepare() {
|
|||||||
elif [[ $device_type == "iPhone3,1" || $device_type == "iPhone3,3" ]]; then
|
elif [[ $device_type == "iPhone3,1" || $device_type == "iPhone3,3" ]]; then
|
||||||
# powdersn0w 4.3.x-6.1.3
|
# powdersn0w 4.3.x-6.1.3
|
||||||
shsh_save version 7.1.2
|
shsh_save version 7.1.2
|
||||||
|
if [[ $device_target_powder == 1 && $device_target_vers == "6"* ]]; then
|
||||||
|
device_buttons
|
||||||
|
else
|
||||||
device_enter_mode pwnDFU
|
device_enter_mode pwnDFU
|
||||||
|
fi
|
||||||
restore_idevicerestore
|
restore_idevicerestore
|
||||||
else
|
else
|
||||||
device_enter_mode pwnDFU
|
device_enter_mode pwnDFU
|
||||||
@ -2762,17 +2780,12 @@ restore_prepare() {
|
|||||||
restore_latest
|
restore_latest
|
||||||
else
|
else
|
||||||
if [[ $device_proc == 6 && $platform == "macos" ]]; then
|
if [[ $device_proc == 6 && $platform == "macos" ]]; then
|
||||||
print "* This device needs to be in pwnDFU/kDFU mode before proceeding."
|
device_buttons
|
||||||
print "* Select Y for pwnDFU mode, N for kDFU mode. Select Y if unsure."
|
elif [[ $device_target_powder == 1 && $device_target_vers == "5"* ]]; then
|
||||||
read -p "$(input 'Are both your home and power buttons working properly? (Y/n): ')" opt
|
|
||||||
if [[ $opt != 'N' && $opt != 'n' ]]; then
|
|
||||||
device_enter_mode pwnDFU
|
device_enter_mode pwnDFU
|
||||||
else
|
else
|
||||||
device_enter_mode kDFU
|
device_enter_mode kDFU
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
device_enter_mode kDFU
|
|
||||||
fi
|
|
||||||
if [[ $ipsw_jailbreak == 1 || -e "$ipsw_custom.ipsw" ]]; then
|
if [[ $ipsw_jailbreak == 1 || -e "$ipsw_custom.ipsw" ]]; then
|
||||||
restore_idevicerestore
|
restore_idevicerestore
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user