options plist fixes

This commit is contained in:
LukeZGD 2024-05-15 23:16:14 +08:00
parent 708c187c5f
commit 061eaafcbb

View File

@ -3136,11 +3136,10 @@ ipsw_prepare_ios4multipart() {
ipsw_prepare_jailbreak $iboot ipsw_prepare_jailbreak $iboot
mv "$ipsw_custom.ipsw" temp.ipsw mv "$ipsw_custom.ipsw" temp.ipsw
rm asr* iBSS* iBEC* ramdisk* *.dmg 2>/dev/null rm asr* iBSS* iBEC* ramdisk* *.dmg 2>/dev/null
options_plist="options" options_plist="options.plist"
if [[ $device_type == "iPad1,1" && $device_target_vers == "4"* ]]; then if [[ $device_type == "iPad1,1" && $device_target_vers == "4"* ]]; then
options_plist+=".$device_model" options_plist="options.$device_model.plist"
fi fi
options_plist+=".plist"
vers="4.2.1" vers="4.2.1"
build="8C148" build="8C148"
@ -3199,11 +3198,7 @@ ipsw_prepare_ios4multipart() {
done done
log "Grow ramdisk" log "Grow ramdisk"
if [[ $device_type == "iPad1,1" ]]; then
"$dir/hfsplus" RestoreRamdisk.dec grow 25000000
else
"$dir/hfsplus" RestoreRamdisk.dec grow 18000000 "$dir/hfsplus" RestoreRamdisk.dec grow 18000000
fi
log "Patch ASR" log "Patch ASR"
cp ../resources/firmware/FirmwareBundles/Down_${device_type}_${vers}_${build}.bundle/asr.patch . cp ../resources/firmware/FirmwareBundles/Down_${device_type}_${vers}_${build}.bundle/asr.patch .
@ -3215,12 +3210,6 @@ ipsw_prepare_ios4multipart() {
"$dir/xpwntool" ramdisk2.orig ramdisk2.dec "$dir/xpwntool" ramdisk2.orig ramdisk2.dec
"$dir/hfsplus" ramdisk2.dec extract usr/local/share/restore/$options_plist "$dir/hfsplus" ramdisk2.dec extract usr/local/share/restore/$options_plist
if [[ $device_type == "iPad1,1" && $device_target_vers == "3.2"* ]]; then
options_plist="options.k48.plist"
rm $options_plist
mv options.plist $options_plist
fi
log "Modify options.plist" log "Modify options.plist"
"$dir/hfsplus" RestoreRamdisk.dec rm usr/local/share/restore/$options_plist "$dir/hfsplus" RestoreRamdisk.dec rm usr/local/share/restore/$options_plist
cat $options_plist | sed '$d' | sed '$d' > options2.plist cat $options_plist | sed '$d' | sed '$d' > options2.plist
@ -3246,12 +3235,12 @@ ipsw_prepare_tethered() {
local name local name
local iv local iv
local key local key
options_plist="options" local options_plist="options.$device_model.plist"
if [[ $device_type == "iPad1,1" && $device_target_vers == "4"* ]] || if [[ $device_type == "iPad1,1" && $device_target_vers == "4"* ]]; then
[[ $device_target_vers != "3"* && $device_target_vers != "4"* ]]; then :
options_plist+=".$device_model" elif [[ $device_target_vers == "3"* || $device_target_vers == "4"* ]]; then
options_plist="options.plist"
fi fi
options_plist+=".plist"
if [[ -e "$ipsw_custom.ipsw" ]]; then if [[ -e "$ipsw_custom.ipsw" ]]; then
log "Found existing Custom IPSW. Skipping IPSW creation." log "Found existing Custom IPSW. Skipping IPSW creation."
@ -6248,7 +6237,9 @@ menu_other() {
;; ;;
iPhone[23],1 ) menu_items+=("Hacktivate Device");; iPhone[23],1 ) menu_items+=("Hacktivate Device");;
esac esac
menu_items+=("Revert Hacktivation") case $device_type in
iPhone1* | iPhone[23],1 ) menu_items+=("Revert Hacktivation");;
esac
;; ;;
esac esac
menu_items+=("Shutdown Device" "Restart Device" "Enter Recovery Mode") menu_items+=("Shutdown Device" "Restart Device" "Enter Recovery Mode")