[Hero, G2 Touch Themes and Apps] phaelox:
Here's a tutorial for those wanting to make their own (animated) bootscreen for the HTC Hero. Decided to write it after I'd seen a couple of posts from people asking about this, and some encouragement from yet another. I've tried to write this in greatest detail possible, so everyone can have a go at doing this.

Tools

It's really quite simple, if you have the proper tools for the job:

SignAPK.jar + testkey.pk8 + testkey.x509.pem

SignAPK.cmd (batch file written by me to facilitate signapk.jar use)

Graphics editor that can work with animated GIF files (Adobe Photoshop or Fireworks recommended)

a plain text editor capable of editing UNIX files (if you're unsure about this, use the free, and open source Notepad++. You can get the Installer.exe here.)

These aren't required, but make things easier:

Android SDK Tools installed (working adb.exe at the very least)

Hero's stock bootscreen to start from)

I have attached two stock Hero bootscreens (one with and one without the HTC startup sound), as well a zip file with the signapk files.

Setting up SignAPK

First, make sure you have Java installed. If not go to www.java.com to install it.

Second, I recommend to unzip the SignAPK_xda.zip file to C:\SignAPK.

Lastly, add the signapk folder to your PATH environment variable:

[*]Go to Control Panel, System

[*]Click on "Advanced" (or "Advanced System Settings")

[*]Click the button "Environment Variables..."

[*]Locate the PATH variable under "User Variables" (or "System variables" if you want to use SignAPK under other user accounts) and double-click it to edit

[*]In the "Variable Value" field, at the end of the line, type a semi-colon and the path to the signapk files ;C:\SignAPK

[*]You could also add the path to your java.exe file here if you have troubles with running signapk.
​

A note on signapk.CMD

I wrote this batch file so it's possible to sign a zip file from a command line with the least amount of typing (saves time and less chance of a typo). It will check for java.exe and if it doesn't find it in your %PATH% it will let you know and try anyway. It will also prompt you to overwrite or not, if it finds the signed destination file already exists. Open in notepad to find out more.

Contents of bootscreen_stock.zip

You can delete the following three files, as they are created by the signing process:

META-INF\CERT.RSA

META-INF\CERT.SF

META-INF\MANIFEST.MF

This file contains the command to copy the files to the SYSTEM: volume on your device - you never need to edit this:

META-INF\com\google\android\update-script

This file tells Android how and which files to display - open in Notepad++:

system\media\bootscreen\boot_animation.xml

Then we have the actual bootscreen files:

system\media\bootscreen\boot1.gif - shown first, and plays only once

system\media\bootscreen\boot2.gif - shown after first ends, and loops forever (i.e. until end of boot sequence)

system\media\bootscreen\boot_bg.gif - optional file, this file is used as background during entire boot sequence if the 2 aforementioned files are smaller than Hero's screen

system\media\bootscreen\boot.mp3 - optional sound file, played once during boot

boot_animation.xml file contents

<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (C) 2008 HTC Inc.
*
-->

[COLOR="Red"]<!-- For new bootup animation
<BootConfiguration>
<BootAnimation
image="/system/media/bootscreen/boot.gif"
audio="/system/media/bootscreen/boot.mp3"
image2="/system/media/bootscreen/boot2.gif" (optional)
image3="/system/media/bootscreen/boot3.gif" (optional)
screenX="100" (optional)
screenY="130" (optional)
image_bg = "/system/media/bootscreen/boot_bg.gif" (optional)
useAudio="1" // 1: true ; 0:false (optional)
/>
</BootConfiguration>
-->
[/COLOR]

[COLOR="Green"]<!-- For cropped version -->
<BootConfiguration>
<BootAnimation
image="/system/media/bootscreen/boot.gif"
image2="/system/media/bootscreen/boot2.gif"
image3="/system/media/bootscreen/boot2.gif"
loopimage="/system/media/bootscreen/boot2.gif"
image_bg="/system/media/bootscreen/boot_bg.gif"
audio="/system/media/bootscreen/boot.mp3"
screenX="10"
screenY="180"
useAudio="1"
/>
</BootConfiguration>
[/COLOR]

[COLOR="Red"]<!-- For full screen version -->
<!--BootConfiguration>
<BootAnimation
image="/system/media/bootscreen/boot.gif"
audio="/system/media/bootscreen/boot.mp3"
useAudio="1"
/>
</BootConfiguration-->[/COLOR]

This is the file included with the stock bootscreen. This file actually contains 3(!) configurations, however the first and third (red-colored) have been commented out. In short, edit the middle (green-colored) "BootConfiguration" section.

Delete the line that begins with image3= as you won't need it.

If you do not wish to include a startup sound, delete lines starting with:

audio=

useaudio=

Alternatively, simply set useAudio=0

If you boot1.gif and boot2.gif files are both 320x480 pixels, delete lines starting with:

image_bg=

screenX=

screenY=

Alternatively, simply set screenX=0 and screenY=0

If you delete the audio= and image_bg= lines, you can ofcourse delete the files audio.mp3 and image_bg.gif to keep the update.zip as small as possible.

ScreenX and ScreenY are coordinates in pixels, that tell Android where to place the GIF files on the screen. Top-left of the screen would be ScreenX=0 and ScreenY=0; bottom-right would be ScreenX=320 and ScreenY=480. This means that if you make a GIF file that is 200 px wide and 180px high and you wish to center this on the screen, you'd use ScreenX=60 and ScreenY=150 (i.e. ScreenX=320-200=120/2=60 and ScreenY=480-180=300/2=150). If your GIF files are exactly 320x480 pixels, you can set ScreenX and ScreenY both to 0, or leave those two lines out entirely.

Creating a GIF animation from scratch

(boot1.gif and boot2.gif)

Using

Adobe Photoshop CS4

(cannot speak for older versions, I think you'd need the now discontinued Adobe ImageReady instead):

Create a layer for each frame of your animation (yes, I didn't say creating an animation from scratch wouldn't be a lot of work:p)

Click Window -> Animation to show the Animation panel

Click the panel menu (top right icon in panel) and choose "Make Frames from Layers"

If the frames are loaded in reverse from what you intended, choose "Reverse Frames" from the Animation panel menu

From the panel menu, choose "Optimize Animation" and UNtick both "Bounding Box" and "Redundant Pixel Removal"

Finally, go to File -> Save for Web & Devices, UNtick "Transparency" and play with some of the options to reduce file size.

To (re-)open an animated GIF file in Photoshop CS4, go to File -> Import -> Video Frames to Layers and type in the file name box *.gif then hit the Enter key so you can see GIF files, browse to it, select and click Load.

Using

Adobe Fireworks CS4

:

Make sure the "States" panel is visible, via Window -> States

Create a new "State" for each frame of your animation

To set frame delays, or basically set how long each frame will be shown for, in 100ths of a second, select one or more states and right-click, choose "Properties"

Make sure you do not use transparency (this gave me problems)

To save, go to File -> Save As, set "Save as Type" to "Animated GIF (*.gif)" and "click Options"

Do check "Dither" for better looking gradients and transitions

Play with the options on the first tab to reduce file size

On the "Animation" tab, UNcheck "Crop each state" (don't do this and get some crazy glitchy results in your bootscreen)

Creating a GIF animation by converting a G1 bootscreen animation to Hero format

(boot1.gif and boot2.gif)

You can also import a bunch of PNG files as layers (and subsequently frames) from, for example, a G1 bootscreen.

The fastest way in my experience is simply using Fireworks' File -> Open dialog, make sure all files are in one directory, select them all, do check the "Open as Animation" checkbox and click "Open". This will open each file into its own state in one big file. Then use instructions above to set frame delays and proceed to save as animated GIF.

You can also do it in Photoshop, but this method is very slow, via File -> Scripts -> Load Files into Stack (UNtick "Create Smart Object after loading layers"). Then follow the steps above to create an animated GIF file.

Compiling your bootscreen

If you have the files you want, it's time to zip them and then sign the zip file.

Make a folder "mybootscreen" and unzip the stock bootscreen into that, so it looks like this:

META-INF\CERT.RSA

META-INF\CERT.SF

META-INF\MANIFEST.MF

META-INF\com\google\android\update-script

system\media\bootscreen\boot_animation.xml

system\media\bootscreen\boot1.gif

system\media\bootscreen\boot2.gif

system\media\bootscreen\boot_bg.gif

system\media\bootscreen\boot.mp3

Delete those first 3 files, edit the XML file as needed and replace the GIF files with your own (see my explanations above).

Use for example 7-zip to select the 2 folders META-INF and system and click "Add" (to create new archive)

Make sure you set "Archive Format" to ZIP

Open a Command Prompt window (click Start, Run, type cmd and click OK, or if you have Vista or Windows 7, click Start, type cmd and hit Enter key)

Use this command to go to the directory with your zip file: CD /D C:\path\to\your\file

Type signapk mybootscreen.zip and hit Enter key

Barring any typo's you should now have a file named mybootscreen_signed.zip. You can copy that to the root of your SDCARD and flash it via your recovery image, or use DroidExplorer's flash function.

If this tutorial was of any use to you, or you have ideas to make it better, please reply and let me know. Thanks for reading!

EDIT (2010-04-11): updated SignApk_xda_v20100411.zip. Fixed a couple of forgotten quotes in signapk.cmd that made signing files with spaces in their filenames impossible. New zipfile attached.