From 6fd336f084f2d889c7e8166df3e49698ec8579c0 Mon Sep 17 00:00:00 2001
From: LukeZGD <26163116+LukeZGD@users.noreply.github.com>
Date: Mon, 8 Jan 2024 17:03:47 +0800
Subject: [PATCH] Remove -e in echo for creating info plist
---
restore.sh | 116 ++++++++++++++++++++++++++---------------------------
1 file changed, 58 insertions(+), 58 deletions(-)
diff --git a/restore.sh b/restore.sh
index 85a4eeb..3d4add1 100755
--- a/restore.sh
+++ b/restore.sh
@@ -2085,50 +2085,50 @@ ipsw_prepare_keys() {
if [[ -z $name ]]; then
name="$getcomp.${device_model}ap.RELEASE.dfu"
fi
- echo -e "$compFileFirmware/dfu/$nameIV$ivKey$key" >> $NewPlist
+ echo "$compFileFirmware/dfu/$nameIV$ivKey$key" >> $NewPlist
if [[ $ipsw_prepare_usepowder == 1 ]]; then
- echo -e "Patch" >> $NewPlist
+ echo "Patch" >> $NewPlist
elif [[ -s $FirmwareBundle/$comp.${device_model}ap.RELEASE.patch ]]; then
- echo -e "Patch$comp.${device_model}ap.RELEASE.patch" >> $NewPlist
+ echo "Patch$comp.${device_model}ap.RELEASE.patch" >> $NewPlist
elif [[ -s $FirmwareBundle/$comp.${device_model}.RELEASE.patch ]]; then
- echo -e "Patch$comp.${device_model}.RELEASE.patch" >> $NewPlist
+ echo "Patch$comp.${device_model}.RELEASE.patch" >> $NewPlist
fi
;;
"iBoot" )
- echo -e "$compFileFirmware/all_flash/all_flash.${device_model}ap.production/$nameIV$ivKey$key" >> $NewPlist
- echo -e "Patch$comp.${device_model}ap.RELEASE.patch" >> $NewPlist
+ echo "$compFileFirmware/all_flash/all_flash.${device_model}ap.production/$nameIV$ivKey$key" >> $NewPlist
+ echo "Patch$comp.${device_model}ap.RELEASE.patch" >> $NewPlist
;;
"RestoreRamdisk" )
- echo -e "Restore RamdiskFile$nameIV$ivKey$key" >> $NewPlist
+ echo "Restore RamdiskFile$nameIV$ivKey$key" >> $NewPlist
;;
"RestoreDeviceTree" | "RestoreLogo" )
- echo -e "$compFileFirmware/all_flash/all_flash.${device_model}ap.production/$nameIV$ivKey$keyDecryptPathDowngrade/$comp" >> $NewPlist
+ echo "$compFileFirmware/all_flash/all_flash.${device_model}ap.production/$nameIV$ivKey$keyDecryptPathDowngrade/$comp" >> $NewPlist
;;
"RestoreKernelCache" )
- echo -e "$compFile$nameIV$ivKey$keyDecryptPathDowngrade/$comp" >> $NewPlist
+ echo "$compFile$nameIV$ivKey$keyDecryptPathDowngrade/$comp" >> $NewPlist
;;
"KernelCache" )
- echo -e "$compFile$nameIV$ivKey$keyDecryptPathDowngrade/$comp" >> $NewPlist
+ echo "$compFile$nameIV$ivKey$keyDecryptPathDowngrade/$comp" >> $NewPlist
if [[ $ipsw_prepare_usepowder == 1 ]]; then
- echo -e "Patch" >> $NewPlist
+ echo "Patch" >> $NewPlist
elif [[ -e $FirmwareBundle/kernelcache.release.patch ]]; then
- echo -e "Patchkernelcache.release.patch" >> $NewPlist
+ echo "Patchkernelcache.release.patch" >> $NewPlist
fi
;;
"WTF2" )
- echo -e "WTF 2FileFirmware/dfu/WTF.s5l8900xall.RELEASE.dfuPatchWTF.s5l8900xall.RELEASE.patch" >> $NewPlist
+ echo "WTF 2FileFirmware/dfu/WTF.s5l8900xall.RELEASE.dfuPatchWTF.s5l8900xall.RELEASE.patch" >> $NewPlist
;;
esac
if [[ $2 != "old" ]]; then
- echo -e "Decrypt" >> $NewPlist
+ echo "Decrypt" >> $NewPlist
fi
- echo -e "" >> $NewPlist
+ echo "" >> $NewPlist
}
ipsw_prepare_paths() {
@@ -2181,7 +2181,7 @@ ipsw_prepare_paths() {
str+="manifestmanifest"
fi
- echo -e "$str" >> $NewPlist
+ echo "$str" >> $NewPlist
}
ipsw_prepare_config() {
@@ -2291,21 +2291,21 @@ ipsw_prepare_bundle() {
RootSize=$(cat options.$device_model.plist | grep -i SystemPartitionSize -A 1 | grep -oPm1 "(?<=)[^<]+")
fi
RootSize=$((RootSize+30))
- echo -e $'\n\n' > $NewPlist
- echo -e "Filename$ipsw_p.ipsw" >> $NewPlist
- echo -e "RootFilesystem$(echo "$key" | $jq -j '.keys[] | select(.image == "RootFS") | .filename')" >> $NewPlist
- echo -e "RootFilesystemKey$(echo "$key" | $jq -j '.keys[] | select(.image == "RootFS") | .key')" >> $NewPlist
- echo -e "RootFilesystemSize$RootSize" >> $NewPlist
+ echo '' > $NewPlist
+ echo "Filename$ipsw_p.ipsw" >> $NewPlist
+ echo "RootFilesystem$(echo "$key" | $jq -j '.keys[] | select(.image == "RootFS") | .filename')" >> $NewPlist
+ echo "RootFilesystemKey$(echo "$key" | $jq -j '.keys[] | select(.image == "RootFS") | .key')" >> $NewPlist
+ echo "RootFilesystemSize$RootSize" >> $NewPlist
printf "RamdiskOptionsPath/usr/local/share/restore/options" >> $NewPlist
if [[ $device_target_vers != "3"* && $device_target_vers != "4"* ]] ||
[[ $device_type == "iPad1,1" && $device_target_vers == "4"* ]]; then
printf ".%s" "$device_model" >> $NewPlist
fi
- echo -e ".plist" >> $NewPlist
+ echo ".plist" >> $NewPlist
if [[ $1 == "base" ]]; then
- echo -e "SHA1$device_base_sha1" >> $NewPlist
+ echo "SHA1$device_base_sha1" >> $NewPlist
else
- echo -e "SHA1$device_target_sha1" >> $NewPlist
+ echo "SHA1$device_target_sha1" >> $NewPlist
fi
if [[ $1 == "base" ]]; then
@@ -2318,13 +2318,13 @@ ipsw_prepare_bundle() {
"11A"* | "11B"* ) base_build="11B554a";;
"9"* ) base_build="9B206";;
esac
- echo -e "RamdiskExploit" >> $NewPlist
- echo -e "exploitsrc/target/$hw/$base_build/exploit" >> $NewPlist
- echo -e "injectsrc/target/$hw/$base_build/partition" >> $NewPlist
+ echo "RamdiskExploit" >> $NewPlist
+ echo "exploitsrc/target/$hw/$base_build/exploit" >> $NewPlist
+ echo "injectsrc/target/$hw/$base_build/partition" >> $NewPlist
elif [[ $1 == "target" ]]; then
- echo -e "FilesystemPackagebootstrapfreeze.tar" >> $NewPlist
+ echo "FilesystemPackagebootstrapfreeze.tar" >> $NewPlist
case $vers in
- 8* | 9* ) echo -e "packagesrc/ios9.tar" >> $NewPlist;;
+ 8* | 9* ) echo "packagesrc/ios9.tar" >> $NewPlist;;
esac
printf "RamdiskPackagepackagesrc/bin.tariosios" >> $NewPlist
case $vers in
@@ -2336,41 +2336,41 @@ ipsw_prepare_bundle() {
8* ) printf "8" >> $NewPlist;;
9* ) printf "9" >> $NewPlist;;
esac
- echo -e "" >> $NewPlist
+ echo "" >> $NewPlist
elif [[ $ipsw_prepare_usepowder == 1 ]]; then
- echo -e "FilesystemPackageRamdiskPackage" >> $NewPlist
+ echo "FilesystemPackageRamdiskPackage" >> $NewPlist
elif [[ -d $FirmwareBundle2 ]]; then
cp $FirmwareBundle2/* $FirmwareBundle
- echo -e "RamdiskPatches" >> $NewPlist
- echo -e "asr" >> $NewPlist
- echo -e "Fileusr/sbin/asrPatchasr.patch" >> $NewPlist
+ echo "RamdiskPatches" >> $NewPlist
+ echo "asr" >> $NewPlist
+ echo "Fileusr/sbin/asrPatchasr.patch" >> $NewPlist
if [[ -s $FirmwareBundle/restoredexternal.patch ]]; then
- echo -e "restoredexternal" >> $NewPlist
- echo -e "Fileusr/local/bin/restored_externalPatchrestoredexternal.patch" >> $NewPlist
+ echo "restoredexternal" >> $NewPlist
+ echo "Fileusr/local/bin/restored_externalPatchrestoredexternal.patch" >> $NewPlist
fi
- echo -e "" >> $NewPlist
+ echo "" >> $NewPlist
if [[ $ipsw_hacktivate == 1 ]]; then
- echo -e "FilesystemPatches" >> $NewPlist
- echo -e "Hacktivation" >> $NewPlist
- echo -e "ActionPatchFileusr/libexec/lockdownd" >> $NewPlist
- echo -e "Patchlockdownd.patch" >> $NewPlist
+ echo "FilesystemPatches" >> $NewPlist
+ echo "Hacktivation" >> $NewPlist
+ echo "ActionPatchFileusr/libexec/lockdownd" >> $NewPlist
+ echo "Patchlockdownd.patch" >> $NewPlist
else
- echo -e "FilesystemPatches" >> $NewPlist # ipsw segfaults if this is missing lol
+ echo "FilesystemPatches" >> $NewPlist # ipsw segfaults if this is missing lol
fi
fi
if [[ $1 == "base" ]]; then
- echo -e "Firmware" >> $NewPlist
+ echo "Firmware" >> $NewPlist
elif [[ $1 == "target" && $vers == "4"* ]]; then
- echo -e "Firmware" >> $NewPlist
+ echo "Firmware" >> $NewPlist
ipsw_prepare_keys iBSS $1
ipsw_prepare_keys RestoreRamdisk $1
- echo -e "" >> $NewPlist
+ echo "" >> $NewPlist
else
if [[ $ipsw_prepare_usepowder == 1 ]]; then
- echo -e "Firmware" >> $NewPlist
+ echo "Firmware" >> $NewPlist
else
- echo -e "FirmwarePatches" >> $NewPlist
+ echo "FirmwarePatches" >> $NewPlist
fi
ipsw_prepare_keys iBSS $1
# ios 4 and lower do not need ibec patches. the exception is the ipad lineup
@@ -2412,11 +2412,11 @@ ipsw_prepare_bundle() {
esac
fi
fi
- echo -e "" >> $NewPlist
+ echo "" >> $NewPlist
fi
if [[ $1 == "base" ]]; then
- echo -e "FirmwarePath" >> $NewPlist
+ echo "FirmwarePath" >> $NewPlist
ipsw_prepare_paths AppleLogo $1
ipsw_prepare_paths BatteryCharging0 $1
ipsw_prepare_paths BatteryCharging1 $1
@@ -2427,9 +2427,9 @@ ipsw_prepare_bundle() {
ipsw_prepare_paths RecoveryMode $1
ipsw_prepare_paths LLB $1
ipsw_prepare_paths iBoot $1
- echo -e "" >> $NewPlist
+ echo "" >> $NewPlist
elif [[ $1 == "target" ]]; then
- echo -e "FirmwareReplace" >> $NewPlist
+ echo "FirmwareReplace" >> $NewPlist
if [[ $vers == "4"* ]]; then
ipsw_prepare_paths APTicket $1
fi
@@ -2447,22 +2447,22 @@ ipsw_prepare_bundle() {
ipsw_prepare_paths iBoot $1
ipsw_prepare_paths NewiBoot $1
ipsw_prepare_paths manifest $1
- echo -e "" >> $NewPlist
+ echo "" >> $NewPlist
fi
if [[ $daibutsu == 1 ]]; then
if [[ -d $FirmwareBundle2 ]]; then
- echo -e "PackagePath./freeze.tar" >> $NewPlist
- echo -e "RamdiskPackage" >> $NewPlist
+ echo "PackagePath./freeze.tar" >> $NewPlist
+ echo "RamdiskPackage" >> $NewPlist
else
- echo -e "RamdiskPackage2" >> $NewPlist
+ echo "RamdiskPackage2" >> $NewPlist
fi
- echo -e "./bin.tarRamdiskReboot./reboot.shUntetherPath./untether.tar" >> $NewPlist
+ echo "./bin.tarRamdiskReboot./reboot.shUntetherPath./untether.tar" >> $NewPlist
local hwmodel="$(tr '[:lower:]' '[:upper:]' <<< ${device_model:0:1})${device_model:1}"
- echo -e "hwmodel$hwmodel" >> $NewPlist
+ echo "hwmodel$hwmodel" >> $NewPlist
fi
- echo -e "" >> $NewPlist
+ echo "" >> $NewPlist
cat $NewPlist
}