简体   繁体   中英

Is it possible to show pre-installed android app's activity as Boot LOGO in AOSP?

I am trying to create an AOSP with a boot logo. I also have an android app which is persistant app preinstalled. I want the boot logo to be update anytime later with just an update of the said persistant App. So I thought I would create an activity inside the persistant android app, and there might be a way to call it for the AOSP boot logo.

My logo activity in manifest is

<activity
        android:name="com.fivedinside.lifestyle.activities.IntroActivity"
        android:exported="true"
        android:theme="@style/AppThemeToolBar">
        <intent-filter>
            <action android:name="com.fivedinside.lifestyle.activities.IntroActivity" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

Is it possible? If so can anyone please point me to right direction. Thanks

The boot animation is shown before the high-level services become available, so you cannot use a normal app for rendering the animation. The code that renders the boot animation can be found here .

Specifically, see the this description on how to customize the boot animation:

The system selects a boot animation zipfile from the following locations, in order:

 /system/media/bootanimation-encrypted.zip (if getprop("vold.decrypt") = '1') /system/media/bootanimation.zip /oem/media/bootanimation.zip

If you want to have the ability to modify the boot logo without updating the system image, you would have to customize your AOSP to make the boot animation controller look for the bootanimation.zip at a custom path, ie some path on the /data partition that your app can write to. You can then update the boot animation by overwriting the bootanimation.zip .

When placing the bootanimation.zip on /data you have to pay attention to encryption. If you want to use Full-Disk Encryption , this approach will not work for the pre-encryption boot animation, as /data has not been encrypted yet. If you want to use File-based Encryption , you have to make sure that the bootanimation.zip is exempted from encryption. The precise steps will differ depending on your Android version, refer to the section "Encryption policy" in this link.

Further, you might need to adapt the SE Linux policies to allow the boot animation controller to access your custom path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM