HBOOT hacks

Written by  on May 1, 2015 

Relying quite a bit on [BOOTSPLASH] iElvis’s Custom One Splash Screens and Tutorial: How to Customize/Modify/Hack your HBoot.img, I finally got around to replacing that blinding white default boot splash from HTC on my One Mini (aka m4). For posterity, the basic processes are as follows.

Replacing the “developer build” text HTC writes when you unlock/S-off the phone with my name in red:

$ adb shell
$ su
# dd if=/dev/block/mmcblk0p12 of=/sdcard/hboot.img
# exit
$ exit
$ adb pull /sdcard/hboot.img
$ emacs hboot.img
M-x hexl-mode

Replace the text starting with “This build …” with whatever you want. But be sure only overwrite characters. Don’t delete or add because that’ll make your file a different size, perhaps bricking your phone. I tried lots of replacements, but didn’t take the time to figure out how to do it right. So a short string like my name was best. Save the file, then:

$ adb push hboot.img /sdcard/hboot.img
$ adb shell
$ su
# dd if=/sdcard/hboot.img of=/dev/block/mmcblk0p12
# exit
$ exit
$ adb reboot

Replacing the HTC logo with the white background:

$ adb shell
$ su
# dd if=/dev/block/mmcblk0p13 of=/sdcard/defaultsplash.img
# exit
$ exit
$ adb pull /sdcard/defaultsplash.img
$ ./nbimg -w 720 -h 1280 -F defaultsplash.img
$ file defaultsplash.img.bmp
defaultsplash.img.bmp: PC bitmap, Windows 3.x format, 720 x 1280 x 24

Create a new BMP image that matches that one. I use the GIMP, obviously. Then:

$ ./nbimg -F new.bmp
$ mkdir tmp
$ cd tmp
$ unzip ../
Archive: ../
creating: META-INF/
creating: META-INF/com/
creating: META-INF/com/google/
creating: META-INF/com/google/android/
inflating: META-INF/com/google/android/update-binary
inflating: META-INF/com/google/android/updater-script
creating: cache/
inflating: cache/splash.565
$ cp ../new.bmp.img cache/splash.565
$ zip -r .
$ adb push /sdcard
$ adb reboot recovery

Then in recovery, just install that zip like any other file. Here’s a video showing my new boot splash:

Category : System Admin

Leave a Reply