User Tools

Site Tools


doc:appunti:android:logo_bootanimation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:appunti:android:logo_bootanimation [2019/10/07 16:04] – [Web References] niccolodoc:appunti:android:logo_bootanimation [2019/10/07 16:32] – [Contents of bootanimation.zip] niccolo
Line 76: Line 76:
  
 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 **/system/media/bootanimation.zip**. To replace it, being into the **/system/** directory, **root privileges** are required. 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 **/system/media/bootanimation.zip**. To replace it, being into the **/system/** directory, **root privileges** are required.
 +
 +There should be an executable responsible to actually run the animation, it should be **/system/bin/bootanimation**. It may search the bootanimation.zip in several directories, where the first one found, will be used. Searched directories can be:
 +
 +  * **/custom/media/bootanimation.zip**
 +  * **/oem/media/bootanimation.zip**
 +  * **/data/local/bootanimation.zip**
 +  * **/system/media/bootanimation.zip**
 +
 +If bootanimation.zip file is **not found**, the **framework-res.apk** package is searched into directories **/system/customer/framework/** or **/system/framework/**, that file contains two images that are used as a fall-back animation:
 +
 +  * assets/images/android-logo-mask.png
 +  * assets/images/android-logo-shine.png
 +
 +==== 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: 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:
Line 81: Line 95:
 <file> <file>
 720 1280 15 720 1280 15
-p 1 part0+p 1 part0
 p 0 0 part1 p 0 0 part1
 </file> </file>
Line 87: Line 101:
 The first line tell us that the animation is **720x1280 pixels**, at **15 frames per second**. 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 second line tell us that there is a part of **type p** to be executed **1** time. The following number (**0** in the example abovesomeone says that it is a pause to wait after the animation, in my case it is instead ununsed at all. The actual frames are contained into the **part0** subdirectory. 
 + 
 +The last line defines another part **type 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. 
 + 
 +A **type p** means that the animation can be interrupted when the boot process is completed. If you want instead a part to be played as the final part of the animation (e.g. if you want a fade-out effect), you have to use a **tpye c**. 
 + 
 +<file> 
 +720 1280 15 
 +p 1 0 part0 
 +c 0 0 part1 
 +c 0 0 part2 
 +</file>
  
-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.+In the above example, once the boot process is completed, the **part1** is interrupted, and the **part2** is executed. Animation part **type c** was introduced with **Android Jelly Bean** (i.e. Android 4.1 to 4.3.1).
  
 Frames are actually **PNG images**, of the proper size (720x1280 in our case). Frames are actually **PNG images**, of the proper size (720x1280 in our case).
doc/appunti/android/logo_bootanimation.txt · Last modified: 2019/10/07 16:33 by niccolo