recently I have worked on resizing the Android Marshmallow bootanimation for multiple screen resolutions. To make it easier for me, I created a shell script which enables me to easily resize the bootanimation files and pack them in a flashable zip. I thought it could be useful for other users here on XDA, so I'm sharing it with you here. You can find the tool in the Downloads section of this project.
- Linux / OS X / other UNIX operating system
- (Very) basic shell knowledge
- Download the bootanimation-resizer.zip from the Downloads section of this project
- Extract the tool to a folder of your choosing
- Copy the original bootanimation.zip to this folder (the actual bootanimation, not the flashable zip)
- OPTIONAL: Edit the updater script in recovery-zip/META-INF/com/google/android/updater-script to include additional info about your bootanimation or other changes you wish to make
- Run resize.sh with the right parameters
- The new bootanimation flashable zip will be saved in the folder where you extracted the tool
The resize.sh script is used like this:
./resize.sh WIDTH HEIGHT [ROTATION]
- WIDTH: the new width of the images
- HEIGHT: the new height of the bootanimation images
- ROTATION (optional): by how many degrees to rotate the animation (clockwise). The supported values are 0, 90, 180 and 270.
./resize.sh 800 600 90
The resulting bootanimation will be saved to bootanimation-flashable-800x600-90deg.zip.
- This tool can only work with bootanimations in .zip format. It doesn't work Samsung's .qmg bootanimations, and there are no plans to add support for that.
- The tool doesn't (necessarily) maintain aspect ratio of the images, it will resize them exactly to the dimensions you specify. These parameters you specify have to be in the correct ratio you want.
How does it work:
- The script extracts the files from the bootanimation.zip you provided.
- Using the imagemagick tool convert, it resizes and optionally rotates the images according to the parameters you specified.
- Then it changes the width and height parameters in the bootanimation's desc.txt. It leaves the rest of the file as it was, including the FPS, animation commands and other parameters.
- Then the script packs the new bootanimation to a new zip file.
- It adds the new bootanimation.zip to the prepared recovery-zip/system/media/ folder.
- Finally it zips the recovery-zip folder, creating a flashable zip with of new, resized bootanimation.
Bootanimation Resizer, Tool/Utility for all devices (see above for details)
Current Stable Version: 1.0
Stable Release Date: 2015-08-23
Last Updated 2015-08-23