From e0b4d23708f194c162ecd97d4ccac188cbd363ef Mon Sep 17 00:00:00 2001 From: Anders Fridlund Date: Tue, 6 Nov 2018 14:23:25 +0100 Subject: Look for bootanimation in apex-module Look for bootanimation.zip in /apex/com.android.bootanimation/etc/. This is needed to support download and install of customized bootanimations. Bug: 116821733 Test: 1. Get a custom bootanimation.zip 2. Build a com.android.bootanimation.apex that contains the custom bootanimation. 3. Build a product partition containing the public avb-key in /product/etc/security/apex/ or a system partition containing the public avb-key in /system/product/etc/security/apex/ 4. Flash the partition that was built. 5. $ adb install com.android.bootanimation.apex 6. $ adb reboot 7. Verify that the custom bootanimation is used during boot. Change-Id: I0b63e8dd2ba536a5077e34f63670025f6e9d791a --- cmds/bootanimation/BootAnimation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 16af0719d9dd..30f4ad4c5c69 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -69,6 +69,7 @@ static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip"; static const char PRODUCT_BOOTANIMATION_DARK_FILE[] = "/product/media/bootanimation-dark.zip"; static const char PRODUCT_BOOTANIMATION_FILE[] = "/product/media/bootanimation.zip"; static const char SYSTEM_BOOTANIMATION_FILE[] = "/system/media/bootanimation.zip"; +static const char APEX_BOOTANIMATION_FILE[] = "/apex/com.android.bootanimation/etc/bootanimation.zip"; static const char PRODUCT_ENCRYPTED_BOOTANIMATION_FILE[] = "/product/media/bootanimation-encrypted.zip"; static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip"; static const char OEM_SHUTDOWNANIMATION_FILE[] = "/oem/media/shutdownanimation.zip"; @@ -358,10 +359,10 @@ void BootAnimation::findBootAnimationFile() { const bool playDarkAnim = android::base::GetIntProperty("ro.boot.theme", 0) == 1; static const char* bootFiles[] = - {playDarkAnim ? PRODUCT_BOOTANIMATION_DARK_FILE : PRODUCT_BOOTANIMATION_FILE, + {APEX_BOOTANIMATION_FILE, playDarkAnim ? PRODUCT_BOOTANIMATION_DARK_FILE : PRODUCT_BOOTANIMATION_FILE, OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILE}; static const char* shutdownFiles[] = - {PRODUCT_SHUTDOWNANIMATION_FILE, OEM_SHUTDOWNANIMATION_FILE, SYSTEM_SHUTDOWNANIMATION_FILE}; + {PRODUCT_SHUTDOWNANIMATION_FILE, OEM_SHUTDOWNANIMATION_FILE, SYSTEM_SHUTDOWNANIMATION_FILE, ""}; for (const char* f : (!mShuttingDown ? bootFiles : shutdownFiles)) { if (access(f, R_OK) == 0) { -- cgit v1.2.3-59-g8ed1b