Preface ROM porting first may be the boot animation of the transplant, the transplant process is quite simple, a brief introduction to the production of Android boot animation.
Boot animationandroid system since Android 2.0, all use the/system/bin/bootanimation program to display the boot animation, such as the need to modify the boot animation, without modifying the code, Just make the Bootanimation.zip package according to the format requirements. The Zip storage path is under the/system/media/directory, or the/data/local/directory. If two directories are present, use the contents of the/data/local/directory as a priority.
Make a boot animation with two steps: Animated picture making and animated property description file
Animated picture making I took out the Bootanimation.zip package directly from the great God F1 rom, after extracting:
After the pictures are numbered, they are placed in the folder directory, and the directories of the F1 are stored in Folder1 and Folder2.
Animation Property Description File Desc.txt is a file saved in ANSI format for setting this animation pixel (size), number of frames, flashing times, folder name, etc. The desc.txt content of the great God F1 is as follows:
720 9p 1 2 folder1p 0 2 Folder2
Here 720 9---each represents the width (pixels), height (pixels), and frames per second of the picture.
P 1 2 folder1---here p represents the marker, 1 for the number of cycles 1 times, 2 for each frame animation duration of 2/9s,folder1 represents the name of the folder, for the first stage of the animation directory. P 0 2 Folder2---Here p is also a marker, and 0 represents an infinite loop for this stage, and 2 represents the duration of the animation for each frame 2/9s,folder2 represents the name of the folder for the second stage of the animation directory.
Phase interval: Unit is the duration of a frame, in this case the number of frames is 9, the duration of each frame is 2S/9. During phase switching, the boot animation process goes into hibernation, and the CPU time is ceded to the initialization system.