Custom boot animation on Android: how to create and install it

A display playing an Android boot animation: a ring of dots with one bright dot circling

Building dedicated kiosks, point-of-sale terminals or signage players often requires custom branding. Android plays the boot animation from a single file, bootanimation.zip: an uncompressed ZIP archive with numbered PNG frames and a short text file, desc.txt, that sets the size, the frame rate and the order of the parts. A custom boot animation is created once in this format and placed in one of the folders that Android searches at boot.

This article explains the format, provides a sample bootanimation.zip for download, and shows how to create the frames from a video or a GIF and how to install the result. We tested these steps for creating and installing the file on a Raspberry Pi 4 with our Android 15 build. The format and the folders are the same in the source code of Android 16 and 17.

Boot animation of Android OS built by Emteria: the Emteria logo drawn in blue lines on a black background

The boot animation of Android OS built by Emteria

The required archive bootanimation.zip holds PNG frames and one text file

The archive contains the file desc.txt and one folder for each part of the animation. Most boot animations have an intro that plays once and a loop that repeats until Android has finished booting.

bootanimation.zip
├── desc.txt
├── part0
│   ├── 00000.png
│   ├── 00001.png
│   └── ...
├── part1
│   └── ...
└── part2
    └── ...

The frames must be PNG files. Android plays the files of a folder in the order of their names, so the frames are numbered with leading zeros. The folders can have any name; part0, part1 and so on are the convention.

A sample bootanimation.zip to download and adapt

As a starting point, we provide a neutral sample: a ring of twelve dots, 512×512 pixels, 30 frames per second, 75 frames in three parts, about 0.8 MB. It works as it is and can serve as a template: replace the frames and keep the structure.

Sample Android boot animation: a ring of twelve grey dots on black, with one bright dot moving around the ring

The sample: the dots appear, one bright dot circles, then the ring fades out

Download bootanimation.zip

File desc.txt defines size, frame rate and parts

The sample's desc.txt has four lines:

512 512 30
c 1 0 part0
p 0 0 part1
c 1 0 part2

The first line holds the width and the height of the animation in pixels and the frame rate in frames per second. Each of the following lines describes one part with these four values:

Value Meaning
Type A part of type p stops as soon as Android has finished booting. A part of type c plays to its end, even if the boot is already complete.
Count How many times the part plays. With 0, the part repeats until Android has finished booting.
Pause The number of frames to wait after the part. At 30 frames per second, 15 means half a second.
Folder The folder that holds the frames of the part.

In the sample, part0 lets the dots appear once, part1 repeats until Android has started, and part2 fades the ring out. Because part2 has the type c, Android plays it to the end before the home screen appears.

Three details decide whether the animation looks as planned:

  • desc.txt must end with a line break. In our test without it, Android ignored the last part.

  • An animation that is smaller than the display is drawn at its own size in the center of the screen, so one file fits devices with different screens.

  • The area around the animation is black. Another color is set at the end of each part line in the form #RRGGBB, for example c 1 0 part0 #0C416D. The frames then need the same background color.

The format also supports a sound for each part, a fade-out, a clock and a progress display. All options are listed in the format description in the Android source code.

Tool ffmpeg turns a video or a GIF into single frames

A boot animation usually starts as a short video or a GIF from a designer. ffmpeg converts both into numbered PNG frames:

mkdir part0
ffmpeg -i logo.mp4 -vf "fps=30,scale=512:-1" part0/%05d.png

With a GIF, the input file is logo.gif and the rest of the command stays the same. fps sets the frame rate, which has to match the first line of desc.txt. scale sets the width in pixels and keeps the aspect ratio. Every frame adds to the size of the archive, so a short loop at a moderate resolution is a better choice than a long video in full screen size.

The ZIP archive must stay uncompressed

The archive is created inside the folder that holds desc.txt and the parts. On Linux, the Android source code recommends this command (macOS includes the same zip tool):

zip -0qry -i \*.txt \*.png \*.wav @ ../bootanimation.zip *.txt part*

On Windows, the built-in tar command creates the same archive:

tar -a -cf ..\bootanimation.zip --options zip:compression=store desc.txt part0 part1 part2

Both commands store the files without compressing them (-0 and compression=store). In our test, Android loaded a compressed archive without an error message and then showed no animation at all.

