Android OS Forum banner
1 - 18 of 18 Posts

·
Boot Themer
Joined
·
483 Posts
Android Boot Animations 101

Recent updates in blue
Incorrect information to be removed in next update in red (sorry...)

Although there may be one out there, I have not found a comprehensive boot animation thread in any of the several forums that I frequent. I have found many threads with information on boot animations, and wish I could find them all now to give credit for all the information in this tutorial. Most of the info is from others, I am just putting it all in one place, although there are also some tips and tricks that I have found through trial and error. If anyone has done work with boot animations, and have some helpful hints or tips, feel free to post them, and I will add to the OP. Same goes if you find I made a mistake, let me know and I'll fix it.

Also, I should note that while the animation itself, AFAIK, is the same on all Android devices, the filename and location can vary on some devices. Because I use a Droid X, this tutorial is written from that perspective, but I hope to eventually include a table of filenames and locations for other devices as well. I don't believe there is a lot of variation, though.

Update: I have learned that some Samsung devices use a completely different boot animation format. I have no idea how to make animations in that format, but in most cases, changing to a custom ROM will allow normal animations to be used.

And, finally, I have to say this;

Neither I nor rootzwiki are in any way responsible for what you do to your device.

The boot animation on an Android phone is contained in a .zip file. It has two parts, the individual frames, contained in one or more folders, and a desc.txt file. The boot process checks two locations for the animation. First, it checks /data/local, then /system/media. What this means is that the animation can be saved in either location (some custom ROMs may change this, but if one location doesn't work, the other usually does). Personally, I always put them in /data/local, because the stock animation is located in /system/media; there is no need to rename or delete the stock animation, and switching back to stock is a simple matter of deleting the custom one in /data/local.

The desc.txt file

The desc.txt file is a simple file that instructs the system how to play the animation. I will use the stock animation from the Droid X as an example (with the s line added).

480 480 10

p 1 0 part0
s androidaudio.mp3

c 0 0 part1


The first line is the frame size and the frame rate, in the example, the frames are 480 px wide by 480 px tall and plays at 10 frames per second. You can use a smaller image size, and a larger framesize in the desc.txt, and it will stretch it, at least on Gingerbread-based ROMs (Please let me know if this does not work on a specific ROM/device). This can produce a fairly large improvement in smoothness at a small cost in resolution. The framesize in the desc.txt can be any size up to the resolution of the device. For example, on the Droid X, the maximum frame size is 480 x 854.

Another tip on the desc.txt file. I'm not sure how to explain it in programming lingo, but the line breaks in the file cannot be hard returns. In the images below, the first is being edited in Notepad++, the second in regular Notepad. They are the exact same file. Note that in regular Notepad, it all shows on one line. If the line breaks are hard returns (they would show on seperate lines in regular Notepad), the animation won't work.





p = Play folder

First # = How many time to repeat the folder (0 = infinite loop, until boot process completes)

Second # = How long to pause before going to the next folder in frames; i.e. at a frame rate of 10 fps, putting 10 as the second # would equal a pause of 1 second.

part0 = Simply the name of the folder containing the frames for that part of the animation. Any name will work here as long as the folder has the same name. For simplicity, I just use part0, part1, etc as folder names.

s = Play sound

androidaudio.mp3 = sound file name (more on this below)

As you can see, the stock animation first plays all the images in the folder named part0, one time, and then immediately moves to the next folder, part1, and plays the images in that folder in a continuous loop until the boot process completes.

c = Play entire part, even if bootup completes. This information is thanks to muzso, who did some digging of his own (I'm about a year late in adding it in, sorry). The c line is apparently new in Jelly Bean, and enables you to provide a nice finish to your animation by specifying a folder finishes playing even if the bootup process finishes first. In his example, muzso has two folders with the c line, one is on repeat (first number 0), the second plays once. So the first one repeats continuously during bootup, but when bootup completes, it finishes the round it is on, then plays the final folder before going to the lockscreen. This opens up many opportunities for creativity, and although I am no longer in the bootanimation game, those of you that are have a chance to create some great looking animations. Instead of the animation abruptly stopping when bootup completes, you can take a couple extra seconds to finish it off in a nice fade-out or whatever you come up with. Here's a link to his blog entry on this, it's a little more technical than my summary here, but explains it very well.

The frames

The individual frames are usually saved as either .jpg or .png files; other filetypes may work but I have not tried them. I usually use .jpg because of their smaller size, they tend to run smoother. The frames can be named in any way you like, but will always be played in alphabetical/numerical order. For simplicity, I just name them with numbers, 000, 001, 002, etc.

To determine the number of frames to be used is a simple math problem. I typically shoot for a maximum of 8-10 seconds for the non-looping part of the animation, to ensure that it plays completely on all devices, as boot times can vary quite a bit even on the same device. 8 seconds times x frames per second = 8x frames. So at 10 frames per second, the maximum number of frames is 80. I have made animations that run at higher than 10 fps, but over 20-25, it tends to lag a little, at least on my phone. You can experiment with this. Also, fullscreen animations are more prone to lag for obvious reasons. As mentioned above, reducing the image size while keeping the framesize in the desc.txt the same will reduce lag in fullscreen animations.

The folders

You should have guessed how these work by now. You have lots of flexibility by using the folders. You can have as many folders as you like, as long as they are all called by the desc.txt file. You can have a folder play 3 times, then the next play once, and the last loop; you can simply have one looping folder; use your imagination.

The .zip

After you have all the frames saved correctly in their folders, and the desc.txt file created, select all of them and zip them up. This is the key - many people have had issues because of this simple step - THE CONTENTS CANNOT BE COMPRESSED. Set the compression level to "store" or "none" or whatever the program you use calls it.
For Linux users (thanks to mcmillanje):
To zip w/o compression on Linux open a terminal, CD to your folder that contains the "part0" "part1" etc folders and the desc file then run the following command:

"zip -Z store bootanimation.zip part0/* part1/* desc.txt" ...also add any other files you need to include at the end.

Using zip -Z store will make an uncompressed archive.

The .zip MUST BE named "bootanimation.zip" or it will not work (As stated earlier, this may be different on different devices).

Creating your custom animation

I am not an artist, and have not done any truly original animations, but if you are, you probably know most of what I'm going to say here. There are a few different ways to make your own animations. The first, and slowest method, is to use your preferred photo editing/drawing software (Gimp is a good free one) to create each individual frame, usually by creating the first one, then making slight changes for each subsequent frame. Again, remember to name each frame in alphabetical/numerical order.

Option #2 is to use animation software to create the frames. Because I do not have any such software on my computer, I'm going to take the easy way out on this one and assume that if you do, you know how to use it .

Option #3 is to create an animation from an existing video or animation on your computer/the internet.

Disclaimer: Please respect copyright laws if you choose this route.

There are a few free programs that will convert a video to individual frames in .jpg format. At the end of this tutorial is a link to one I have used. It is fairly quick and easy to use. The only issue with it is that it tends to repeat frames here and there, which can be noticeable at slower fps rates.

After converting to .jpg's, they must be cropped/resized to what you want. I use Photoshop's batch automation feature for this, but there may be other programs that do it. Again, I'm going to assume that if you have it, you know how to use it, as this is not a Photoshop tutorial. Now you can add other effects, such as fading, colorizing, etc, just use your imagination. Some things, like colorizing can be done using batch automation, others, like fading, I do the old-fashioned way, by adjusting and saving each frame. Finally, I use batch animation again to rename all the images to the simple 000, 001, 002, etc. format.

Sound

First of all, I haven't done a lot of research on this yet. Thanks to mattmartin77, I have a little info for you. Attached at the end is a zip file containing a file to be pushed to /system/bin to enable sound in the animation (I believe this is just for FroYo). Copy your audio file to /system/media and /data/local (not sure why it needs to be both, I'm guessing because some roms check one, and some check the other...)

Also, thanks to Casen for the following: If you have gingerbread, it looks for sound in /system/media/audio/notifications/, so you can copy your audio file there instead, making sure it is called in the desc.txt. And, there is no need to push the file to /system/bin as the audio functionality is built-in on gingerbread.

One more thing, you can put the "s audio.mp3" line after the folder you want it to start playing on. In other words, if you want the first part of the animation to be silent for some reason, put the "s" call after the second "p" call.

Installing the boot animation

There are several ways to install a new boot animation. The first way is manually: as described above, copy the animation to the correct directory, and ensure it is named properly. I usually give the animation a meaningful name before copying to the phone, such as "drcbootanimation.zip", to help keep them straight. After copying to the proper folder, I simply rename and remove the "drc" from the beginning.

Option #2 actually takes a little longer, but is easier for most people. It is using a flashable .zip file in clockwork recovery. There are a couple versions of the flashable .zip out there, and I honestly don't even know who originally made them, but it was not me . The one I use copies the animation to /data/local. I use it for the same reason I stated above, because it does not overwrite the stock animation. I will also include a link for it at the end of this tutorial.

To add your new animation to the flashable .zip, open the zip using 7zip or your preferred zip utility. In 7zip, open the data folder, then the local folder and you will see the bootanimation.zip. The installer comes with an animation I made for the Liberty ROM, just for practice. It is only in there as kind of a placeholder so you know for sure where to put yours. Simply drag your new bootanimation.zip (make sure it is named exactly that if using this option, you can save the meaningful name for the install .zip itself) to 7zip while viewing the /local folder to replace the existing animation. Your done! Transfer the install .zip to your phone, and install from zip in clockwork and enjoy.

Links

7zip
Gimp
Video to JPG converter
Install .zip
Sound files

Future plans

I hope to add a few things to this tutorial in the future, but I just wanted to get a good, basic animation tutorial done for now. Here are my plans:

- Add table with filenames and install locations for other devices.
- Add tutorial for adding sound (I haven't played with this much, as I don't really care for sound in my bootup process, so I need to do a little more research first). Edit: Started. Thanks matt
- Add a troubleshooting process for any problems you run into.
- Add screenshots for parts of the tutorial.
 

·
Average Android
Joined
·
93 Posts
Somehow you have managed to make this post extremely clear and vague all at the same time. If I ever get free time from work, I may just have to sit down and give this a go. Thx for the info.

I'm going to take the easy way out on this one and assume that if you do, you know how to use it .
 

·
Boot Themer
Joined
·
483 Posts
Discussion Starter · #3 ·
crash1781 said:
Somehow you have managed to make this post extremely clear and vague all at the same time. If I ever get free time from work, I may just have to sit down and give this a go. Thx for the info.
lol Maybe I should go through and clear it up a little... I wrote this pretty late at night a while ago, and haven't really gotten much done on it since, unfortunately. Hope it makes enough sense to help you out a little
Any questions, don't hesitate to ask... I'm still kinda learning as I go, but two heads are better than one
 

·
Androidphiliac
Joined
·
43 Posts
Nice tutorial! While I've made some before, you've pointed out a couple things that will make my life easier. Thanks!

Sent from my ADR6400L using Tapatalk
 

·
Themer
Joined
·
110 Posts
Nice work I will have to attempt
 

·
Supporting Member
Joined
·
127 Posts
Great tutorial.
Something I had to figure out:
To zip w/o compression on Linux open a terminal, CD to your folder that contains the "part0" "part1" etc folders and the desc file then run the following command:

"zip -Z store bootanimation.zip part0/* part1/* desc.txt" ...also add any other files you need to include at the end.

Using zip -Z store will make an uncompressed archive.
 

·
Boot Themer
Joined
·
483 Posts
Discussion Starter · #9 ·
mcmillanje said:
Great tutorial.
Something I had to figure out:
To zip w/o compression on Linux open a terminal, CD to your folder that contains the "part0" "part1" etc folders and the desc file then run the following command:

"zip -Z store bootanimation.zip part0/* part1/* desc.txt" ...also add any other files you need to include at the end.

Using zip -Z store will make an uncompressed archive.
Thanks for the info, will add to OP.
 

·
Android-Aholic
Joined
·
1,247 Posts
ok, im on miui on the droid x and ive tried this tutorial and many others and i cant for the life of me get the boot sound to work. if you get the time could you look into a fix for me? thanks, and nice write up by the way.
 

·
Boot Themer
Joined
·
483 Posts
Discussion Starter · #12 ·
"fakiesk8r333 said:
ok, im on miui on the droid x and ive tried this tutorial and many others and i cant for the life of me get the boot sound to work. if you get the time could you look into a fix for me? thanks, and nice write up by the way.
I had it working on miui when I was using it... It was a process getting it to work though. When I get back to my computer later I'll see if I can find the info I used.
 

·
Boot Themer
Joined
·
483 Posts
fakiesk8r333 said:
ok, im on miui on the droid x and ive tried this tutorial and many others and i cant for the life of me get the boot sound to work. if you get the time could you look into a fix for me? thanks, and nice write up by the way.
UPDATED: This is now a 1-step process
This is based on miui 1.8.19, no guarantees on other versions, although I can do it for other versions as well. Do not use on other roms.
Credit to NUNsLAUGHTER92 @ dxf for this, I just put it in an update zip.

DO NOT USE THIS ON ANY OTHER DEVICES IT IS ONLY FOR THE DROID X. This replaces your build.prop which is very device-specific. If you want a zip like this for your phone, let me know. Also, this can be done for any cm-based rom.

Download file
Reboot into recovery
Install zip from sd card (choose file)
Reboot and enjoy :)

