From ac6fbf9efc1a769b5dd6147b2e00ff820a76ee11 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Fri, 26 Jul 2024 10:47:23 +0800 Subject: [PATCH] Show "Jailbreak Device" option to S5L8900 devices, and redirect them to the correct option for jailbreaking, and fix iPhone1,2 error --- restore.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/restore.sh b/restore.sh index 6e7a71f..9a14869 100755 --- a/restore.sh +++ b/restore.sh @@ -2649,7 +2649,7 @@ ipsw_prepare_keys() { local name=$(echo $fw_key | $jq -j '.keys[] | select(.image == "'$getcomp'") | .filename') local iv=$(echo $fw_key | $jq -j '.keys[] | select(.image == "'$getcomp'") | .iv') local key=$(echo $fw_key | $jq -j '.keys[] | select(.image == "'$getcomp'") | .key') - if [[ -z $name ]]; then + if [[ -z $name && $device_proc != 1 ]]; then error "Issue with firmware keys: Failed getting $getcomp. Check The Apple Wiki or your wikiproxy" fi @@ -6020,7 +6020,7 @@ menu_main() { input "Select an option:" if [[ $device_mode != "none" ]]; then menu_items+=("Restore/Downgrade") - if (( device_proc < 7 )) && [[ $device_proc != 1 ]]; then + if (( device_proc < 7 )); then menu_items+=("Jailbreak Device") fi fi @@ -7614,7 +7614,11 @@ device_alloc8() { } device_jailbreak() { - if [[ $device_vers == *"iBoot"* || $device_vers == "Unknown"* ]]; then + if [[ $device_proc == 1 ]]; then + print "* The \"Jailbreak Device\" option is not supported for this device." + print "* To jailbreak, go to \"Restore/Downgrade\" instead, select 4.1 or 3.1.3, then enable the jailbreak option." + return + elif [[ $device_vers == *"iBoot"* || $device_vers == "Unknown"* ]]; then read -p "$(input 'Enter current iOS version (eg. 6.1.3): ')" device_vers else case $device_vers in