skip baseband if the device doesn have it

This commit is contained in:
edwin 2023-03-23 10:02:41 -04:00
parent 028cb2765a
commit 388dad02fc

View file

@ -288,7 +288,7 @@ EOF
rm -rf /tmp/futurerestore/ rm -rf /tmp/futurerestore/
"$dir"/futurerestore -t blobs/"$deviceid"-"$version".shsh2 --use-pwndfu --skip-blob \ "$dir"/futurerestore -t blobs/"$deviceid"-"$version".shsh2 --use-pwndfu --skip-blob \
--rdsk work/rdsk.im4p --rkrn work/rkrn.im4p \ --rdsk work/rdsk.im4p --rkrn work/rkrn.im4p \
--latest-sep `if [ ! "$hasBaseband" = "true" ]; then echo "--latest-baseband" else "--no-baseband"; fi` $ipsw --latest-sep $HasBaseband $ipsw
} }
_boot() { _boot() {
@ -583,9 +583,9 @@ if [ "$downgrade" = "1" ]; then
done done
if [ "$(remote_cmd "/usr/bin/mgask HasBaseband | grep -E 'true|false'")" = "true" ]; then if [ "$(remote_cmd "/usr/bin/mgask HasBaseband | grep -E 'true|false'")" = "true" ]; then
HasBaseband='true' HasBaseband='--latest-baseband'
else else
HasBaseband='false' HasBaseband='--no-baseband'
fi fi
remote_cmd "/usr/bin/mount_filesystems" remote_cmd "/usr/bin/mount_filesystems"
@ -712,6 +712,7 @@ if [ "$downgrade" = "1" ]; then
fi fi
if [ "$os" = 'Darwin' ]; then if [ "$os" = 'Darwin' ]; then
hdiutil resize -size 258MB work/ramdisk.dmg
hdiutil attach work/ramdisk.dmg -mountpoint /tmp/SSHRD hdiutil attach work/ramdisk.dmg -mountpoint /tmp/SSHRD
mounted="/tmp/SSHRD" mounted="/tmp/SSHRD"
@ -735,7 +736,7 @@ if [ "$downgrade" = "1" ]; then
hdiutil detach -force /tmp/SSHRD hdiutil detach -force /tmp/SSHRD
hdiutil resize -sectors min work/ramdisk.dmg hdiutil resize -sectors min work/ramdisk.dmg
else else
"$dir"/hfsplus work/ramdisk.dmg grow 210000000 > /dev/null "$dir"/hfsplus work/ramdisk.dmg grow 300000000 > /dev/null
"$dir"/hfsplus work/ramdisk.dmg extract /usr/sbin/asr work/asr "$dir"/hfsplus work/ramdisk.dmg extract /usr/sbin/asr work/asr
"$dir"/asr64_patcher work/asr work/patched_asr "$dir"/asr64_patcher work/asr work/patched_asr
"$dir"/ldid -e work/asr > work/asr.plist "$dir"/ldid -e work/asr > work/asr.plist