To change sound (I used the THX boot sound from old-school ApeX)
rename any mp3 file to "android_audio" and copy to /data/local, replacing the existing file.

Also adding this to OP.
 

·
Boot Themer
Joined
·
483 Posts
Discussion Starter · #15 ·
"reygeoffrey said:
Will this work on OMFGB ron?
If you're talking about the tutorial in general, yes. There may be specifics that are different, such as install location, but for most roms, data/local works.
 

·
Scripting Samurai
Joined
·
1,034 Posts
Android Boot Animations 101

Recent updates in blue
Incorrect information to be removed in next update in red (sorry...)

Although there may be one out there, I have not found a comprehensive boot animation thread in any of the several forums that I frequent. I have found many threads with information on boot animations, and wish I could find them all now to give credit for all the information in this tutorial. Most of the info is from others, I am just putting it all in one place, although there are also some tips and tricks that I have found through trial and error. If anyone has done work with boot animations, and have some helpful hints or tips, feel free to post them, and I will add to the OP. Same goes if you find I made a mistake, let me know and I'll fix it.

Also, I should note that while the animation itself, AFAIK, is the same on all Android devices, the filename and location can vary on some devices. Because I use a Droid X, this tutorial is written from that perspective, but I hope to eventually include a table of filenames and locations for other devices as well. I don't believe there is a lot of variation, though.

