Post Reply

[TOOL] [Linux / OSX] Splash Screen creator / flasher

17th May 2010, 08:58 PM   |  #1  
elegos's Avatar
OP Senior Member
Flag Milano
Thanks Meter: 125
 
404 posts
Join Date:Joined: Jul 2009
More
Hello there!

This is a G1 / Magic tool to easily convert images in splash screen ones.
This tool is based upon ffmpeg and you need it installed on your system before proceeding (it will prompt you about the program missing in any case)

REQUIREMENTS
  1. ffmpeg installed on your system
  2. a 320x480 image
  3. a 320x480 device (i.e. G1 / Magic) with engineering SPL

USAGE
Code:
./file [--help][-h]
Prints out how to use the script

Code:
./file your_image_file
Converts your image into a flashable splash screen, if you want the script will continue flashing the file directly.

NOTE: if you wish to make this script work with the Nexus One or any other device which doesn't share the same 320x480 resolution, just change these two variables:
Code:
size_check=307200
size_desc="320x480"
size_check is in bytes, size_desc is just a descriptive string.




I ASSUME NO RESPONSABILITY ABOUT THE USAGE OF THIS SCRIPT. USE IT "AS IS", LOOK AT THE OUTPUTS AND YOU'LL AVOID BRICKS!

Please, if you wish to redistribute this script, give the right credits and don't change the prog_header please (maybe link this discussion in a text file)!


Here the code is, just slap it in a text file, give it the executive permission (chmod +x filename) and use it!
Code:
#!/bin/bash
prog_header() {
	echo "###############################"
	echo "####### EleGoS's FFMPEG #######"
	echo "# G1/Sapphire/MyTouch3G/Magic #"
	echo "### Splash Screen converter ###"
	echo "###############################"
	echo "version 1.0"
	echo ""
}

if [ "$1" == "--help" ] || [ "$1" == "-h"  ]; then
	prog_header
	echo "Usage"
	echo "$0 your_image_file"
	exit 0
fi


warning() {
	printf "\e[0;31m$1\e[0m \n"
}

check_ok() {
	printf "\e[0;32m$1\e[0m \n"
}

ffmpeg_check=$(which ffmpeg)
size_check=307200
size_desc="320x480"

if [ "$ffmpeg_check" != "" ]; then
	OUTPUT=$(echo "$1" | cut -d'.' -f1).raw565
	clear
	prog_header
	ffmpeg -i $1 -f rawvideo -pix_fmt rgb565 $OUTPUT
	clear
	prog_header
	FILESIZE=$(cat $OUTPUT | wc -c)
	if [ $FILESIZE -eq $size_check ]; then
		check_ok "$OUTPUT is ready to be flashed."
	else
		rm $OUTPUT
		warning "$OUTPUT filesize mismatches! Wrong image size ($size_desc)? Aborted."
		exit 0
	fi
	echo "In order to flash this image you have to plug your phone in fastboot mode."
	read -p "Flash it now? (y/n) "
	if [ "$REPLY" == "y" ] || [ "$REPLY" == "Y" ]; then
		fastboot devices | grep -q "fastboot"
		if [ $? -ne 0 ]; then
			warning "The USB cable is not plugged, or the device is not in fastboot mode."
			echo "To flash the splash screen, manually execute this command once in fastboot mode:"
			echo "fastboot flash splash1 $OUTPUT"
			exit 0
		else
			fastboot flash splash1 $OUTPUT
		fi
	else
		echo "To flash the splash screen, execute this command once in fastboot mode:"
		echo "fastboot flash splash1 $OUTPUT"
		exit 0
	fi
else
	warning "ffmpeg not found! Please install it before running this script!\ni.e. (DEBIAN) apt-get install ffmpeg / (OSX) sudo port install ffmpeg"
fi
Some ready-to-flash raw565 images (link on the images):
Last edited by elegos; 18th May 2010 at 11:24 PM.
The Following User Says Thank You to elegos For This Useful Post: [ View ]
17th May 2010, 10:01 PM   |  #2  
dferreira's Avatar
Senior Member
Flag Oulu
Thanks Meter: 60
 
