Platform: RK3288
OS: Android 7.1.2
Kernel: v4.4.143
需求:
Android系统项目定制开机动画,用mp4视频文件充当开机动画
解决:
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 2f0cdc7..cb51711 100755
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -71,7 +71,7 @@ static const char SYSTEM_SHUTDOWNANIMATION_FILE[] = "/system/media/shutdownanimastatic const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip";//support boot videostatic const char DATA_BOOTVIDEO_FILE[] = "/data/local/bootanimation.ts";
-static const char SYSTEM_BOOTVIDEO_FILE[] = "/system/media/bootanimation.ts";
+static const char SYSTEM_BOOTVIDEO_FILE[] = "/system/media/bootanimation.mp4";static const char SYSTEM_DATA_DIR_PATH[] = "/data/system";static const char SYSTEM_TIME_DIR_NAME[] = "time";static const char SYSTEM_TIME_DIR_PATH[] = "/data/system/time";
另外system.prop上添加以下属性
persist.sys.bootvideo.enable=true