Skip to content

Commit 6ddd6dc

Browse files
committed
An update
1 parent c69d808 commit 6ddd6dc

1 file changed

Lines changed: 24 additions & 26 deletions

File tree

restore.sh

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,8 +1594,8 @@ device_get_info() {
15941594
device_latest_build="21H450"
15951595
;;
15961596
iPad7,1[12] | iPhone11,* )
1597-
device_latest_vers="18.7.4"
1598-
device_latest_build="22H218"
1597+
device_latest_vers="18.7.5"
1598+
device_latest_build="22H311"
15991599
;;
16001600
esac
16011601
# if latest vers is not set, copy use vers to latest
@@ -2275,9 +2275,7 @@ device_pwnerror() {
22752275
error_msg+=$'\n* Troubleshooting links:
22762276
- https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Troubleshooting
22772277
- https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Pwning-Using-Another-iOS-Device'
2278-
if [[ $platform == "linux" ]]; then
2279-
log "CPU: $platform_cpu"
2280-
fi
2278+
[[ $platform == "linux" ]] && log "CPU: $platform_cpu"
22812279
error "Failed to enter pwnDFU mode. Please run the script again." "$error_msg"
22822280
}
22832281

@@ -4527,12 +4525,10 @@ ipsw_prepare_ios6touch3() {
45274525
local ipsw_base_path2="${device_type}_${device_base_vers}_${device_base_build}_Restore"
45284526
local ipsw_custom2="${device_type}_${device_target_vers}_${device_target_build}_Custom"
45294527
local jb
4530-
local kc="../saved/SundanceResources.b64"
4531-
local kc_sha1="ebf508aff198fa80204bf3d6df0114e9b645f1c0"
4532-
local kc_url="https://gist.githubusercontent.com/NyanSatan/1cf6921821484a2f8f788e567b654999/raw/54c6ad7554710af454c87ec2d99f869e6e669c99/SundanceResources.b64"
4533-
if [[ $ipsw_jailbreak == 1 ]]; then
4534-
jb="-j"
4535-
fi
4528+
[[ $ipsw_jailbreak == 1 ]] && jb="-j"
4529+
local sr="../saved/SundanceResources.b64"
4530+
local sr_sha1="ebf508aff198fa80204bf3d6df0114e9b645f1c0"
4531+
local sr_url="https://gist.githubusercontent.com/NyanSatan/1cf6921821484a2f8f788e567b654999/raw/54c6ad7554710af454c87ec2d99f869e6e669c99/SundanceResources.b64"
45364532

45374533
if [[ -e "$ipsw_custom.ipsw" ]]; then
45384534
log "Found existing Custom IPSW. Skipping IPSW creation."
@@ -4556,27 +4552,27 @@ ipsw_prepare_ios6touch3() {
45564552
git clone $repo $sundance
45574553
fi
45584554

4559-
if [[ -s $kc ]]; then
4560-
if [[ $($sha1sum $kc 2>/dev/null | awk '{print $1}') != "$kc_sha1" ]]; then
4561-
rm $kc
4555+
if [[ -s $sr ]]; then
4556+
if [[ $($sha1sum $sr 2>/dev/null | awk '{print $1}') != "$sr_sha1" ]]; then
4557+
rm $sr
45624558
fi
45634559
fi
45644560

4565-
if [[ ! -s $kc ]]; then
4566-
log "Downloading resources: $(basename $kc)"
4567-
download_from_url "$kc_url" "$kc"
4561+
if [[ ! -s $sr ]]; then
4562+
log "Downloading resources: $(basename $sr)"
4563+
download_from_url "$sr_url" "$sr"
45684564
fi
45694565

4570-
if [[ $($sha1sum $kc 2>/dev/null | awk '{print $1}') != "$kc_sha1" ]]; then
4571-
rm $kc
4572-
error "Downloading/verifying kernelcache failed. Please run the script again"
4566+
if [[ $($sha1sum $sr 2>/dev/null | awk '{print $1}') != "$sr_sha1" ]]; then
4567+
rm $sr
4568+
error "Downloading/verifying resources failed. Please run the script again"
45734569
fi
45744570

45754571
log "Preparing resources"
45764572
if [[ $platform == "macos" ]]; then
4577-
cat $kc | base64 --decode | tar -xvf -
4573+
cat $sr | base64 --decode | tar -xvf -
45784574
else
4579-
base64 --decode $kc | xz -d | tar -xvf -
4575+
base64 --decode $sr | xz -d | tar -xvf -
45804576
fi
45814577
mv artifacts/* $sundance/artifacts/
45824578
mv resources/* $sundance/resources/
@@ -4598,6 +4594,7 @@ ipsw_prepare_ios6touch3() {
45984594
popd >/dev/null
45994595
rm -rf "$ipsw_custom2"
46004596
popd >/dev/null
4597+
# "re-patch" ibss and ibec with iboot32patcher to make this work in kdfu
46014598
mv "$ipsw_custom.ipsw" temp.ipsw
46024599
ipsw_prepare_ios4patches
46034600
log "Add all to custom IPSW"
@@ -4812,7 +4809,7 @@ ipsw_prepare_multipatch() {
48124809
if [[ $ipsw_prepare_ios4multipart_patch == 1 || $device_target_tethered == 1 ]]; then
48134810
printf "<key>FlashNOR</key><false/>\n" >> options2.plist
48144811
fi
4815-
if [[ -n $device_disable_bbupdate && $(cat options2.plist | grep -c "UpdateBaseband") == 0 ]]; then
4812+
if [[ $device_type == "$device_disable_bbupdate" && $(cat options2.plist | grep -c "UpdateBaseband") == 0 ]]; then
48164813
printf "<key>UpdateBaseband</key><false/>\n" >> options2.plist
48174814
fi
48184815
printf "</dict>\n</plist>\n" >> options2.plist
@@ -8654,7 +8651,7 @@ ipsw_latest_set() {
86548651
iPhone10,[36] ) ipsw_prefix="iPhone10,3,iPhone10,6";;
86558652
iPhone11,[246] ) ipsw_prefix="iPhone11,2,iPhone11,4,iPhone11,6";;
86568653
iPod[79],1 ) ipsw_prefix="iPodtouch";;
8657-
iPad4,[789] | iPad5* ) ipsw_prefix="iPad_64bit_TouchID";;
8654+
iPad4,[789] | iPad5,* ) ipsw_prefix="iPad_64bit_TouchID";;
86588655
iPad6,1[12] | iPad7,[56] ) ipsw_prefix="iPad_64bit_TouchID_ASTC";;
86598656
iPhone6,[12] | iPhone8,4 ) ipsw_prefix="iPhone_4.0_64bit";;
86608657
iPhone7,1 | iPhone8,2 ) ipsw_prefix="iPhone_5.5";;
@@ -9156,7 +9153,7 @@ menu_ipsw_special() {
91569153
device_model_special="n92"
91579154
device_target_tethered=1
91589155
;;
9159-
6.* ) # for touch 3
9156+
6.* ) # for touch 3 and ipad 1
91609157
case $device_type in
91619158
iPod3,1 ) device_type_special="iPhone2,1"; device_model_special="n88";;
91629159
iPad1,1 ) device_type_special="iPad2,1"; device_model_special="k93";;
@@ -9481,6 +9478,7 @@ menu_ipsw_browse() {
94819478
elif [[ $device_target_vers == "10"* && $device_proc == 6 && $device_target_other != 1 ]]; then
94829479
log "Selected IPSW ($device_target_vers) is not supported as target version."
94839480
print "* iOS 10 versions that are not 10.3.4 are not supported for 32-bit devices."
9481+
print "* The only exception is for restoring with 32-bit iOS 10 blobs."
94849482
pause
94859483
return
94869484
fi
@@ -10215,7 +10213,7 @@ device_jailbreak_confirm() {
1021510213
esac
1021610214
if [[ $platform == "linux" ]]; then
1021710215
case $device_vers in
10218-
6* | 10* ) print "* Note: If you need to sideload, you can use Legacy iOS Kit's \"Sideload IPA\" option.";;
10216+
[689]* | 10* ) print "* Note: If you need to sideload, you can use Legacy iOS Kit's \"Sideload IPA\" option.";;
1021910217
esac
1022010218
fi
1022110219
fi

0 commit comments

Comments
 (0)