@@ -2867,49 +2867,34 @@ ipsw_prepare_rebootsh() {
28672867}
28682868
28692869ipsw_prepare_logos_convert () {
2870- local iv
2871- local key
2872- local name
2870+ local fourcc=" logo"
28732871 if [[ -n $ipsw_customlogo ]]; then
2874- iv=$( echo $device_fw_key | $jq -j ' .keys[] | select(.image == "AppleLogo") | .iv' )
2875- key=$( echo $device_fw_key | $jq -j ' .keys[] | select(.image == "AppleLogo") | .key' )
2876- name=$( echo " $device_fw_key " | $jq -j ' .keys[] | select(.image == "AppleLogo") | .filename' )
2877- logoname=" $name "
28782872 log " Converting custom logo"
2879- file_extract_from_archive " $ipsw_path .ipsw" $all_flash /$name
2880- " $dir /xpwntool" $name logo-orig.img3 -iv $iv -k $key -decrypt
2881- " $dir /imagetool" inject " $ipsw_customlogo " logo.img3 logo-orig.img3
2873+ logoname=$( echo " $device_fw_key " | $jq -j ' .keys[] | select(.image == "AppleLogo") | .filename' )
2874+ if [[ $device_target_powder == 1 ]]; then
2875+ fourcc=" logb"
2876+ case $target_det in
2877+ [34] ) fourcc=" log4" ;;
2878+ esac
2879+ fi
2880+ " $dir /ibootim" " $ipsw_customlogo " logo.raw
2881+ " $dir /img3maker" -t $fourcc -f logo.raw -o logo.img3
28822882 if [[ ! -s logo.img3 ]]; then
28832883 error " Converting custom logo failed. Check your image"
28842884 fi
2885- if [[ $device_target_powder == 1 ]]; then
2886- if [[ $device_target_vers == " 3" * || $device_target_vers == " 4" * ]]; then
2887- log " log4"
2888- echo " 0000010: 3467" | xxd -r - logo.img3
2889- echo " 0000020: 3467" | xxd -r - logo.img3
2890- else
2891- log " logb"
2892- echo " 0000010: 6267" | xxd -r - logo.img3
2893- echo " 0000020: 6267" | xxd -r - logo.img3
2894- fi
2895- fi
28962885 mkdir -p $all_flash 2> /dev/null
2897- mv logo.img3 $all_flash /$name
2886+ mv logo.img3 $all_flash /$logoname
28982887 fi
28992888 if [[ -n $ipsw_customrecovery ]]; then
2900- iv=$( echo $device_fw_key | $jq -j ' .keys[] | select(.image == "RecoveryMode") | .iv' )
2901- key=$( echo $device_fw_key | $jq -j ' .keys[] | select(.image == "RecoveryMode") | .key' )
2902- name=$( echo " $device_fw_key " | $jq -j ' .keys[] | select(.image == "RecoveryMode") | .filename' )
2903- recmname=" $name "
29042889 log " Converting custom recovery"
2905- file_extract_from_archive " $ipsw_path .ipsw " $all_flash / $name
2906- " $dir /xpwntool " $name recovery-orig.img3 -iv $iv -k $key -decrypt
2907- " $dir /imagetool " inject " $ipsw_customrecovery " recovery.img3 recovery-orig .img3
2890+ recmname= $( echo " $device_fw_key " | $jq -j ' .keys[] | select(.image == "RecoveryMode") | .filename ' )
2891+ " $dir /ibootim " " $ipsw_customlogo " recovery.raw
2892+ " $dir /img3maker " -t recm -f recovery.raw -o recovery .img3
29082893 if [[ ! -s recovery.img3 ]]; then
29092894 error " Converting custom recovery failed. Check your image"
29102895 fi
29112896 mkdir -p $all_flash 2> /dev/null
2912- mv recovery.img3 $all_flash /$name
2897+ mv recovery.img3 $all_flash /$recmname
29132898 fi
29142899}
29152900
@@ -8349,7 +8334,7 @@ menu_ipsw() {
83498334
83508335 if [[ $ipsw_cancustomlogo2 == 1 ]]; then
83518336 print " * You can select your own custom Apple logo image. This is optional and an experimental option"
8352- print " * Note: The images must be in PNG format, and up to 320x480 resolution only "
8337+ print " * Note: The images must be in PNG format, and up to your device resolution "
83538338 print " * Note 2: The custom images might not work, current support is spotty"
83548339 if [[ -n $ipsw_customlogo ]]; then
83558340 print " * Custom Apple logo: $ipsw_customlogo "
@@ -8360,7 +8345,7 @@ menu_ipsw() {
83608345 echo
83618346 elif [[ $ipsw_cancustomlogo == 1 ]]; then
83628347 print " * You can select your own custom logo and recovery image. This is optional and an experimental option"
8363- print " * Note: The images must be in PNG format, and up to 320x480 resolution only "
8348+ print " * Note: The images must be in PNG format, and up to 320x480 resolution"
83648349 print " * Note 2: The custom images might not work, current support is spotty"
83658350 if [[ -n $ipsw_customlogo ]]; then
83668351 print " * Custom Apple logo: $ipsw_customlogo "
0 commit comments