Creating a new splash image (“Tmobile-G1″) for Android Devices

Posted on December 7th, 2008 in Android Hacking by Disconnect  Tagged , , , , ,

So you want to join the party and flash your own boot image, but its a weird undocumented format and you don’t want to spend all year researching it in the source. Well, I’m here to help.

It is actually very simple. Start with an image you want to use, make sure it is 320×480 with 8bpp color. (In my examples, I’ll use [code]splash.png: PNG image data, 320 x 480, 8-bit/color RGBA, non-interlaced[/code]
Just make sure you have ImageMagick installed, and the utilities from the source build. (Specifically, rgb2565.)

$ convert -depth 8 splash.png rgb:splash.raw
# Make sure it is 460800 bytes long!
$ rgb2565 splash.raw splash.raw565
# Triple-check size before flashing! 307200 bytes
$ fastboot flash splash1 splash.raw565
$ fastboot reboot

Lets break it down. the [code]convert[/code] turns it from a png (or any supported image format) into a raw 8-bits-per-color no-alpha data file. This file should be 460800 bytes – no more, no less.

Next, [code]rgb2565[/code] converts that file to a raw 565 16bit file (for the framebuffer on the G1.) This file is exactly 307200 bytes long – if its not, you messed up somewhere.

Finally, you use [code]fastboot flash[/code] to flash the splash image and reboot. Instead of the B&W T-mobile logo, now you will see your custom splash screen. Congrats! :)




Post a comment