[HOW-TO] Boot Animations 101

Discussion in 'Droid X Hacks' started by Dr. Carpenter, Apr 26, 2011.

  1. Dr. Carpenter
    Offline

    Dr. Carpenter New Member

    Joined:
    Jan 8, 2011
    Messages:
    496
    Likes Received:
    1
    Trophy Points:
    0
    Android Boot Animations 101


    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.

    And, finally, I have to say this;

    Neither I nor droidforums.net 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
    s androidaudio.mp3
    p 1 0 part0
    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. The frame size must match the image size of the frames, but 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.

    s = Play sound

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

    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.

    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.

    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.

    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 before 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 first "p" call.

    Installing the boot animation


    There are two 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:
    http://www.7zip.com
    Gimp:
    http://www.gimp.org
    Video to JPG converter:
    Free Video to JPG Converter - Free software downloads and software reviews - CNET Download.com
    Install .zip:
    View attachment 32003
    Sound file:
    View attachment 32131

    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.
    Last edited: Apr 29, 2011
  2. rabidturtles359
    Offline

    rabidturtles359 New Member

    Joined:
    Mar 13, 2011
    Messages:
    169
    Likes Received:
    0
    Trophy Points:
    0
    What is different for the droid 2?it can't be that much?

    Sent from a Place where Liberty is Untamed by a a Droid2
  3. Dr. Carpenter
    Offline

    Dr. Carpenter New Member

    Joined:
    Jan 8, 2011
    Messages:
    496
    Likes Received:
    1
    Trophy Points:
    0
    Absolutely nothing :)

    Sent from my DROIDX using DroidForums
  4. rabidturtles359
    Offline

    rabidturtles359 New Member

    Joined:
    Mar 13, 2011
    Messages:
    169
    Likes Received:
    0
    Trophy Points:
    0
    Woo can't wait to try some stuff out haha

    Sent from a Place where Liberty is Untamed by a a Droid2
    Last edited: Apr 26, 2011
  5. ldopa
    Offline

    ldopa New Member

    Joined:
    Jan 4, 2011
    Messages:
    4,742
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Rochester NY
    I'm on a d2 as well. Well done on this tutorial!

    Sent from my rooted DROID2
  6. mattmartin77
    Offline

    mattmartin77 New Member

    Joined:
    Apr 26, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    South Shore, Mass
    you can add sound too. add this to the desc: s [filename] and put the sound file in system/media and data/local
    and push this file to system/bin
    the original is here too, and yes they should not have an extension
  7. Dr. Carpenter
    Offline

    Dr. Carpenter New Member

    Joined:
    Jan 8, 2011
    Messages:
    496
    Likes Received:
    1
    Trophy Points:
    0
    Thanks for the files matt. I have played around with sound but only on roms that already supported it so I never messed with editing the system files for it. I also know that it doesn't work the same on all phones/android versions and since I am trying to make this cover more than just the DX (I know, I did post in the DX forum lol) I wanted to do some more research before putting up any definite stuff. Just haven't had a lot of time this week. Thanks again for the info tho, I will add it to the op when I get back to my computer. Do you have any more info about this? Such as what versions/phones this works on?

    Sent from my DROIDX using DroidForums

    Edit: Added to OP
    Last edited: Apr 29, 2011
  8. Dr. Carpenter
    Offline

    Dr. Carpenter New Member

    Joined:
    Jan 8, 2011
    Messages:
    496
    Likes Received:
    1
    Trophy Points:
    0
    Thanks! Hopefully after finals I'll have time to add a lot more info, but for now, this should get you by :)
  9. mattmartin77
    Offline

    mattmartin77 New Member

    Joined:
    Apr 26, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    South Shore, Mass
    your welcome for the files. i have been a member at xda, and decided to become one here also. i got the files from xda also. they were pulled from a r2d2 that plays sound. kudos goes to whoever figured that out.
  10. Dr. Carpenter
    Offline

    Dr. Carpenter New Member

    Joined:
    Jan 8, 2011
    Messages:
    496
    Likes Received:
    1
    Trophy Points:
    0
    Lol I figured you had more experience than your post count implied :)

    Sent from my DROIDX using DroidForums
  11. fezrock
    Offline

    fezrock New Member

    Joined:
    Jan 31, 2011
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    0
    Great tutorial! This is what I've been looking for. I understand what I've been doing much better now.

    Thanks!
  12. Dr. Carpenter
    Offline

    Dr. Carpenter New Member

    Joined:
    Jan 8, 2011
    Messages:
    496
    Likes Received:
    1
    Trophy Points:
    0
    Thank you :) Glad to help out... I really gotta get some more info on here but have just started another project, and can't seem to find a lot of time anymore...
  13. Brennan_Huber
    Offline

    Brennan_Huber Theme Developer Theme Developer

    Joined:
    Feb 1, 2011
    Messages:
    311
    Likes Received:
    11
    Trophy Points:
    0
    Location:
    TN
    Great write up!
    I know this has long been gone however Im just now getting into it, and i have a few questions.
    Is there any way to really quickly rename the files (for instance the pictures in part1) to their dimension_ bootanimation000.jpg? Because i see that taking a while.
    Also If i want just a single picture as my bootanimation would i still have to create 80 images of it just as you would a video?
    sorry for the noobish questions. just getting into this.
  14. Dr. Carpenter
    Offline

    Dr. Carpenter New Member

    Joined:
    Jan 8, 2011
    Messages:
    496
    Likes Received:
    1
    Trophy Points:
    0
    I use Photoshop batch processing to rename the images. Not sure if there are other programs that do it.
    If you just want 1 picture, just put it in a folder ie part0 then in the desc.txt put p 0 0 part0. It will just "loop" the single frame, resulting in a static image. You can use whatever you want for the framerate then as it won't make a difference. I would set the framerate to 1 as higher framerates can slow down the bootup process overall.

    Sent from my DROIDX using Tapatalk
  15. djakrse
    Offline

    djakrse Active Member

    Joined:
    Jun 9, 2010
    Messages:
    1,122
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    TX
    Any of the popular free image viewer/editor pc apps can batch edit or rename. I use IrfanView and there's a couple other good ones too.... xnview maybe? My favorite for renaming is an OLD one, acdsee32... I think you can still dload acdsee classic with free license.

    I agree on the write up, well done. I linked it in my comics thread, thanks :D
  16. azr2nut
    Offline

    azr2nut New Member

    Joined:
    Mar 19, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Phoenix, AZ
    Where is /data/local folder?

    I have a R2D2 Droid 2 (Android 2.2) I just rooted yesterday.

    I can't see the /data/local folder, all I see is the /system/media folder. Is the /data/local folder starting at the root, or is it in another folder?
  17. Dr. Carpenter
    Offline

    Dr. Carpenter New Member

    Joined:
    Jan 8, 2011
    Messages:
    496
    Likes Received:
    1
    Trophy Points:
    0
    Should be in root. If nothing else, rename the original in system/media and put custom one there.

    Sent from my DROIDX using Tapatalk
  18. djakrse
    Offline

    djakrse Active Member

    Joined:
    Jun 9, 2010
    Messages:
    1,122
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    TX
    You wont see /data contents without an su-enabled file explorer. Root Explorer or the free one Super File Manager (something like that) will work.

    EDIT I found a SFM that didn't appear to be the right one, but here's a Super Manager that might be it. http://www.appbrain.com/app/super-manager/gpc.myweb.hinet.net.TaskManager
    Last edited: Jul 28, 2011
  19. tehashi
    Offline

    tehashi New Member

    Joined:
    Dec 8, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    OK i give, i've gone to make one exactly as you've noted. I even tested it on the boot animation preview app i found on the XDA forums, but whenever i put it into either my data/local or system/media folders the phone only shows a blank screen during boot.

    I have a Droid X so, the screen size isn't an issue and here's the desc.txt;

    Code:
    304 429 24
    
    p 0 6 part0
    here's a link to my animation, i tried uploading but it failed due to the size i think.
    VBbootanimation.zip

    I tried setting up the preview program to put the animation directly to the phone, but i have absolutely no experience with the android sdk and have no idea what they meant by adding it to the PATH environment or something. (i tried googeling and got no useful help)

    Any thoughts on what i am doing wrong?
  20. Dr. Carpenter
    Offline

    Dr. Carpenter New Member

    Joined:
    Jan 8, 2011
    Messages:
    496
    Likes Received:
    1
    Trophy Points:
    0
    Downloading now, will take a look and let you know.

    Sent from my DROIDX using Tapatalk
Search tags for this page

540x960 boot animation

,

540 x 960 boot animation

,

960x540 boot animations

,
960 x 540 android boot animations
,

960x540 boot animation

,
android 960x540 boot animations
,
android boot animation 960x540
,
android bootanimation 960x540
,
boot animation
,

boot animation 540x960

,
boot animation 960x540
,
boot animation for 540ã—960 resulation free download
,
boot animations 960*540
,

bootanimation 540x960

,

bootanimation 960x540