I. Android boot step 1. Start Linux
2. Loading Android
3. Show Android Desktop
Two. Analysis
The source files for Android loaded boot animations are:
/opt/android4.3/frameworks/base/cmds/bootanimation.cpp
Focus on the definition of constants:
#include "BootAnimation.h"#define USER"/data/local/bootanimation.zip"#define SYSTEM"/system/media/bootanimation.zip"#define SYSTEM"/system/media/bootanimation-encrypted.zip"#define EXIT"service.bootanim.exit"
They are used in status_t bootanimation::readytorun ():
Judging from Threadloop, loading different animations in different situations. which
- Android (); Is the Android font flashing, it is called:
"./frameworks/base/core/res/assets/images/android-logo-mask.png" and
"./frameworks/base/core/res/assets/images/android-logo-shine.png"
A hollow figure, a luminous effect.
- Movie () is Bootanimation.zip
Bootanimation.zip contains:
Folder Part1
Folder Part2
... There may be a lot of folders
Desc.txt
There's a PNG animation in the folder.
Desc.txt format:
|
|
|
|
480 |
250 |
15 |
|
The width of the picture |
Picture of the High |
Number of frames displayed per second |
|
P |
1 |
0 |
Part0 |
Identifier |
Number of Cycles |
Phase Switch interval time |
The directory of the corresponding picture |
P |
0 |
10 |
Part1 |
Identifier |
Number of Cycles |
Phase Switch interval time |
The directory of the corresponding picture |
I downloaded an animation from someone else directly.
http://download.csdn.net/downlaod/zhoucong50/3480737
Put it in the folder,/opt/android4.3/out/target/product/generic/system/media/.
Go back to the root directory and execute
Make Snod
To start the virtual machine again:
Emulator
Effect:
Modify Android splash screen