Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,905 Members 39,815 Now Online
XDA Developers Android and Mobile Development Forum

Custom splash image

Tip us?
 
Stericson
Old
(Last edited by Stericson; 17th July 2009 at 05:20 AM.)
#1  
Stericson's Avatar
Retired Senior Mod / Senior Recognized Developer - Godfather of Android Theming - OP
Thanks Meter 377
Posts: 1,193
Join Date: Nov 2008
Default Custom splash image

I have attached all the files needed to do this on windows, mac, and linux at the end of this post. The creation of these apps, goes to the respective people, including Koush, JF, Infernix, and alansj.

Want to get rid of that t-mobile boot image?

Disconnect, over at Gotontheinter.net, has figured out how to do it using the new unlocked bootloader from the g1 dev phone. Below is a quote from the source. ( http://www.gotontheinter.net/node/9 )


"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 320x480 with 8bpp color. (In my examples, I'll use splash.png: PNG image data, 320 x 480, 8-bit/color RGBA, non-interlaced
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 convert 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, rgb2565 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 fastboot to flash the splash image and reboot. Instead of the B&W T-mobile logo, now you will see your custom splash screen. Congrats! "

Thanks to Infernix for the following extended how to:

1. find an image you like
2. edit it with your favourite editing suite and scale it to 320x480
3. after scaling it, convert the colorspace to 256 colors (8-bit)
4. Save it as a PNG without alpha channel/transparency.
5. Use the convert tool from the ImageMagick toolkit (use cygwin, or a linux box): convert -depth 8 splash.png rgb:splash.raw
6. Check that the splash.raw file is exactly 460800 bytes!
7. Compile the android tool called rgb2565 (gcc -O2 -Wall -Wno-unused-parameter -o rgb2565 to565.c)
8. Run the conversion command: rgb2565 < splash.raw > splash.raw565
9. Check that splash.raw565 is 307200 bytes. if it isn't, DO NOT FLASH IT ON YOUR PHONE. double-check your steps, something went wrong.
10. Boot your phone in SPL mode (hold camera +power).
11. After SPL shows, plug in USB connector/cord/whateva and push trackball or hit back. SPL restarts and now shows FASTBOOT.
12. If on windows, you need to install http://dl.google.com/android/android_usb_windows.zip
13. Compile android (see http://source.android.com/download) and make sure the fastboot binary (mydroid/out/host/*/bin/fastboot) is compiled (* being your OS)
14. use fastboot devices to check whether if your phone is showing up. if it isn't, try it as root (user might not have permission to access the usb device).
15. Double check that splash.raw565 is 307200 bytes. if it isn't, DO NOT FLASH IT ON YOUR PHONE.
16. Flash the splash image: fastboot flash splash1 splash.raw565
17. Reboot your phone to check: fastboot reboot


The instructions below are for users trying to flash their own boot image using windows.


The instructions below are also JF's work and not my own:

Instructions:

(note: you have to check the USB device in Computer Manager when the phone is in fastboot mode. The computer sees the phone in fastboot mode as a different device than the phone in normal mode)

Download the file and extract it in the same folder as adb. (if you don't have adb yet, it's included in the android SDK for windows. go download it!)

Take out the usb cable and boot up your phone into the SPL (back + power). You have to have the dev bootloader for this to work (white background with 3 skateboarding androids).

Plug in the usb cable, and make sure the display on the phone changes from "Serial0" to "FASTBOOT". If it doesn't, try pressing the back button.

If it asks you to install drivers, then go ahead and use the same usb drivers that you used to get adb working. You can skip the rest of the instructions. Fastboot should be working for you now.


If it doesn't ask you to install a driver, you need to figure out if the correct driver is loaded already.
Right click on My Computer, and click Manage, then go to the device manager

If you see an "ADB Interface" category at/near the top, with "HTC Dream" under it, then you're good to go. Fastboot should be working for you.

If you don't see an "ADB Interface" category, then it's likely that windows loaded the USB Mass Storage driver for it automatically. In the device manager, go down to "Universal Serial Bus Controllers", and see if you have at least one "USB Mass Storage device". If you have multiple ones, you'll need to go through each to find the correct one.

To find the correct one, right click on the USB Mass Storage device and click Properties. Go to the Details tab. In the combo box at the top that says "Device Instance Id", bring up the pull down and choose "Compatible Ids". If that is the correct device, then you will see 3 entries:

* USB\Class_ff&SubClass_42&Prot_03
* USB\Class_ff&SubClass_42
* USB\Class_ff


Once you find the correct device, go to the driver tab, and click "Update Driver". Choose "No, not this time", then "Install from a list or specific location", then "Don't search, I will choose the driver to install", and then choose the same usb driver that you used to get adb to work.

After that's done, you should be good to go. Open a command prompt and type fastboot devices and it should list the phone.

Here is a very good set of instructions for applying this to your phone if you haven't gotten it already: http://forum.xda-developers.com/showthread.php?t=467064

Additional Information

-
-
another way to convert to 565 raw, but from ANY format, is to use ffmpeg like so:

ffmpeg -i input.png -f rawvideo -pix_fmt rgb565 output.565

where input.png could be jpg, gif, tiff, etc. whatever you want.
-
-
credits for this goes to
Clone137


Heres some info about FFmpeg and where you can download it: FFmpeg


Stericson
 
infernix
Old
(Last edited by infernix; 16th December 2008 at 06:59 PM.)
#2  
Member
Thanks Meter 49
Posts: 93
Join Date: Oct 2007


“It won't work,” droned Marvin, “I have an exceptionally large mind.”

The Following User Says Thank You to infernix For This Useful Post: [ Click to Expand ]
 
Koush
Old
#3  
Retired Recognized Developer
Thanks Meter 893
Posts: 917
Join Date: Sep 2007
It's possible to modify the code to show a different startup animation: for example, the cylon strobing eye animation that was present up till Android V0.9.

Check out \frameworks\base\libs\surfaceflinger\BootAnimation .cpp. Just need to redeploy the one surfaceflinger file to see the changes.
 
Nikropht
Old
#4  
Nikropht's Avatar
Member
Thanks Meter 6
Posts: 55
Join Date: Nov 2008
Location: Flower Mound, Texas
Stericson, You ROCK!
 
xMemphisx
Old
#5  
xMemphisx's Avatar
Member
Thanks Meter 32
Posts: 78
Join Date: Dec 2008
I'm getting hung up at this line

fastboot flash splash1 g1-splash.rle

it says g1-splash.rle not found. what'd i miss? everything else has worked like a charm thus far.
 
infernix
Old
#6  
Member
Thanks Meter 49
Posts: 93
Join Date: Oct 2007
Correction in instructions:

$ rgb2565 < splash.raw > splash.raw565
# Triple-check size before flashing! 307200 bytes
$ fastboot flash splash1 splash.raw565
$ fastboot reboot
 
JesusFreke
Old
(Last edited by JesusFreke; 8th December 2008 at 02:36 AM.)
#7  
JesusFreke's Avatar
Recognized Developer
Thanks Meter 41
Posts: 736
Join Date: Oct 2008
Location: Dallas
Quote:
Originally Posted by Stericson View Post
This file should be 460800 bytes - no more, no less.
460800 shall be the size of the file, and the number of bytes in the file shall be 460800. 460801 shalt not the size of the file be, neither shall the size be 460799, excepting that thou then append a byte to 460800.

460802... is right out.

Once the file size 460800, being the 460800th byte be reached, flasheth thou thy boot image onto the G1, who, being naughty in my sight, shall display it.

(note: please read the instructions, and don't actually flash a file that's 460800 bytes long. I had to take some artistic liberties here )
"Whether You Think You Can or Can't, You're Right"
--Henry Ford

Android Developer Phone 1 - JFv1.51 - REPRESENT!
The Following User Says Thank You to JesusFreke For This Useful Post: [ Click to Expand ]
 
xMemphisx
Old
(Last edited by xMemphisx; 8th December 2008 at 12:40 AM.)
#8  
xMemphisx's Avatar
Member
Thanks Meter 32
Posts: 78
Join Date: Dec 2008
Ok, now the terminal just hangs on

< waiting for device >

Is the phone supposed to be in recovery? I've tried that, but have had the same results. I have the /system mounted and the phone is on a jailbroken RC30 (1.2). And it also is running the Dev 1 bootloader. Any helpful hints?

[edit]
when i do an 'adb devices', the phone is listed...
 
stephen.n.nikki
Old
#9  
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Mar 2007
can I do this using windows? I made an image, with paint shop pro, and used convert to convert it to the raw format and it turned out to be 403,200 bytes, is that wrong? What did I do? Also, can I use rgb2565 on Windows? or do I have to run this in linux? Lastly, when using fastboot, do I boot my phone into the dev bootloader and connect to it via adb shell and then type that command?

Any help would be great!
 
infernix
Old
(Last edited by infernix; 10th December 2008 at 02:51 AM.) Reason: Home -> Back, USB card -> USB connector/cord/whateva ;) thx eldenz
#10  
Member
Thanks Meter 49
Posts: 93
Join Date: Oct 2007
OK let me extend the howto:

1. find an image you like
2. edit it with your favourite editing suite and scale it to 320x480
3. after scaling it, convert the colorspace to 256 colors (8-bit)
4. Save it as a PNG without alpha channel/transparency.
5. Use the convert tool from the ImageMagick toolkit (use cygwin, or a linux box): convert -depth 8 splash.png rgb:splash.raw
6. Check that the splash.raw file is exactly 460800 bytes!
7. Compile the android tool called rgb2565 (gcc -O2 -Wall -Wno-unused-parameter -o rgb2565 to565.c)
8. Run the conversion command: rgb2565 < splash.raw > splash.raw565
9. Check that splash.raw565 is 307200 bytes. if it isn't, DO NOT FLASH IT ON YOUR PHONE. double-check your steps, something went wrong.
10. Boot your phone in SPL mode (hold camera +power).
11. After SPL shows, plug in USB connector/cord/whateva and push trackball or hit back. SPL restarts and now shows FASTBOOT.
12. If on windows, you need to install http://dl.google.com/android/android_usb_windows.zip
13. Compile android (see http://source.android.com/download) and make sure the fastboot binary (mydroid/out/host/*/bin/fastboot) is compiled (* being your OS)
14. use fastboot devices to check whether if your phone is showing up. if it isn't, try it as root (user might not have permission to access the usb device).
15. Double check that splash.raw565 is 307200 bytes. if it isn't, DO NOT FLASH IT ON YOUR PHONE.
16. Flash the splash image: fastboot flash splash1 splash.raw565
17. Reboot your phone to check: fastboot reboot

This list together with instructions at http://www.gotontheinter.net/node/9 should get you going.

The tools mentioned here are commandline tools.

I have attached static versions of the tools mentioned for linux x86 to this thread. However I can't guarantee that they will work for you. they should, though.

Tags
android, boot, hack, splash, splash screen
THREAD CLOSED
Subscribe
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...