From 9380b48e5c3c93191a5a98fc1440bb5c94e439cc Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:51:05 +0800 Subject: [PATCH] raw dump stuff, custom ipsw select check, fr tss ip update details on "fr tss ip update": the ip address urls being used by idevicerestore, tsschecker, and futurerestore for tss are "17.171.36.30" and "17.151.36.30", both are dead. the hex edits done to the binaries in b416862 and this commit change these dead ip's to "17.111.103.65" and "17.111.103.15". --- bin/linux/arm64/futurerestore_new | Bin 3238760 -> 3238760 bytes bin/linux/arm64/futurerestore_old | Bin 2292432 -> 2292432 bytes bin/linux/armhf/futurerestore_new | Bin 2821184 -> 2821184 bytes bin/linux/armhf/futurerestore_old | Bin 2011204 -> 2011204 bytes bin/linux/x86_64/futurerestore_new | Bin 2575456 -> 2575456 bytes bin/linux/x86_64/futurerestore_old | Bin 1899840 -> 1899840 bytes bin/macos/futurerestore_new | Bin 1355096 -> 1355096 bytes bin/macos/futurerestore_old | Bin 3241272 -> 3241272 bytes restore.sh | 27 +++++++++++++++++++++------ 9 files changed, 21 insertions(+), 6 deletions(-) diff --git a/bin/linux/arm64/futurerestore_new b/bin/linux/arm64/futurerestore_new index fd9c22fcf0926b924d0a9cdb441dfdbc30f23074..7ce67b71d87898e468acb089b7f0e8c7f60694ed 100755 GIT binary patch delta 230 zcmYk$w++Hz6aZnFY`|c027}4rx1W$fVkFN%LGdI;Ut)0)w&<}|N`m;H?0OAyG}h=`H!Xim}N8{59~mn6EAP(%r3IH;fs7d6z;Koc#r n(LonI^fAB?BaAVDhbd<8F~%2AB1$Nuf+}jLqk$$`XrqHJ hdgx;SA47~V#spK$FvkK*tnh!?V2d60I5=&O=O0gnK7RlJ diff --git a/bin/linux/arm64/futurerestore_old b/bin/linux/arm64/futurerestore_old index 8b6f8b58defefeb863c1da2a73310b35f29f81e7..de1f7e79b3f6a8332437a1ab1c1cebf79d7cbde9 100755 GIT binary patch delta 173 zcmYkwISztQ6hP5{6AmEGBMRDod@*R^j{YtzUP57GXX7$V+y)C^8Pao0i_@H8{ z>Zq#?ZE8!~+WB~I8{X1Xu0}+RoX+Nwy-MpH{lAhdr_eRa%930FLq#$yz~UtqHg+^F!^CY+vJnzWZgG-Rw{KPB zDM|)1l#w{%%J`?hM%gOO_1($Jvar>IzB;2Z!4xyhv4963O9WUU#2OoHvBMq*9C1Q~ O7-w9N;QH^(t@-qFUq^oc diff --git a/bin/linux/armhf/futurerestore_new b/bin/linux/armhf/futurerestore_new index 6a2956f125d5ee7074105ca29555e242659950e0..d121264facd1029c09042dc8db061f3b17e1d62f 100755 GIT binary patch delta 209 zcmYkww++Hj6hKj#V4}g~WTMH%H&4hQF%6?oJc$vYWB^JeT94ul{tDcZ;xs3DzMTX& zbu^<{&1wGQzN~+VA~_ooF>*MXQ~XG+8+v~w@tr~eMU+rR1yy*cp$;DnG|@sE9dyw{ f9|H_ALVz(Qm|})G76`G#3Ttez#qOKh{WbUjf3R#& delta 194 zcmWm8w++HT7(n4W!eN5R!GMj)N$kN2j6jKG58&dL7{QbbK#4@_jgHnGkK!v{_p--J zXGla#L5fn6^4mPEj?&ZD>>Z`lHI8pldZF&QHK@Qr6*bh+fQu$tXrqHJdgx<-Ax7{p e#spLN2rxs4ITl!Ag*7(VVu%0B;gj3r+5Z8$C~hhM diff --git a/bin/linux/armhf/futurerestore_old b/bin/linux/armhf/futurerestore_old index f00f562b67653d1c06fd0eb5262f267c5d71b874..6e2b8f3f30bdcbdbf81bea3626b027fa0dbf6314 100755 GIT binary patch delta 174 zcmY+($qB+h6oBDz8+Q}e7`GB8K12mQ*p5fR5hN!M4=lk(1RF>L=^&-}gC`H)>C1{V zE7FISw5%1aYVB?BK0G9e?45`>S#R8K`#Rlh92sNI-e3Mxe)-J3MI8+^(Lx&?bkReA a5Pb|V#0XPx# diff --git a/bin/linux/x86_64/futurerestore_new b/bin/linux/x86_64/futurerestore_new index 8a3c10fe080502be71858c2057f74d0c2a47ab28..0f6da69c081d27f3a1d3f8c5d88b22b3b4ec400c 100755 GIT binary patch delta 195 zcmZ9=I}QO+6oBE3_w}6dehtH*yyHZW=q%vwNpTXzEP%!?BvzuIm54vlDZb{*?hh}+ zMLo@FUJF{(l9sjdG~)bIlE~4Dh?VWm9`?7hGvVLLZ?CB{sG^2C8fc;g9|79vpo<>* c7+{DI#+YD=5HrjXVSy!LtgwEiZu94mjk9V@^2b WjB_ryF7M2#)7Pc1lEgT$$)B6fJ*f|Xi^$ZP+^~_AC7Z!4;z_^BB zu0nfiAqNn10x=g5a|1CC5c2{t9}x2cu>cSY0=rH0i_@% delta 125 zcmWN?yA6V16oAoyh!;eVm!dKN1v9b3&A))fO(;lgS;WM|idh(gimy01%jTBNz0EV< y4i?zaLOXp$)N}JkrKi72Hx4R@5aWyl7o^B=MUDa`D%7~)js_1r@%jzguG0=k8!eFl diff --git a/bin/macos/futurerestore_new b/bin/macos/futurerestore_new index ee12132bd2ac4b32fbba6f84ebc5d2598456c1f8..af1ef9f0b9838247f81f088c574a34e6e8717536 100755 GIT binary patch delta 116 zcmca{E9l0ppoSL47N!>F7M2#)7Pc1l7LFFq7OpMa273go^z{wR^$ZOS^$ZP+^~_AC xf84_@IsM)qZf;Jfm?1)py}fr2HxTmxF)tAF0Wm)i3jnbo5DRVZ-6MSZ0{~kkESvxU delta 91 zcmca{E9l0ppoSL47N!>F7M2#)7Pc1l7LFFq7OpMa274Hbr*GTCt;1PtrLS*ju4iaE lecv8#_4eL9+(66&#JoVv2gLk9EC9rUKrFPqcaQMt4**G1C0qai diff --git a/bin/macos/futurerestore_old b/bin/macos/futurerestore_old index 08cc81b368dc035d9155c1756b334cd4f008857d..d0577cfa399c4423d6aab1cac91ca068aa596be5 100755 GIT binary patch delta 193 zcmY+&$qfNv0EXe%jo-d+GxnV^e}q1i;UY?KcoQXPL_!0SsYMmO#L3~gJg?6?@{%hN zqQr=kAW4ce4jBwta^xvcq(qqtRch2}(4pS> znhaTTxa28N#Nbh)Oob{n>NIH5qD_Y`J^Bn7GJ4vpacwWuf&`#=RebjJSzYI diff --git a/restore.sh b/restore.sh index e9dfec62..2adff532 100755 --- a/restore.sh +++ b/restore.sh @@ -4772,8 +4772,9 @@ shsh_save_onboard64() { if [[ ! -s $shsh ]]; then warn "Failed to convert raw dump to SHSH." if [[ -s dump.raw ]]; then - mv dump.raw ../saved/rawdump_$device_ecid-$device_type-$device_target_vers.raw - log "Raw dump saved at: ../saved/rawdump_$device_ecid-$device_type-$device_target_vers-$(date +%Y-%m-%d-%H%M).raw" + local raw="../saved/shsh/rawdump_$device_ecid-$device_type-$device_target_vers-$(date +%Y-%m-%d-%H%M).raw" + mv dump.raw $raw + log "Raw dump saved at: $raw" warn "This raw dump is not usable for restoring, you need to convert it first." print "* If unable to be converted, this dump is likely not usable for restoring." fi @@ -4810,8 +4811,9 @@ shsh_save_onboard() { if [[ $? != 0 ]]; then warn "Saved SHSH blobs might be invalid. Did you select the correct IPSW?" if [[ -s dump.raw ]]; then - mv dump.raw ../saved/rawdump_$device_ecid-$device_type-$device_target_vers.raw - log "Raw dump saved at: ../saved/rawdump_$device_ecid-$device_type-$device_target_vers-$(date +%Y-%m-%d-%H%M).raw" + local raw="../saved/shsh/rawdump_$device_ecid-$device_type-$device_target_vers-$(date +%Y-%m-%d-%H%M).raw" + mv dump.raw $raw + log "Raw dump saved at: $raw" warn "This raw dump is not usable for restoring, you need to convert it first." print "* If unable to be converted, this dump is likely not usable for restoring." fi @@ -4838,7 +4840,7 @@ shsh_convert_onboard() { if [[ ! -s dump.shsh ]]; then error "Converting onboard SHSH blobs failed." fi - local shsh="../saved/shsh/converted-$device_ecid-$device_type-$(date +%Y-%m-%d-%H%M).shsh" + local shsh="../saved/shsh/converted_$device_ecid-$device_type-$(date +%Y-%m-%d-%H%M).shsh" mv dump.shsh $shsh log "Successfully saved $device_target_vers blobs: $shsh" } @@ -5140,6 +5142,8 @@ menu_shsh_convert() { if [[ -n $shsh_path ]]; then print "* Selected dump: $shsh_path" menu_items+=("Convert Raw Dump") + else + print "* Select raw dump file to continue" fi menu_items+=("Go Back") echo @@ -5442,7 +5446,7 @@ menu_ipsw() { print "* Selected Target IPSW: $ipsw_path.ipsw" print "* Target Version: $device_target_vers-$device_target_build" case $device_target_build in - 7* | 8[CE]* ) warn "Selected target version will restore but is most likely not functional.";; + 7* | 8[CE]* ) warn "Selected target version will restore but will most likely not boot.";; esac else print "* Select Target IPSW to continue" @@ -5697,6 +5701,7 @@ menu_logo_browse() { menu_ipsw_browse() { local versionc local newpath + local ipswcc=0 local text="target" [[ $1 == "base" ]] && text="base" @@ -5706,6 +5711,16 @@ menu_ipsw_browse() { [[ ! -s "$newpath" ]] && return newpath="${newpath%?????}" log "Selected IPSW file: $newpath.ipsw" + if (( device_proc < 7 )); then + ipswcc="$(unzip -l "$newpath.ipsw" | grep -c 20[23])" + fi + if [[ $1 != "custom" && $ipswcc != 0 ]]; then + warn "Custom IPSW selected, cannot continue." + print "* Do NOT select a custom IPSW for this selection." + print "* Please select the original IPSW for the IPSW selection." + pause + return + fi ipsw_version_set "$newpath" "$1" if [[ $(cat Restore.plist | grep -c $device_type) == 0 ]]; then log "Selected IPSW is not for your device $device_type."