HOW TO: Modify Samsung Galaxy Tab 2 Boot Logo
Ketut P. Kumajaya <ketut.kumajaya @ xda-developers.com>, Sept 2012
Ketut P. Kumajaya <ketut.kumajaya @ xda-developers.com>, March 2013
UPDATE 28/03/2013:
extract-jpg.sh, a small modified script from http://z4ziggy.wordpress.com/2010/09/18/looking-into-param-lfs-file
inject-jpg.sh:
Attached a modified and stock param.lfs. Backup your stock PARAM partition /dev/block/mmcblk0p4 before applying any modification. Use this guide and/or attached param.lfs at your own risk!
NOTE:
Ketut P. Kumajaya <ketut.kumajaya @ xda-developers.com>, Sept 2012
Ketut P. Kumajaya <ketut.kumajaya @ xda-developers.com>, March 2013
UPDATE 28/03/2013:
- Instructions update for latest JB param.lfs
- Stock and XDA boot logo in flashable zip format, for both P31xx and P51xx. Auto reboot into recovery when flash completed to prevent USB connection problem as reported by tuxafgmur
- Over Terminal Emulator or "adb shell", dump your original param.lfs from /dev/block/mmcblk0p4
Code:su cat /dev/block/mmcblk0p4 > /sdcard/mmcblk0p4.lfs
- Unpack param-tools.zip on your Linux computer or Cygwin environment for Windows user (untested)
Code:unzip param-tools.zip
- Copy your param.lfs to param-tools folder and then create a working folder for manipulate boot logo
Code:cd param-tools mkdir work cd work
- Extract all jpg files from param.lfs
Code:../extract-jpg.sh ../mmcblk0p4.lfs
- Create your own boot logo, the size no larger than 8.jpg (P31xx) or 5.jpg (P51xx). Save it as espresso7.jpg (P31xx) or espresso10.jpg (P51xx)
- Save the original boot logo
Code:mv 8.jpg logo_espresso7.jpg mv 5.jpg logo_espresso10.jpg
- Replace the original boot logo
Code:cp espresso7.jpg 8.jpg cp espresso10.jpg 5.jpg
- Inject your modification back to param.lfs and save it as param-new.lfs
Code:../inject-jpg.sh ../mmcblk0p4.lfs ../mmcblk0p4-new.lfs
- Confirm your new param.lfs by extracting it, check the resulted image
- Copy the new param.lfs to your P31xx/P51xx sdcard
- Over Terminal Emulator or "adb shell", copy your new param.lfs to /dev/block/mmcblk0p4
Code:su cat /sdcard/mmcblk0p4-new.lfs > /dev/block/mmcblk0p4 reboot recovery
extract-jpg.sh, a small modified script from http://z4ziggy.wordpress.com/2010/09/18/looking-into-param-lfs-file
Code:
#!/bin/bash
# filename: extract-jpg.sh
# command : extract-jpg.sh param-base.lfs
# Ketut P. Kumajaya <ketut.kumajaya @ xda-developers.com>, Sept 2012
# http://z4ziggy.wordpress.com/2010/09/18/looking-into-param-lfs-file/
starts=(`grep -Pabo $'\xFF\xD8' $1 | cut -f 1 -d :`)
ends=(`grep -Pabo $'\xFF\xD9' $1 | cut -f 1 -d :`)
echo "count=$((${#starts[@]}))" > mapping.txt
for (( i = 0 ; i < ${#starts[@]} ; i++ )); do
end=$((ends[$i] + 2))
count=$((end - starts[$i]))
echo "jpg$i=$((starts[$i])):$((ends[$i])):$count" >> mapping.txt
echo "-I- Extracting $i.jpg"
dd if=$1 bs=1 skip=${starts[$i]} count=$count > $i.jpg
done
Code:
#!/bin/bash
# filename: inject-jpg.sh
# command : inject-jpg.sh param-base.lfs param-new.lfs
# Ketut P. Kumajaya <ketut.kumajaya @ xda-developers.com>, Sept 2012
count=(`grep 'count' mapping.txt | cut -f 2 -d =`)
echo "-I- jpg count=$count"
cat $1 > $2
for (( i = 0 ; i < $((count)) ; i++ )); do
start=(`grep jpg$i mapping.txt | cut -f 2 -d = | cut -f 1 -d :`)
end=(`grep jpg$i mapping.txt | cut -f 2 -d = | cut -f 2 -d :`)
size=(`grep jpg$i mapping.txt | cut -f 2 -d = | cut -f 3 -d :`)
nsize=$(stat -c%s $i.jpg)
if [ "$nsize" -gt "$size" ]; then
echo "-E- $i.jpg greater than $size !"
rm -f $2
exit
elif [ "$nsize" -lt "$size" ]; then
echo "-I- resize $i.jpg"
for (( s = 0 ; s < $((size - nsize)) ; s++ )); do
echo -n $'\xFF' >> $i.jpg
done
fi
echo "-I- $i.jpg size=$size"
dd if=$i.jpg of=$2 bs=1 seek=$start conv=notrunc
done
Attached a modified and stock param.lfs. Backup your stock PARAM partition /dev/block/mmcblk0p4 before applying any modification. Use this guide and/or attached param.lfs at your own risk!
NOTE:
- Until I fully understand the param.lfs structure, dump and modify your own param.lfs always the safest way to do for now.
- You may not re-post any file from this thread anywhere else, but you may of course link to this post (not the download directly!).
- Don't be a leech, I am not asking for donations but use the "Thanks" button!
Attachments
-
1-r.jpg16.3 KB · Views: 35,107
-
13.jpg18.6 KB · Views: 35,122
-
mmcblk0p4-stock.lfs.zip476.7 KB · Views: 1,250
-
espresso7_google-r.jpg9.5 KB · Views: 34,908
-
mmcblk0p4_google.lfs.zip465.4 KB · Views: 918
-
mmcblk0p4_xda.lfs.zip476.7 KB · Views: 645
-
stock-boot-logo-p31xx-p51xx-cwm.zip618.9 KB · Views: 11,742
-
xda-boot-logo-p31xx-p51xx-cwm.zip618.1 KB · Views: 1,208
-
param-tools.zip1.3 KB · Views: 2,012
Last edited: