From ec6cf3fd54517d99da467895428f7e3e3701d16f Mon Sep 17 00:00:00 2001 From: plooshi <95927318+plooshi@users.noreply.github.com> Date: Fri, 18 Nov 2022 14:07:26 -0500 Subject: [PATCH] fix not being able to get iPSW url (#241) --- palera1n.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/palera1n.sh b/palera1n.sh index 5255bff..bc1ce98 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -433,7 +433,13 @@ deviceid=$(_info recovery PRODUCT) if [ ! "$ipsw" = "" ]; then ipswurl=$ipsw else - ipswurl=$(curl -sL "https://api.ipsw.me/v4/device/$deviceid?type=ipsw" | "$dir"/jq '.firmwares | .[] | select(.version=="'"$version"'") | .url' --raw-output) + buildid=$(curl -sL https://api.ipsw.me/v4/ipsw/15.7.1 | jq '.[0] | .buildid' --raw-output) + if [[ "$deviceid" == *"iPad"* ]]; then + os=iPadOS + else + os=iOS + fi + ipswurl=$(curl -sL https://api.appledb.dev/ios/$os\;$buildid.json | jq -r .devices[\"$deviceid\"].ipsw) fi # Have the user put the device into DFU