Update: I have learned that some Samsung devices use a completely different boot animation format. I have no idea how to make animations in that format, but in most cases, changing to a custom ROM will allow normal animations to be used.

And, finally, I have to say this;

Neither I nor rootzwiki are in any way responsible for what you do to your device.

The boot animation on an Android phone is contained in a .zip file. It has two parts, the individual frames, contained in one or more folders, and a desc.txt file. The boot process checks two locations for the animation. First, it checks /data/local, then /system/media. What this means is that the animation can be saved in either location (some custom ROMs may change this, but if one location doesn't work, the other usually does). Personally, I always put them in /data/local, because the stock animation is located in /system/media; there is no need to rename or delete the stock animation, and switching back to stock is a simple matter of deleting the custom one in /data/local.

The desc.txt file

The desc.txt file is a simple file that instructs the system how to play the animation. I will use the stock animation from the Droid X as an example (with the s line added).

480 480 10

p 1 0 part0
s androidaudio.mp3

p 0 0 part1


The first line is the frame size and the frame rate, in the example, the frames are 480 px wide by 480 px tall and plays at 10 frames per second. You can use a smaller image size, and a larger framesize in the desc.txt, and it will stretch it, at least on Gingerbread-based ROMs (Please let me know if this does not work on a specific ROM/device). This can produce a fairly large improvement in smoothness at a small cost in resolution. The framesize in the desc.txt can be any size up to the resolution of the device. For example, on the Droid X, the maximum frame size is 480 x 854.

Another tip on the desc.txt file. I'm not sure how to explain it in programming lingo, but the line breaks in the file cannot be hard returns. In the images below, the first is being edited in Notepad++, the second in regular Notepad. They are the exact same file. Note that in regular Notepad, it all shows on one line. If the line breaks are hard returns (they would show on seperate lines in regular Notepad), the animation won't work.





p = Play folder

First # = How many time to repeat the folder (0 = infinite loop, until boot process completes)

Second # = How long to pause before going to the next folder in frames; i.e. at a frame rate of 10 fps, putting 10 as the second # would equal a pause of 1 second.

part0 = Simply the name of the folder containing the frames for that part of the animation. Any name will work here as long as the folder has the same name. For simplicity, I just use part0, part1, etc as folder names.

s = Play sound

androidaudio.mp3 = sound file name (more on this below)

As you can see, the stock animation first plays all the images in the folder named part0, one time, and then immediately moves to the next folder, part1, and plays the images in that folder in a continuous loop until the boot process completes.

The frames

The individual frames are usually saved as either .jpg or .png files; other filetypes may work but I have not tried them. I usually use .jpg because of their smaller size, they tend to run smoother. The frames can be named in any way you like, but will always be played in alphabetical/numerical order. For simplicity, I just name them with numbers, 000, 001, 002, etc.

To determine the number of frames to be used is a simple math problem. I typically shoot for a maximum of 8-10 seconds for the non-looping part of the animation, to ensure that it plays completely on all devices, as boot times can vary quite a bit even on the same device. 8 seconds times x frames per second = 8x frames. So at 10 frames per second, the maximum number of frames is 80. I have made animations that run at higher than 10 fps, but over 20-25, it tends to lag a little, at least on my phone. You can experiment with this. Also, fullscreen animations are more prone to lag for obvious reasons. As mentioned above, reducing the image size while keeping the framesize in the desc.txt the same will reduce lag in fullscreen animations.

The folders

You should have guessed how these work by now. You have lots of flexibility by using the folders. You can have as many folders as you like, as long as they are all called by the desc.txt file. You can have a folder play 3 times, then the next play once, and the last loop; you can simply have one looping folder; use your imagination.

The .zip

After you have all the frames saved correctly in their folders, and the desc.txt file created, select all of them and zip them up. This is the key - many people have had issues because of this simple step - THE CONTENTS CANNOT BE COMPRESSED. Set the compression level to "store" or "none" or whatever the program you use calls it.
For Linux users (thanks to mcmillanje):
To zip w/o compression on Linux open a terminal, CD to your folder that contains the "part0" "part1" etc folders and the desc file then run the following command:

"zip -Z store bootanimation.zip part0/* part1/* desc.txt" ...also add any other files you need to include at the end.

Using zip -Z store will make an uncompressed archive.

The .zip MUST BE named "bootanimation.zip" or it will not work (As stated earlier, this may be different on different devices).

Creating your custom animation

I am not an artist, and have not done any truly original animations, but if you are, you probably know most of what I'm going to say here. There are a few different ways to make your own animations. The first, and slowest method, is to use your preferred photo editing/drawing software (Gimp is a good free one) to create each individual frame, usually by creating the first one, then making slight changes for each subsequent frame. Again, remember to name each frame in alphabetical/numerical order.

Option #2 is to use animation software to create the frames. Because I do not have any such software on my computer, I'm going to take the easy way out on this one and assume that if you do, you know how to use it .

Option #3 is to create an animation from an existing video or animation on your computer/the internet.

Disclaimer: Please respect copyright laws if you choose this route.

There are a few free programs that will convert a video to individual frames in .jpg format. At the end of this tutorial is a link to one I have used. It is fairly quick and easy to use. The only issue with it is that it tends to repeat frames here and there, which can be noticeable at slower fps rates.

After converting to .jpg's, they must be cropped/resized to what you want. I use Photoshop's batch automation feature for this, but there may be other programs that do it. Again, I'm going to assume that if you have it, you know how to use it, as this is not a Photoshop tutorial. Now you can add other effects, such as fading, colorizing, etc, just use your imagination. Some things, like colorizing can be done using batch automation, others, like fading, I do the old-fashioned way, by adjusting and saving each frame. Finally, I use batch animation again to rename all the images to the simple 000, 001, 002, etc. format.

Sound

First of all, I haven't done a lot of research on this yet. Thanks to mattmartin77, I have a little info for you. Attached at the end is a zip file containing a file to be pushed to /system/bin to enable sound in the animation (I believe this is just for FroYo). Copy your audio file to /system/media and /data/local (not sure why it needs to be both, I'm guessing because some roms check one, and some check the other...)

