Skip to content

Commit c16df94

Browse files
committed
Fix #959
1 parent 60d301e commit c16df94

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

restore.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4875,12 +4875,13 @@ ipsw_prepare_tethered() {
48754875
ipsw_prepare_32bit
48764876

48774877
log "Extract RestoreRamdisk and options.plist"
4878+
mv "$ipsw_custom.ipsw" temp.ipsw
4879+
file_extract_from_archive temp.ipsw BuildManifest.plist
4880+
name=$($PlistBuddy -c "Print BuildIdentities:0:Manifest:RestoreRamDisk:Info:Path" BuildManifest.plist | tr -d '"')
4881+
file_extract_from_archive temp.ipsw $name
48784882
device_fw_key_check temp $device_target_build
4879-
name=$(echo $device_fw_key_temp | $jq -j '.keys[] | select(.image == "RestoreRamdisk") | .filename')
48804883
iv=$(echo $device_fw_key_temp | $jq -j '.keys[] | select(.image == "RestoreRamdisk") | .iv')
48814884
key=$(echo $device_fw_key_temp | $jq -j '.keys[] | select(.image == "RestoreRamdisk") | .key')
4882-
mv "$ipsw_custom.ipsw" temp.ipsw
4883-
file_extract_from_archive temp.ipsw $name
48844885
mv $name ramdisk.orig
48854886
"$dir/xpwntool" ramdisk.orig ramdisk.dec -iv $iv -k $key
48864887
"$dir/hfsplus" ramdisk.dec extract usr/local/share/restore/$options_plist

0 commit comments

Comments
 (0)