[HOW TO][BOOT LOGO] Modify Samsung Galaxy Tab 2 Boot Logo

Search This thread

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,137
Bekasi
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:
  • 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

  1. Over Terminal Emulator or "adb shell", dump your original param.lfs from /dev/block/mmcblk0p4
    Code:
    su
    cat /dev/block/mmcblk0p4 > /sdcard/mmcblk0p4.lfs
  2. Unpack param-tools.zip on your Linux computer or Cygwin environment for Windows user (untested)
    Code:
    unzip param-tools.zip
  3. 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
  4. Extract all jpg files from param.lfs
    Code:
    ../extract-jpg.sh ../mmcblk0p4.lfs
  5. 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)
  6. Save the original boot logo
    Code:
    mv 8.jpg logo_espresso7.jpg
    mv 5.jpg logo_espresso10.jpg
  7. Replace the original boot logo
    Code:
    cp espresso7.jpg 8.jpg
    cp espresso10.jpg 5.jpg
  8. Inject your modification back to param.lfs and save it as param-new.lfs
    Code:
    ../inject-jpg.sh ../mmcblk0p4.lfs ../mmcblk0p4-new.lfs
  9. Confirm your new param.lfs by extracting it, check the resulted image
  10. Copy the new param.lfs to your P31xx/P51xx sdcard
  11. 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
attachment.php


attachment.php


attachment.php


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
inject-jpg.sh:
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.jpg
    1-r.jpg
    16.3 KB · Views: 35,102
  • 13.jpg
    13.jpg
    18.6 KB · Views: 35,115
  • mmcblk0p4-stock.lfs.zip
    476.7 KB · Views: 1,249
  • espresso7_google-r.jpg
    espresso7_google-r.jpg
    9.5 KB · Views: 34,901
  • mmcblk0p4_google.lfs.zip
    465.4 KB · Views: 917
  • mmcblk0p4_xda.lfs.zip
    476.7 KB · Views: 645
  • stock-boot-logo-p31xx-p51xx-cwm.zip
    618.9 KB · Views: 11,682
  • xda-boot-logo-p31xx-p51xx-cwm.zip
    618.1 KB · Views: 1,207
  • param-tools.zip
    1.3 KB · Views: 2,010
Last edited:

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,137
Bekasi
So if I prepack this for all the new logos. This should be flashable from recovery ya think?
Yes.
Awesome work!

I might do this during the weekend.
I might be lazy and wait for a zip to flash that does it for me. :)
Thanks. PM me, since you already press my Thanks Button, I'll give you the download link :D I came from Galaxy Ace community, our members here have a different habits. Download and go! Without any comment, neither press the Thanks Button. I called it a leech!
 

RomsWell

Senior Member
Jul 10, 2011
1,633
1,058
Venice
Do u think we should get a dump from each device model or or do u think the partition size is the same on all the 7inch models?
 

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,137
Bekasi
Do u think we should get a dump from each device model or or do u think the partition size is the same on all the 7inch models?
1024*8, from "cat /proc/patitions". I do not know what information is stored in the PARAM partition but my original /dev/block/mmcblk0p4 contain 15 parts of data, every part started by "\x21\x43\x65\x87" magic number. The boot logo stored in the first part. I've tried zeroing mmcblk0p4 and then just write the first part of the original data back to mmcblk0p4, no problem so far.
 
Last edited:

ruben00

Senior Member
Jun 19, 2004
128
160
NYC, NY
A picture is worth a 1000 words, but then what is a video worth? a million?
attachment.php


Boot Logo In Action - Watch it while it's hot :)

a few that I slapped together with some images i got off google (click on the Image to download):
Download -> Green Android
Download -> Blue Android Glow
Download -> Blue Android Glow 2


NOTE: These files are NOT, I REPEAT NOT CWM flashable. you have to follow step 10 of ketut's OP instructions
I'm not responsible if you screw up your Tab either because you flashed these files or because you didn't read the OP well enough
 

Attachments

  • 20120924_193538.jpg
    20120924_193538.jpg
    122.4 KB · Views: 11,688
  • GreenAndroid.gif
    GreenAndroid.gif
    7 KB · Views: 11,661
  • robo_glow_blue.gif
    robo_glow_blue.gif
    8.4 KB · Views: 11,728
  • robo_glow_blue2.gif
    robo_glow_blue2.gif
    16.1 KB · Views: 11,729
Yes.

Thanks. PM me, since you already press my Thanks Button, I'll give you the download link :D I came from Galaxy Ace community, our members here have a different habits. Download and go! Without any comment, neither press the Thanks Button. I called it a leech!

Ketut , that was a long time ago .

