This guide in itself will be organized as follows:
- Basic concept
- Components of the bootanimation.zip file
- Creating Your Own Boot Animation
- Installing the Boot Animation
- changing the boot audio
The Android boot animation is contained within a an uncompressed zip file called bootanimation.zip that can be found in the media folder of the system partition i.e. /system/media on the internal memory of the device. This single file contains all the information required to play the boot animation, and is loaded automatically when the device boots. Thus, customizing or changing the boot animation is simply the process of editing or replacing this file.
2.Components of the bootanimation.zip file
While the Android boot animation might appear to be in a video format during playback, it is in fact a little different. If you extract the contents of the bootanimation.zip file to your computer, you will see:
- A desc.txt file
- A part0 folder (Contains PNG images named in incremental numbers)
- More part1, part2 etc. folders (May or may not be present)
As you can see, bootanimation.zip merely contains one text file and one or more folders with PNG images. The animation is played simply by displaying the images in a sequence, and the text file defines how they are to be played. In essence, first the PNG files in the part0 folder are displayed one after the other and afterwards, those in the part1 file – if it exists – are displayed, again one after the other, and so on. All of this is defined in the desc.txt file.
Let’s see how it works in a little detail by taking a closer look at the contents of the file.
These contain PNG images named in numbers, starting from something like 0000.jpg or 00001.jpg and proceeding with increments of 1. There has to be at least one folder, and there is no known upper limit to the number of folders.
The desc.txt file
This file defines how the images in the folder(s) are displayed during the boot animation, in the following format:
Width Height Frame-rate
p Loop Pause Folder1
p Loop Pause Folder2
An example of a desc.txt file is:
480 800 30
p 1 0 part0
p 0 0 part1
As you can see, in the first line, 480 and 800 define the width and height of the boot animation in pixels for this example. This must be the same as the screen resolution of your device for the boot animation to properly play in full screen. 30 is the frame rate in fps (frames per second) i.e. number of images to display per second.
The second and third lines have a same format, start with p, which stands for a part of the animation and end in part0 or part1, which denotes the folder in which the images for that part are present.
The number after ‘p’ defines how many times this part will loop (repeat playback) before switching to the next part (if present). Specifying 0 would make the part loop indefinitely till the phone has fully booted.
The next number is for the pause, and is expressed in the number of frames, which can be translated into time by dividing it by the frame rate. A pause of 15 for example, would mean pausing for the time it takes 15 frames to play and since the frame rate is 30 frames per second, 15 frames would take half a second.
Translating all of this in case of the above example, the boot animation will play at a resolution of 480 by 800 pixels, at a frame rate of 30 fps, starting with the contents of part0 folder and after playing them in one loop, switching to contents of part1 folder and playing them continuously till the device fully boots.
A note on resolution: Most high-end Android devices with large screens have a resolution of 480 x 800 pixels, and are referred to as HDPI. Some mid-range devices have a resolution of 320 x 480 pixels and are called MDPI. Lastly, the screen resolution of some low-end devices is 340 x 320 pixels and these are called LDPI, though these are either the really old Android phones or the cheapest Chinese models.
As a rule, a boot animation made for a lower resolution device will run fine on a high resolution one but it will be centered on the screen, with the extra screen space around it not being used. Using a high resolution boot animation on a low resolution device will result in the boot animation not fully displaying on the screen, with its outer parts being cut off due to being outside the screen’s bounds.
3.Creating Your Own Boot Animation
- A zip/unzip utility like 7-Zip
- Image editor of your choice like PhotoShop, GIMP, Paint.NET, heck even MS Paint will do.
- A plain text editor of your choice. Using Windows Notepad for editing text files that are to be used in Linux is not always a good idea, so use something like Notepad++ instead.
- As much time and creativity as you are willing to put into the task.
- You must know the screen resolution of your device if you don’t know it already. You can find the resolution by searching for your device specifications on Google.
- Note: A high resolution device will be able to play a boot animation made for a low resolution device but it will not take up the whole screen, while a high resolution boot animation will not display completely on a low resolution screen device.
- Go through the entire Inside the bootanimation.zip File section of this guide first, if you haven’t already done so.
- Plan how your boot animation will run. This includes how many distinct parts it will have, how long will each part play and what will be the sequence of the parts.
- Make a new folder at any convenient location on your computer, and name it bootanimation.
- In this folder, create a folder for each part of your boot animation, named part0, part1 and so on.
- In the image editor of your choice, make all the image files for each part of your boot animation with the proper dimensions equal to your phone’s screen resolution, and save them in the respective folder for each part, in PNG format. Up to 32 bit PNGs are supported.Note: In case you are converting an existing boot animation to fit your phone’s screen, simply extract the images from it and resize each of them to your device’s screen resolution.
- Make sure the images are named in numerical format and in proper sequence, i.e. the images in the first part should start with let’s say 00000.jpg and go on till 00075.jpg, and the images in the second part should then start off with 00076.jpg and go on till – for instance – 00123.jpg.
- Once you have the images for all the parts done and saved with proper names in each folder, create a text file named desc.txt in the main bootanimation folder.
- Open the text file in a text editor and edit it in the format described in detail in the desc.txt file section above. Do consider that a frame rate higher than 30 fps can give issues on many devices.Note: In case you are converting an existing boot animation to fit your phone’s screen, keep everything the same as in the original desc.txt file and change only the resolution.
- Now select everything inside the bootanimationfolder and zip them into a new uncompressed zip archive using your favorite compression utility. Here is the method using 7-zip:
- Select everything inside the bootanimation folder.
- Right-click on any of the selected files/folders and from the 7-zip menu, select ‘Add to archive’.
- Use ‘zip’ as the archive format and ‘Store’ as the compression level, and click OK. This will create a file called bootanimation.zip in the same folder.
That’s it – you have created your own Android boot animation! The only thing left now is to apply it to your device, so let’s get on with it.
4.Installing the Boot Animation
So you have found a boot animation that you want to install on your phone. All you have to do is copy it at a certain location on your device. There are two locations you can copy it: /data/local and /system/media, and both have their advantages and disadvantages.
Advantages of copying it to /data/local is that you will not require root access for it and it should work for all non-rooted devices without running the risk of changing anything in the /system partition. Furthermore, if a bootanimation.zip file is found in both locations, Android ignores the one found in /system/media and gives priority to the one in /data/local. A disadvantage of this method is that upon a hard reset (also called a full data wipe or a factory reset), the new boot animation will be lost.
Copying the boot animation to /system/media/ is possible only if your device is rooted and you have read+write access to the /system partition. An advantage of this method is that upon a hard reset, the new boot animation will still remain and there will be no need to apply it again. A disadvantage is that it requires ADB or a root level file browser such as Root Explorer or Super Manager.
Had enough of the details? Here’s how to get on with applying the boot animation. We will tell you how to copy the file to any of the above mentioned locations and will use ‘All devices’ for the /data/local path method and ‘Rooted devices only’ for the /system/media path method.
4.changing the boot audio:
Find an mp3. It should be relatively short as most phones don’t take much time to turn on.
You need to rename the mp3 file to bootaudio.mp3.
Now open Super Manager and copy the mp3 to /system/media.