1,370 posts
Join Date:Joined: Jan 2007
Donate to Me
More
Thanks, this simplifies the process Works great on my Mac OSX SL.
18th May 2010, 11:18 PM   |  #3  
Gen00's Avatar
Senior Member
Miami
Thanks Meter: 122
 
985 posts
Join Date:Joined: Apr 2010
Where can i download it for the Mac would love to create my own Splash Screen..
18th May 2010, 11:22 PM   |  #4  
elegos's Avatar
OP Senior Member
Flag Milano
Thanks Meter: 125
 
404 posts
Join Date:Joined: Jul 2009
More
You need:
- MacPorts installed
- ffmpeg installed via macports (sudo port install ffmpeg)

- Open the terminal -> nano splash_creator
- copy / paste the code
- [CTRL]+O, then [ENTER]. [CTRL]+X
- chmod +x splash_creator

- Put the image you want as splash screen in a folder where the script is (it is actually in your home)
- Open terminal -> cd your/folder/here
- ./splash_creator your_image_here.whatever
19th May 2010, 02:34 AM   |  #5  
Senior Member
Flag Jakarta
Thanks Meter: 8
 
245 posts
Join Date:Joined: Jul 2009
More
great tools
really great tools man .. works really nice on my ubuntu ..

anyway, have any idea how to create the boot animation?
19th May 2010, 11:58 AM   |  #6  
elegos's Avatar
OP Senior Member
Flag Milano
Thanks Meter: 125
 
404 posts
Join Date:Joined: Jul 2009
More
nope, I only know it's in /system/media/bootanimation.zip (at least in the latest cyanogenmod), but I haven't figured out how's supposed to be created =\
26th May 2010, 05:41 PM   |  #7  
sim64one's Avatar
Member
Flag Fanna - FVG - ITaly
Thanks Meter: 0
 
71 posts
Join Date:Joined: Apr 2009
More
Wink splash
Thank you guys.

The best/simple guide to change boot splash screen in 1 minute!

I've only added "sudo" to my ubuntu terminal to run it!

my own splash
Last edited by sim64one; 26th May 2010 at 07:38 PM. Reason: add pic
27th May 2010, 05:55 PM   |  #8  
dancerobot's Avatar
Senior Member
Flag Montreal
Thanks Meter: 7
 
100 posts
Join Date:Joined: Aug 2009
More
Thumbs up Thanks!
Wow, thanks, works like a charm.

For anyone who happens to like Jeanne d'Arc (Joan of Arc), here is my splash screen, feel free to use it:



And an associated boot animation

(I wrote my undergrad thesis about her)

Thanks again!
Last edited by dancerobot; 28th May 2010 at 05:43 AM.
30th August 2010, 05:09 PM   |  #9  
marquardt1219's Avatar
Member
Flag fayettville,nc
Thanks Meter: 2
 
72 posts
Join Date:Joined: Aug 2010
ok where is the link lol?
2nd September 2010, 03:27 PM   |  #10  
Senior Member
Flag Chicagoland
Thanks Meter: 28
 
241 posts
Join Date:Joined: Jul 2010
More
Quote:
Originally Posted by elegos

You need:
- MacPorts installed
- ffmpeg installed via macports (sudo port install ffmpeg)

- Open the terminal -> nano splash_creator
- copy / paste the code
- [CTRL]+O, then [ENTER]. [CTRL]+X
- chmod +x splash_creator

- Put the image you want as splash screen in a folder where the script is (it is actually in your home)
- Open terminal -> cd your/folder/here
- ./splash_creator your_image_here.whatever

You don't necessarily need to download macports. Just grab an ffmpeg binary from wherever (included in lots of software distributions on Mac, like the KMTTG TiVo file decoder, Handbrake, etc) and just do it from the command line.

ffmpeg -i mygraphic.jpg -f rawvideo -pix_fmt rgb565 mygraphic.raw656

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes