Skip to content

Commit

Permalink
Remove touch 2 require to enter DFU from recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeZGD committed Jan 16, 2024
1 parent 79a544a commit 8b1da36
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,15 @@ device_manufacturing() {
else
device_newbr=0
fi
elif [[ $device_type == "iPod2,1" && -z $device_newbr ]]; then
elif [[ $device_type == "iPod2,1" && $device_mode == "Recovery" ]]; then
device_newbr=2
return
fi
if [[ $device_newbr == 1 ]]; then
print "* This $device_type is a new bootrom model"
elif [[ $device_newbr == 2 ]]; then
print "* This $device_type bootrom model cannot be determined. Enter DFU mode to get bootrom model"
else
elif [[ $device_newbr == 0 ]]; then
print "* This $device_type is an old bootrom model"
fi
if [[ $device_type == "iPhone2,1" && $device_mode == "DFU" ]]; then
Expand Down Expand Up @@ -605,15 +605,7 @@ device_get_info() {
[[ -z $device_vers ]] && device_vers="Unknown"
device_serial="$($irecovery -q | grep "SRNM" | cut -c 7- | cut -c 3- | cut -c -3)"
device_manufacturing
if [[ $device_mode == "Recovery" && $device_newbr == 2 ]]; then
print "* Device: $device_type (${device_model}) in $device_mode mode"
print "* iOS Version: $device_vers"
print "* ECID: $device_ecid"
echo
log "Your device is in recovery mode. Enter DFU mode to continue."
device_enter_mode DFU
fi
if [[ $device_type == "iPod2,1" ]]; then
if [[ $device_type == "iPod2,1" && $device_newbr != 2 ]]; then
device_newbr="$($irecovery -q | grep -c '240.5.1')"
elif [[ $device_type == "iPhone2,1" ]]; then
device_newbr="$($irecovery -q | grep -c '359.3.2')"
Expand Down Expand Up @@ -4478,13 +4470,14 @@ menu_restore() {
print "* iOS 1 may require the usage of ZiPhone: https://nitter.net/tihmstar/status/1734620913071542435"
echo
fi
if [[ $device_type == "iPod2,1" || $device_type == "iPhone2,1" ]] && [[ $device_newbr != 0 ]]; then
print "* New bootrom devices might be incompatible with some older iOS versions"
echo
elif [[ $device_type == "iPod2,1" ]]; then
if [[ $device_type == "iPod2,1" ]]; then
print "* Select \"Other (Custom IPSW)\" to restore to any iOS version (2.1.1 to 3.0)"
echo
fi
if [[ $device_type == "iPod2,1" || $device_type == "iPhone2,1" ]] && [[ $device_newbr != 0 ]]; then
print "* New bootrom devices might be incompatible with older iOS versions"
echo
fi
fi
input "Select an option:"
select opt in "${menu_items[@]}"; do
Expand Down Expand Up @@ -4525,7 +4518,7 @@ menu_restore_more() {
print " > Main Menu > Restore/Downgrade"
fi
if [[ -z $1 && $device_type == "iPod2,1" && $device_newbr != 0 ]]; then
warn "These versions are for old bootrom devices only. They will not work on your device"
warn "These versions are for old bootrom devices only. They may not work on your device"
echo
fi
input "Select an option:"
Expand Down

0 comments on commit 8b1da36

Please sign in to comment.