doc:appunti:android:logo_bootanimation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:appunti:android:logo_bootanimation [2019/10/07 12:37] – [bootanimation.zip] niccolo | doc:appunti:android:logo_bootanimation [2019/10/07 16:12] – [bootanimation.zip] niccolo | ||
---|---|---|---|
Line 75: | Line 75: | ||
===== bootanimation.zip ===== | ===== bootanimation.zip ===== | ||
- | The logo contained into the **logo.bin** partition is displayed in the early stage of the boot process. Once the system partition is available, an animation is played for some seconds. That animation is contained into a zip file. In our case it turned out that the file is stored in **/ | + | The logo contained into the **logo.bin** partition is displayed in the early stage of the boot process. Once the system partition is available, an animation is played for some seconds. That animation is contained into a zip file. In our case it turned out that the file is stored in **/ |
+ | |||
+ | There should be an executable responsible to actually run the animation, it should be **/ | ||
+ | |||
+ | * **/ | ||
+ | * **/ | ||
+ | * **/ | ||
+ | * **/ | ||
+ | |||
+ | If bootanimation.zip file is **not found**, the **framework-res.apk** package is searched into directories **/ | ||
+ | |||
+ | * assets/ | ||
+ | * assets/ | ||
+ | |||
+ | ==== Contents of bootanimation.zip ==== | ||
+ | |||
+ | Generally the animation is composed of **two parts**: the first is played just **once**, the second part is played in **loop** until the system is ready. This is controlled by the contents of the **desc.txt** file contained into the zip, here it is an example: | ||
+ | |||
+ | < | ||
+ | 720 1280 15 | ||
+ | p 1 5 part0 | ||
+ | p 0 0 part1 | ||
+ | </ | ||
+ | |||
+ | The first line tell us that the animation is **720x1280 pixels**, at **15 frames per second**. | ||
+ | |||
+ | The second line tell us that there is a part **p** to be executed **1** time, followed by a pause of **5** (FIXME Not working? Unit of measure?). The actual frames are contained into the **part0** subdirectory. | ||
+ | |||
+ | The last line defines another part **p** to be executed in an endless (**0**) loop until the system is ready, with a zero **0** pause. The frames are into the **part1** subdirectory. | ||
+ | |||
+ | Frames are actually **PNG images**, of the proper size (720x1280 in our case). | ||
+ | |||
+ | So the directories structure should be something like this: | ||
+ | |||
+ | < | ||
+ | . | ||
+ | ├── desc.txt | ||
+ | ├── part0 | ||
+ | │ ├── img_000.png | ||
+ | │ ├── ... | ||
+ | │ └── img_196.png | ||
+ | └── part1 | ||
+ | ├── img_197.png | ||
+ | ├── ... | ||
+ | └── img_207.png | ||
+ | </ | ||
+ | |||
+ | To pack eveything into a zip file you can use the command: | ||
+ | |||
+ | < | ||
+ | zip -r -Z store bootanimation.zip desc.txt part0 part1 | ||
+ | </ | ||
+ | |||
+ | Beware of the **%%-Z store%%** option: the zip archive must be created using the **store compression method**, not the //deflate// one. | ||
===== Web References ===== | ===== Web References ===== | ||
* **[[https:// | * **[[https:// | ||
* **[[https:// | * **[[https:// | ||
+ | * **[[http:// |
doc/appunti/android/logo_bootanimation.txt · Last modified: 2019/10/07 16:33 by niccolo