Skip to content

Commit cfb3630

Browse files
committed
Update restore.sh
1 parent 4ccec2c commit cfb3630

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

restore.sh

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,17 +1481,17 @@ device_get_info() {
14811481
device_latest_build="20H360"
14821482
;;
14831483
iPad7,[123456] )
1484-
device_latest_vers="17.7.9"
1485-
device_latest_build="21H446"
1484+
device_latest_vers="17.7.10"
1485+
device_latest_build="21H450"
14861486
;;
14871487
iPad7,1[12] )
1488-
device_latest_vers="18.6"
1489-
device_latest_build="22G86"
1488+
device_latest_vers="18.6.2"
1489+
device_latest_build="22G100"
14901490
;;
14911491
esac
14921492
if (( device_proc > 10 )) && [[ $platform == "linux" ]]; then
1493-
device_latest_vers="18.6"
1494-
device_latest_build="22G86"
1493+
device_latest_vers="18.6.2"
1494+
device_latest_build="22G100"
14951495
# log "Getting latest iOS version for $device_type"
14961496
# rm -f tmp.json
14971497
# $aria2c "https://api.ipsw.me/v4/device/$device_type?type=ipsw" -o tmp.json >/dev/null
@@ -2463,6 +2463,7 @@ ipsw_nojailbreak_message() {
24632463
ipsw_preference_set() {
24642464
# sets ipsw variables: ipsw_jailbreak, ipsw_memory, ipsw_verbose
24652465
case $device_latest_vers in
2466+
10* ) ipsw_gasgauge_patch=;;
24662467
[76543]* ) ipsw_canjailbreak=1;;
24672468
esac
24682469
if (( device_proc >= 7 )) || [[ $device_target_vers == "$device_latest_vers" && $ipsw_canjailbreak != 1 && $ipsw_gasgauge_patch != 1 ]]; then
@@ -5210,12 +5211,13 @@ restore_futurerestore() {
52105211
restore_latest() {
52115212
local idevicerestore2="$idevicerestore"
52125213
local ExtraArgs="-e"
5214+
[[ $1 == "update" ]] && ExtraArgs=
52135215
if [[ $device_latest_vers == "12"* || $device_latest_vers == "15"* || $device_latest_vers == "16"* || $device_checkm8ipad == 1 ]]; then
52145216
idevicerestore2+="2"
5215-
ExtraArgs+="y"
5217+
ExtraArgs+=" -y"
52165218
fi
52175219
if [[ $1 == "custom" ]]; then
5218-
ExtraArgs+="c"
5220+
ExtraArgs+=" -c"
52195221
ipsw_path="$ipsw_custom"
52205222
ipsw_extract custom
52215223
else
@@ -5230,16 +5232,14 @@ restore_latest() {
52305232
log "Sending iBSS..."
52315233
$irecovery -f "$ipsw_custom/Firmware/dfu/iBSS.${device_model}ap.RELEASE.dfu"
52325234
device_find_mode Recovery
5233-
else
5234-
ExtraArgs="-e"
52355235
fi
52365236
elif [[ $device_proc == 1 && $device_target_vers == "3.1.3" && $mode == "customipsw" ]]; then
52375237
log "Sending iBSS..."
52385238
$irecovery -f "$ipsw_custom/Firmware/dfu/iBSS.${device_model}ap.RELEASE.dfu"
52395239
device_find_mode Recovery
52405240
fi
52415241
if [[ $debug_mode == 1 ]]; then
5242-
ExtraArgs+="d"
5242+
ExtraArgs+=" -d"
52435243
fi
52445244
log "Running idevicerestore with command: $idevicerestore2 $ExtraArgs \"$ipsw_path.ipsw\""
52455245
$idevicerestore2 $ExtraArgs "$ipsw_path.ipsw"
@@ -8347,6 +8347,9 @@ menu_ipsw() {
83478347
print "* Selected Target IPSW: $ipsw_path.ipsw"
83488348
ipsw_print_warnings
83498349
menu_items+=("$start")
8350+
if [[ $device_target_vers == "$device_latest_vers" ]]; then
8351+
menu_items+=("Start Update")
8352+
fi
83508353
elif [[ $device_proc == 1 && $device_type != "iPhone1,2" ]]; then
83518354
menu_items+=("$start")
83528355
else
@@ -8420,6 +8423,17 @@ menu_ipsw() {
84208423
case $selected in
84218424
"Create IPSW" ) mode="custom-ipsw";;
84228425
"$start" ) mode="downgrade";;
8426+
"Start Update" )
8427+
print "* The \"Start Update\" will perform an update to your device without clearing device data."
8428+
print "* One usage of this is to carry over activation records to the latest iOS version."
8429+
warn "This option should NOT be used if your device is jailbroken."
8430+
warn "This option is not recommended to be used unless you know what you are doing."
8431+
select_yesno
8432+
if [[ $? != 1 ]]; then
8433+
continue
8434+
fi
8435+
mode="restore-update"
8436+
;;
84238437
"Select Target IPSW" ) menu_ipsw_browse "$1";;
84248438
"Select Base IPSW" ) menu_ipsw_browse "base";;
84258439
"Select Target SHSH" ) menu_shsh_browse "$1";;
@@ -10480,6 +10494,7 @@ main() {
1048010494
print " > ./restore.sh --activation-records"
1048110495
fi
1048210496
;;
10497+
"restore-update" ) restore_latest update;;
1048310498
"kdfu" ) device_enter_mode kDFU;;
1048410499
"ramdisknvram" ) device_ramdisk clearnvram;;
1048510500
"pwned-ibss" ) device_enter_mode pwnDFU;;

0 commit comments

Comments
 (0)