Android searches four folders for the file

Android plays the first boot animation it finds in these folders, in this order:

1. /apex/com.android.bootanimation/etc/bootanimation.zip
2. /product/media/bootanimation.zip
3. /oem/media/bootanimation.zip
4. /system/media/bootanimation.zip

This order comes from the source code of the boot animation and is the same in Android 15, 16 and 17. No folder under /data is on the list. Many older guides copy the file to /data/local. In our test on Android 15, a file placed there was ignored.

None of the four folders can be written by an app or by a normal ADB shell, and verified boot protects the system and product partitions against changes. A custom boot animation therefore reaches a device in one of two ways: as part of the OS image, or through the oem partition on devices that have one. On a phone or tablet bought in a store, neither way is open without unlocking the bootloader. Apps that promise to change the boot animation need root access for the same reason.

Device makers build the file into the image

One line in the product makefile copies the file into the product partition:

PRODUCT_COPY_FILES += \
    device/<vendor>/<device>/bootanimation.zip:$(TARGET_COPY_OUT_PRODUCT)/media/bootanimation.zip

Every device that is flashed with this image shows the animation from its first start. Because the file is part of the image, OTA updates keep it in place.

With Emteria, this step needs no build environment. OS pipelines in the Emteria Hub build a custom Android image from settings in the browser. Customers upload their bootanimation.zip, and the pipeline builds it into their image, together with the wallpaper, preinstalled apps and system settings.

Changing the boot animation on Raspberry Pi devices

Android OS built by Emteria for Raspberry Pi includes an oem partition. On these devices, the boot animation can be changed on a running system. This also applies to the standard images from the Downloads page in the Emteria Hub.

For a fleet, device provisioning does the work. The provisioning settings in the Hub take a link to the bootanimation.zip, and every new device downloads and installs the file on its first start. Our knowledge base describes the steps in How to add your own boot animation and wallpaper. Provisioning stores the file in the oem partition, so it works on hardware whose partition layout includes one. All our Raspberry Pi images include it.

For a single device or a quick test, ADB is enough. ADB over Ethernet is switched on in the Emteria Settings app. Our builds are user builds without adb root, so SuShell provides the root shell:

adb connect 192.168.1.50
adb push bootanimation.zip /sdcard/
adb shell
sushell
mkdir -p /oem/media
cp /sdcard/bootanimation.zip /oem/media/
chmod 755 /oem/media
chmod 644 /oem/media/bootanimation.zip

The next start of the device shows the new animation. For a faster check, the same root shell can play the animation on the running device. The first two commands start it, the third stops it:

setprop service.bootanim.exit 0
start bootanim
setprop service.bootanim.exit 1

After a restart with adb reboot, the log shows which file Android played:

adb logcat -d -s BootAnimation

The line /oem/media/bootanimation.zip is loaded successfully confirms the custom file. Deleting /oem/media/bootanimation.zip in the root shell brings the default animation back. ADB over Ethernet gives every allowed computer control of the device, so it should be switched off again on devices in the field.

Bootloader and kernel draw the boot logo

Before the boot animation starts, a device can show two earlier pictures: the splash screen of the bootloader and the splash screen of the Linux kernel. Both are often called boot logo, and neither is part of bootanimation.zip. Each image is compiled into the bootloader or the kernel, so changing it requires a custom build of that component. In our own builds, both screens stay black. On Raspberry Pi, the firmware shows one more splash screen, which is switched off in config.txt. Our knowledge base article How to enable Quiet Boot on Raspberry Pi lists the settings for a start that shows only the boot animation.

The boot animation is where branding starts

For most products, the boot animation is only the first piece of branding. The wallpaper, preinstalled apps, kiosk mode and device settings follow, and all of them have to stay in place through every OS update. Emteria builds and maintains custom Android OS for device makers: OS pipelines build the branded image and the update images for it. For a device that should start with its own brand, talk to us.

Raspberry Pi is a trademark of Raspberry Pi Ltd.

Build unique products, boost device performance

See why Emteria is the chosen Android™ customization & management platform for OEM solution builders, and what it can do for your team and customers.

Book live demo
Android-head-use-cases
Back to Blog

Table of contents

emteria Demo
See emteria in action