Also, thanks to Casen for the following: If you have gingerbread, it looks for sound in /system/media/audio/notifications/, so you can copy your audio file there instead, making sure it is called in the desc.txt. And, there is no need to push the file to /system/bin as the audio functionality is built-in on gingerbread.

One more thing, you can put the "s audio.mp3" line after the folder you want it to start playing on. In other words, if you want the first part of the animation to be silent for some reason, put the "s" call after the second "p" call.

Installing the boot animation

There are several ways to install a new boot animation. The first way is manually: as described above, copy the animation to the correct directory, and ensure it is named properly. I usually give the animation a meaningful name before copying to the phone, such as "drcbootanimation.zip", to help keep them straight. After copying to the proper folder, I simply rename and remove the "drc" from the beginning.

Option #2 actually takes a little longer, but is easier for most people. It is using a flashable .zip file in clockwork recovery. There are a couple versions of the flashable .zip out there, and I honestly don't even know who originally made them, but it was not me . The one I use copies the animation to /data/local. I use it for the same reason I stated above, because it does not overwrite the stock animation. I will also include a link for it at the end of this tutorial.

To add your new animation to the flashable .zip, open the zip using 7zip or your preferred zip utility. In 7zip, open the data folder, then the local folder and you will see the bootanimation.zip. The installer comes with an animation I made for the Liberty ROM, just for practice. It is only in there as kind of a placeholder so you know for sure where to put yours. Simply drag your new bootanimation.zip (make sure it is named exactly that if using this option, you can save the meaningful name for the install .zip itself) to 7zip while viewing the /local folder to replace the existing animation. Your done! Transfer the install .zip to your phone, and install from zip in clockwork and enjoy.

Links

7zip
Gimp
Video to JPG converter
Install .zip
Sound files

Future plans

I hope to add a few things to this tutorial in the future, but I just wanted to get a good, basic animation tutorial done for now. Here are my plans:

- Add table with filenames and install locations for other devices.
- Add tutorial for adding sound (I haven't played with this much, as I don't really care for sound in my bootup process, so I need to do a little more research first). Edit: Started. Thanks matt
- Add a troubleshooting process for any problems you run into.
- Add screenshots for parts of the tutorial.
Great write up. I know this is old but is there any chance you can post new links for the zip file and sound files? MegaUpload is no more so those links are now bad.
 
1 - 18 of 18 Posts
Top