From 096501374f12aa7865fe9ac6b33b5ea385ae9d9d Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Fri, 1 Sep 2023 22:42:55 +0800 Subject: [PATCH] Send WTF.s5l8900xall before iBSS for sshrd idevicerestore can send WTF.s5l8900xall, so that is used here --- restore.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/restore.sh b/restore.sh index 3f1d855..f5b801d 100755 --- a/restore.sh +++ b/restore.sh @@ -3073,8 +3073,24 @@ device_ramdisk() { mv iBSS iBEC AppleLogo.dec DeviceTree.dec Kernelcache.dec Ramdisk.dmg $ramdisk_path 2>/dev/null - if [[ $device_proc == 4 || $1 == "jailbreak" ]]; then + if [[ $1 == "jailbreak" ]]; then device_enter_mode pwnDFU + elif [[ $device_proc == 4 ]] || [[ $device_proc == 6 && $platform == "macos" ]]; then + device_buttons + elif [[ $device_proc == 1 ]]; then + local ipswj="../${device_type}_3.1.3_7E18_Custom" + if [[ -e "${ipswj}J.ipsw" ]]; then + ipswj="${ipswj}J" + elif [[ -e "${ipswj}HJ.ipsw" ]]; then + ipswj="${ipswj}HJ" + else + warn "Cannot detect 3.1.3 custom IPSW for $device_type." + print "* To proceed, you need to create a 3.1.3 custom IPSW with the jailbreak option enabled." + print "* Go to: Other Utilities -> Create Custom IPSW -> 3.1.3" + return + fi + device_enter_mode DFU + $idevicerestore -p "$ipswj.ipsw" else device_enter_mode kDFU fi