Sent from Ursa's claws.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 89
    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:
    • 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

    1. Over Terminal Emulator or "adb shell", dump your original param.lfs from /dev/block/mmcblk0p4
      Code:
      su
      cat /dev/block/mmcblk0p4 > /sdcard/mmcblk0p4.lfs
    2. Unpack param-tools.zip on your Linux computer or Cygwin environment for Windows user (untested)
      Code:
      unzip param-tools.zip
    3. 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
    4. Extract all jpg files from param.lfs
      Code:
      ../extract-jpg.sh ../mmcblk0p4.lfs
    5. 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)
    6. Save the original boot logo
      Code:
      mv 8.jpg logo_espresso7.jpg
      mv 5.jpg logo_espresso10.jpg
    7. Replace the original boot logo
      Code:
      cp espresso7.jpg 8.jpg
      cp espresso10.jpg 5.jpg
    8. Inject your modification back to param.lfs and save it as param-new.lfs
      Code:
      ../inject-jpg.sh ../mmcblk0p4.lfs ../mmcblk0p4-new.lfs
    9. Confirm your new param.lfs by extracting it, check the resulted image
    10. Copy the new param.lfs to your P31xx/P51xx sdcard
    11. 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
    attachment.php


    attachment.php


    attachment.php


    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
    inject-jpg.sh:
    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!
    9
    So if I prepack this for all the new logos. This should be flashable from recovery ya think?
    Yes.
    Awesome work!

    I might do this during the weekend.
    I might be lazy and wait for a zip to flash that does it for me. :)
    Thanks. PM me, since you already press my Thanks Button, I'll give you the download link :D I came from Galaxy Ace community, our members here have a different habits. Download and go! Without any comment, neither press the Thanks Button. I called it a leech!
    5
    A picture is worth a 1000 words, but then what is a video worth? a million?
    attachment.php


    Boot Logo In Action - Watch it while it's hot :)

    a few that I slapped together with some images i got off google (click on the Image to download):
    Download -> Green Android
    Download -> Blue Android Glow
    Download -> Blue Android Glow 2


    NOTE: These files are NOT, I REPEAT NOT CWM flashable. you have to follow step 10 of ketut's OP instructions
    I'm not responsible if you screw up your Tab either because you flashed these files or because you didn't read the OP well enough
    4
    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
    No way, as I said before. Above code from my brain and hands. Save jpg address to mapping.txt and reuse it to produce a new logo, fill the different size with '\xFF', using a correct dd command, etc. My above code replace HEX editor method to create a boot logo. I am 37 years old, my brain memory still completely in good condition.
    3
    Some updates,
    @ketut.kumajaya might want to update the OP?

    • updated extract-jpg.sh : "-P" isn't valid on "grep" anymore, you'll get "grep: invalid UTF-8 string" error and no jpg files (thx to @Orion116 )
      Code:
      commit a651ae39d701b2e2a1f6d92e53ddff48bf4cb36b
      Author: Andreas Blaesius <[email protected]>
      Date:   Mon Aug 15 20:38:32 2016 +0200
      
          extract-jpg.sh: grep -P is no longer valid
          
          Thanks to Orion116 @ XDA
      
      diff --git a/extract-jpg.sh b/extract-jpg.sh
      index 9bec7dc..56f762a 100755
      --- a/extract-jpg.sh
      +++ b/extract-jpg.sh
      @@ -4,8 +4,8 @@
       # Ketut P. Kumajaya <ketut.kumajaya @ xda-developers.com>, Sept 2012
       # http://z4ziggy.wordpress.com/2010/09/18/looking-into-param-lfs-file/
       
      [COLOR="Red"]-starts=(`grep -Pabo $'\xFF\xD8' $1 | cut -f 1 -d :`)
      -ends=(`grep -Pabo $'\xFF\xD9' $1 | cut -f 1 -d :`)[/COLOR]
      [COLOR="Green"]+starts=(`grep -abo $'\xFF\xD8' $1 | cut -f 1 -d :`)
      +ends=(`grep -abo $'\xFF\xD9' $1 | cut -f 1 -d :`)[/COLOR]
       
       echo "count=$((${#starts[@]}))" > mapping.txt
       for (( i = 0 ; i < ${#starts[@]} ; i++ )); do
    • attached the jpg files for google bootlogo and the XDA Tab2 bootlogo zipped, the one attached to Post 1 could't be injected to the new param.lfs (i extracted the files from the on Post1 uploaded modified param.lfs.zips)
    • Note: on newer param.lfs it could be the filename changed, i had to replace 11.jpg and 15.jpg instead 5.jpg and 8.jpg - you should replace the files by hand to be sure you updated the right jpg files