# [UPDATED 6-22] Flash a custom splash image from Linux



## packruler (Jun 6, 2011)

I rewrote TrueBlue_Drew's Splash Flasher for use on Linux systems. 
This should work on all HTC phones with unlocked (S-Off) bootloaders
Features:

Convert jpg, bmp, and png files to .img for flashing through the bootloader.
Backup current boot splash to .img folder
Convert .img splash to .png for editing on computer
Flash .img through bootloader automatically.

To use this tool you will need ffmpeg tool. To get run: sudo apt-get install ffmpeg
Also, to run either place both this conversion file and your photo in the folder with adb and fastboot or set up your path so those can be accessed from any folder (for details go here: http://goo.gl/a9k5m)

Enjoy: http://goo.gl/Tbkt8

If you have any issues, questions, or suggestions please let me know


----------



## freehood4all (Jun 13, 2011)

Thanks for the script! I ended up looking at the script to see exactly what was going on behind the scenes. Turns out that the convert .png to .img option has a typo


```
ffmpeg -i $File_name.jpg -f rawvideo -pix_fmt rgb565 $File_name.img
```
should be:

```
ffmpeg -i $File_name.[B]png[/B] -f rawvideo -pix_fmt rgb565 $File_name.img
```
There is no error detection or a check to see if the file is there after the conversion, so you will always get a "Complete" message.

Also when I tried to flash the image through the script, the phone rebooted to the bootloader as expected but for some reason didn't flash the image. So I again looked at the script and ran the fastboot flash spash1 /path/to/file.img

I appreciate the time you spent on the script and hopefully it can be improved to make it even more n00b friendly!

I ended up using this image attached


----------



## packruler (Jun 6, 2011)

Sorry for my delay in checking thanks for the info embarrassed I left .jpg in there. I will try to fix this tomorrow (I'm also going to clean up the code a little hopefully). I'm part n00b still so I basically rewrote a windows bat file for linux bash and made it a little more user friendly so I'm not quite sure how to implement the fault check. Once again thank you for the correction on my typo


----------



## packruler (Jun 6, 2011)

So I got some updates made. The file is now error free








Changelog:

Fixed the typo in png conversion
Added a pause before clear on all conversions so you can see if they throw an error.
When flashing the device will now wait for the device before rebooting for debugging.
Changed the wait for user input from read ... -n1 to needing an enter because sh was telling me that was illegal.
Fixed an error on exit
Properly Credited TrueBlue_Drew in opening comments

If you have any bugs, questions, or suggestions please pm me as I may not be able to check this daily.

ENJOY: http://goo.gl/Tbkt8


----------



## packruler (Jun 6, 2011)

Version 2 Change Log:
Added an actual file name check that should prevent any confusion
Added the ability to create a PG05IMG.zip for the HTC Thunderbolt so you can share with your friends and the community with ease.
Everything is in a zip folder now because I added fastboot and adb scripts so you should no long need to update your path.
Added 4 images I made so you have some thing to start with 1 is an apology screen for the link confusion








Little bit of optimization of the code

As usual if there are any ideas you have on how to make this better please let me know. 
I will be porting the code for the zip file to the EVO 4G, Nexus One, and Incredible in the coming days hopefully.

Linux Splash Flasher Version 2.0: http://goo.gl/vjwp6


----------

