全志H313 平台替换开机视频补丁

+++ b/android/frameworks/base/cmds/bootanimation/BootAnimation.cpp
@@ -68,8 +68,11 @@
 #include "BootAnimation.h"
 #include "AudioPlayer.h"

-#define SYSTEM_BOOTVIDEO_FILE   "/system/media/boot.mp4"
-#define USER_BOOTVIDEO_FILE     "/data/local/boot.mp4"
+//#define SYSTEM_BOOTVIDEO_FILE   "/system/media/boot.mp4"
+//#define USER_BOOTVIDEO_FILE     "/data/local/boot.mp4"
+#define SYSTEM_BOOTVIDEO_FILE   "/system/media/bootanimation.mp4"
+#define USER_BOOTVIDEO_FILE     "/data/local/bootanimation.mp4"
+
 namespace android {

 static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip";

-------------------------------------------------------
下面这段代码是具体的开机视频的逻辑实现方式
BootAnimation::BootAnimation()
        : Thread(false), mClockEnabled(true), mTimeIsAccurate(false),
        mTimeFormat12Hour(false), mTimeCheckThread(NULL), mCallbacks(NULL) {
    mSession = new SurfaceComposerClient();

    std::string powerCtl = android::base::GetProperty("sys.powerctl", "");
    if (powerCtl.empty()) {
        mShuttingDown = false;
    } else {
        mShuttingDown = true;
    }

    mVideoPath = NULL;
    if (access(USER_BOOTVIDEO_FILE, R_OK) == 0) {
        mVideoPath = USER_BOOTVIDEO_FILE;//优先USER_BOOTVIDEO_FILE路径
    } else if (access(SYSTEM_BOOTVIDEO_FILE, R_OK) == 0) {
        mVideoPath = SYSTEM_BOOTVIDEO_FILE;
    }
}

-----------------------------------------------------

android/system/core/rootdir/init.rc
index a80024145d..982d6fcfb0 100644
--- a/android/system/core/rootdir/init.rc
+++ b/android/system/core/rootdir/init.rc
@@ -497,7 +497,7 @@ on post-fs-data
     mkdir /data/misc/perfprofd 0775 root root
     # give system access to wpa_supplicant.conf for backup and restore
     chmod 0660 /data/misc/wifi/wpa_supplicant.conf
-    mkdir /data/local 0751 root root
+    mkdir /data/local 0775 root root
     mkdir /data/misc/media 0700 media media
     mkdir /data/misc/audioserver 0700 audioserver audioserver
     mkdir /data/misc/cameraserver 0700 cameraserver cameraserver

------------------------------------------------------
修改/data/local 路径权限即可

你可能感兴趣的:(android,git)