From 336529b961c26b832253092a5c01d4e9ebae245d Mon Sep 17 00:00:00 2001 From: Nebula Date: Fri, 18 Nov 2022 22:10:17 -0500 Subject: [PATCH] this should grab the correct build id --- palera1n.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/palera1n.sh b/palera1n.sh index bef0787..bb9a5e9 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -433,13 +433,20 @@ deviceid=$(_info recovery PRODUCT) if [ ! "$ipsw" = "" ]; then ipswurl=$ipsw else - buildid=$(curl -sL https://api.ipsw.me/v4/ipsw/$version | "$dir"/jq '.[0] | .buildid' --raw-output) + #buildid=$(curl -sL https://api.ipsw.me/v4/ipsw/$version | "$dir"/jq '.[0] | .buildid' --raw-output) if [[ "$deviceid" == *"iPad"* ]]; then os=iPadOS + device=iPad + elif [[ "$deviceid" == *"iPod"* ]]; then + os=iOS + device=iPod else os=iOS + device=iPhone fi - ipswurl=$(curl -sL https://api.appledb.dev/ios/$os\;$buildid.json | "$dir"/jq -r .devices[\"$deviceid\"].ipsw) + + buildid=$(curl -sL https://api.ipsw.me/v4/ipsw/$version | "$dir"/jq '[.[] | select(.identifier | startswith("'$device'")) | .buildid][0]' --raw-output) + ipswurl=$(curl -sL https://api.appledb.dev/ios/$os\;$buildid.json | "$dir"/jq -r .devices\[\"$deviceid\"\].ipsw) fi # Have the user put the device into DFU