MTK APP实现动态修改logo和开机动画

news2025/7/10 10:53:02

MTK APP实现动态修改logo和开机动画

  • 前言
  • 一、修改对新分区的权限
    • 1.修改开机动画对新分区的权限
    • 2.修改系统APP对新分区的权限
    • 3.修改SE权限,不然编译会报错
    • 4.修改开机动画文件,让其加载新分区中的文件
  • 二、系统APP代码使用
    • 1.系统app修改开机logo
    • 2.系统app修改开机动画
    • 3.系统app修改开机音乐
  • 三、如何定制开机logo
  • 总结


前言

之前写过如何动态替换开机logo的MTK修改动态切换开机logo,恢复出厂设置不还原
以及OTA升级开机logo的MTK android10修改Logo OTA AB分区
但是又有需求,动态替换开机动画,开机logo,不随OTA升级变化,但是开机动画实际上是在system分区中的,OTA升级如果有修改,就会替换,而且,开机动画文件是只读文件,就相出了一个方法, 新建一个分区,把开机动画放入新分区中,这个分区不加入OTA升级,
先看新加分区的修改MTK Android10添加分区
不同平台或者android版本的话,大部分是一样的,修改思路相同


一、修改对新分区的权限

1.修改开机动画对新分区的权限

diff --git a/alps/device/mediatek/sepolicy/basic/non_plat/mtkbootanimation.te b/alps/device/mediatek/sepolicy/basic/non_plat/mtkbootanimation.te
index 491cf8eada..a378ead82e 100755
--- a/alps/device/mediatek/sepolicy/basic/non_plat/mtkbootanimation.te
+++ b/alps/device/mediatek/sepolicy/basic/non_plat/mtkbootanimation.te
@@ -51,6 +51,8 @@ allow mtkbootanimation proc_perfmgr:file {open read ioctl};
 
 allow mtkbootanimation mediaextractor:dir search;
 allow mtkbootanimation debugfs_ion:dir search;
+allow mtkbootanimation xunye_file:dir rw_dir_perms;
+allow mtkbootanimation xunye_file:file { read write open ioctl map};
 allow mediaserver mtkbootanimation:dir search;
 
 allowxperm mtkbootanimation proc_ged:file ioctl { proc_ged_ioctls };

2.修改系统APP对新分区的权限

diff --git a/alps/device/mediatek/sepolicy/bsp/non_plat/system_app.te b/alps/device/mediatek/sepolicy/bsp/non_plat/system_app.te
index 20cffc85b6..566650df89 100755
--- a/alps/device/mediatek/sepolicy/bsp/non_plat/system_app.te
+++ b/alps/device/mediatek/sepolicy/bsp/non_plat/system_app.te
@@ -253,3 +253,7 @@ allow system_app ttyS_device:chr_file { rw_file_perms };
 
 allow system_app app_data_file:file { rw_file_perms };
 
+# add for xunye
+allow system_app xunye_file:file { getattr unlink open read write create };
+allow system_app xunye_file:dir rw_dir_perms;


这里包括了systemapp对logo.bin的修改权限
diff --git a/alps/device/mediatek/mt8168/sepolicy/basic/system_app.te b/alps/device/mediatek/mt8168/sepolicy/basic/system_app.te
index 319bd99c59..378aa02a98 100644
--- a/alps/device/mediatek/mt8168/sepolicy/basic/system_app.te
+++ b/alps/device/mediatek/mt8168/sepolicy/basic/system_app.te
@@ -14,3 +14,9 @@ allow system_app system_data_file:file create;
 allow system_app system_data_file:dir write;
 allow system_app system_data_file:dir read;
 allow system_app system_data_file:dir add_name;
+allow system_app apk_data_file:dir write;
+allow system_app logo_block_device:blk_file write;
+allow system_app logo_block_device:blk_file read;
+allow system_app logo_block_device:blk_file open;
+allow system_app logo_block_device:blk_file getattr;
+allow system_app xunye_file:file setattr;

3.修改SE权限,不然编译会报错

diff --git a/alps/system/sepolicy/prebuilts/api/29.0/public/app.te b/alps/system/sepolicy/prebuilts/api/29.0/public/app.te
index d5a079b769..aa094cd2cc 100644
--- a/alps/system/sepolicy/prebuilts/api/29.0/public/app.te
+++ b/alps/system/sepolicy/prebuilts/api/29.0/public/app.te
@@ -371,7 +371,7 @@ binder_call({ appdomain -coredomain }, ashmemd)
 neverallow { appdomain -bluetooth -network_stack } self:capability_class_set *;
 
 # Block device access.
-neverallow appdomain dev_type:blk_file { read write };
+neverallow { appdomain -system_app } dev_type:blk_file { read write };
 
 # Access to any of the following character devices.
 neverallow appdomain {
@@ -467,7 +467,7 @@ neverallow {appdomain -system_app} system_data_file:dir_file_class_set
 # Write to various other parts of /data.
 neverallow appdomain drm_data_file:dir_file_class_set
     { create write setattr relabelfrom relabelto append unlink link rename };
-neverallow { appdomain -platform_app }
+neverallow { appdomain -platform_app -system_app}
     apk_data_file:dir_file_class_set
     { create write setattr relabelfrom relabelto append unlink link rename };
 neverallow { appdomain -platform_app }
diff --git a/alps/system/sepolicy/prebuilts/api/29.0/public/domain.te b/alps/system/sepolicy/prebuilts/api/29.0/public/domain.te
index f348701819..ef839d1e6d 100644
--- a/alps/system/sepolicy/prebuilts/api/29.0/public/domain.te
+++ b/alps/system/sepolicy/prebuilts/api/29.0/public/domain.te
@@ -818,6 +818,7 @@ full_treble_only(`
   # /data/vendor
   neverallow {
     coredomain
+       -domain
     -appdomain # TODO(b/34980020) remove exemption for appdomain
     -data_between_core_and_vendor_violators
     -init
@@ -836,6 +837,7 @@ full_treble_only(`
     -vold_prepare_subdirs
     } {
       data_file_type
+         -data_file_type
       -core_data_file_type
       # TODO(b/72998741) Remove exemption. Further restricted in a subsequent
       # neverallow. Currently only getattr and search are allowed.
diff --git a/alps/system/sepolicy/public/app.te b/alps/system/sepolicy/public/app.te
index d5a079b769..aa094cd2cc 100644
--- a/alps/system/sepolicy/public/app.te
+++ b/alps/system/sepolicy/public/app.te
@@ -371,7 +371,7 @@ binder_call({ appdomain -coredomain }, ashmemd)
 neverallow { appdomain -bluetooth -network_stack } self:capability_class_set *;
 
 # Block device access.
-neverallow appdomain dev_type:blk_file { read write };
+neverallow { appdomain -system_app } dev_type:blk_file { read write };
 
 # Access to any of the following character devices.
 neverallow appdomain {
@@ -467,7 +467,7 @@ neverallow {appdomain -system_app} system_data_file:dir_file_class_set
 # Write to various other parts of /data.
 neverallow appdomain drm_data_file:dir_file_class_set
     { create write setattr relabelfrom relabelto append unlink link rename };
-neverallow { appdomain -platform_app }
+neverallow { appdomain -platform_app -system_app}
     apk_data_file:dir_file_class_set
     { create write setattr relabelfrom relabelto append unlink link rename };
 neverallow { appdomain -platform_app }
diff --git a/alps/system/sepolicy/public/domain.te b/alps/system/sepolicy/public/domain.te
index f348701819..ef839d1e6d 100644
--- a/alps/system/sepolicy/public/domain.te
+++ b/alps/system/sepolicy/public/domain.te
@@ -818,6 +818,7 @@ full_treble_only(`
   # /data/vendor
   neverallow {
     coredomain
+       -domain
     -appdomain # TODO(b/34980020) remove exemption for appdomain
     -data_between_core_and_vendor_violators
     -init
@@ -836,6 +837,7 @@ full_treble_only(`
     -vold_prepare_subdirs
     } {
       data_file_type
+         -data_file_type
       -core_data_file_type
       # TODO(b/72998741) Remove exemption. Further restricted in a subsequent
       # neverallow. Currently only getattr and search are allowed.

4.修改开机动画文件,让其加载新分区中的文件

复制文件到新分区中

diff --git a/alps/device/mediateksample/xxxxxxxx/device.mk b/alps/device/mediateksample/xxxxxxxx/device.mk
index 22e9bdc759..8fd857fd9c 100755
--- a/alps/device/mediateksample/xxxxxxxx/device.mk
+++ b/alps/device/mediateksample/xxxxxxxx/device.mk
@@ -277,6 +277,9 @@ PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists, vendor/het/app
 PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists, vendor/het/app/ClifeScreenReceive/lib/libndkbitmap.so:system/lib/libndkbitmap.so)
 PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists, vendor/het/app/ClifeScreenReceive/lib/libsfftranscoder.so:system/lib/libsfftranscoder.so)
 
+PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists, vendor/het/images/1024_600/bootanimation.zip:xunye/media/bootanimation.zip)
+PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists, vendor/het/audios/bootaudio.mp3:xunye/media/bootaudio.mp3)

修改bootanimation.cpp ,这个其实比较简单, 把默认加载system/media的目录改成xunye/media即可;

diff --git a/alps/vendor/mediatek/proprietary/operator/frameworks/bootanimation/MtkBootanimation/BootAnimation.cpp b/alps/vendor/mediatek/proprietary/operator/frameworks/bootanimation/MtkBootanimation/BootAnimation.cpp
index 5ebc874a13..927944e61f 100755
--- a/alps/vendor/mediatek/proprietary/operator/frameworks/bootanimation/MtkBootanimation/BootAnimation.cpp
+++ b/alps/vendor/mediatek/proprietary/operator/frameworks/bootanimation/MtkBootanimation/BootAnimation.cpp
@@ -121,12 +121,12 @@ static const char* mResourcePath[MNC_COUNT][PATH_COUNT] =
 
 #if !(defined(MSSI_MTK_CARRIEREXPRESS_PACK) && defined(MTK_TER_SERVICE))
     static const char* mAudioPath[2][PATH_COUNT] =
-    {{"/system/media/bootaudio.mp3", "/custom/media/bootaudio.mp3", "/data/local/bootaudio.mp3"} , /*  bootaudio path  */
-     {"/system/media/shutaudio.mp3", "/custom/media/shutaudio.mp3", "/data/local/shutaudio.mp3"} /*  shutaudio path  */
+    {{"/xunye/media/bootaudio.mp3", "/custom/media/bootaudio.mp3", "/data/local/bootaudio.mp3"} , /*  bootaudio path  */
+     {"/xunye/media/shutaudio.mp3", "/custom/media/shutaudio.mp3", "/data/local/shutaudio.mp3"} /*  shutaudio path  */
     };
 #endif
 static const char* myAudioPath[2] =
-    {"/system/media/bootaudio.mp3", "/system/media/1/bootaudio.mp3"};
+    {"/xunye/media/bootaudio.mp3", "/system/media/1/bootaudio.mp3"};
 
 namespace android {
 
@@ -136,10 +136,10 @@ static const char SYSTEM_SHUTANIMATION_FILE[] = "/system/media/shutanimation.zip
 static const char CUSTOM_SHUTANIMATION_FILE[] = "/custom/media/shutanimation.zip";
 static const char USER_SHUTANIMATION_FILE[] = "/data/local/shutanimation.zip";
 
-static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip";
+static const char OEM_BOOTANIMATION_FILE[] = "/xunye/media/bootanimation.zip";
 static const char SYSTEM_BOOTANIMATION_FILE[] = "/system/media/bootanimation.zip";
 static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip";
-static const char OEM_SHUTDOWNANIMATION_FILE[] = "/oem/media/shutdownanimation.zip";
+static const char OEM_SHUTDOWNANIMATION_FILE[] = "/xunye/media/shutdownanimation.zip";
 static const char SYSTEM_SHUTDOWNANIMATION_FILE[] = "/system/media/shutdownanimation.zip";
 
 static const char SYSTEM_DATA_DIR_PATH[] = "/data/system";
@@ -535,6 +535,7 @@ status_t BootAnimation::readyToRun() {
     for (const char* f : (bBootOrShutDown ? bootFiles : shutdownFiles)) {
         if (access(f, R_OK) == 0) {
             mZipFileName = f;
+                       ALOGE(" bootFiles mZipFileName f=%s",f);
             return NO_ERROR;
         }
     }
@@ -1097,7 +1098,7 @@ bool BootAnimation::movie()
        if(strcmp(nvram_logo_index, "1") == 0){
                mZipFileName="/system/media/1/bootanimation.zip";
        }
-       
+       ALOGE("movie mZipFileName: %s", mZipFileName.string());
     Animation* animation = loadAnimation(mZipFileName);
     if (animation == NULL)
         return false;

二、系统APP代码使用

1.系统app修改开机logo

public static void copyLogoBin() {
        File srcFile = new File("/sdcard/logo.bin");
        if(!srcFile.exists())
            return;
        String logoPath = "dev/block/platform/bootdevice/by-name/logo";
//        String logoPath = "/dev/block/mmcblk0p19";
        Log.e("logo","logoPath="+logoPath);
        File dstFile =  new File(logoPath);
        OutputStream os = null;
        try {
            FileInputStream is = new FileInputStream(srcFile);
            os = new BufferedOutputStream(new FileOutputStream(dstFile, false));
            int curSize = 0;
            byte[] data = new byte[1024];
            for (int len; (len = is.read(data)) != -1; ) {
                os.write(data, 0, len);
                curSize += len;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            try {
                if (os != null) {
                    os.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
//            srcFile.delete();
        }
    }

2.系统app修改开机动画

public static void copyLogoBootanimation() {
        File srcFile = new File("/sdcard/bootanimation.zip");
        if(!srcFile.exists())
            return;
        String logoPath = "/xunye/media/bootanimation.zip";
//        String logoPath = "/dev/block/mmcblk0p19";
        Log.e("logo","BootanimationPath="+logoPath);
        File dstFile =  new File(logoPath);
        if(dstFile.exists())
            dstFile.delete();
        try {
            dstFile.createNewFile();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        try {
            Os.chmod(dstFile.getAbsolutePath(), 0777);
        } catch (ErrnoException e) {
            e.printStackTrace();
        }
        OutputStream os = null;
        try {
            FileInputStream is = new FileInputStream(srcFile);
            os = new BufferedOutputStream(new FileOutputStream(dstFile, false));
            int curSize = 0;
            byte[] data = new byte[1024];
            for (int len; (len = is.read(data)) != -1; ) {
                os.write(data, 0, len);
                curSize += len;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            try {
                if (os != null) {
                    os.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
//            srcFile.delete();
        }
    }

3.系统app修改开机音乐

public static void copyBootAudio() {
        File srcFile = new File("/sdcard/bootaudio.mp3");
        if(!srcFile.exists())
            return;

        String logoPath = "/xunye/media/bootaudio.mp3";
//        String logoPath = "/dev/block/mmcblk0p19";
        Log.e("logo","bootaudio.mp3 Path="+logoPath);
        File dstFile =  new File(logoPath);
        if(dstFile.exists())
            dstFile.delete();
        try {
            dstFile.createNewFile();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        try {
            Os.chmod(dstFile.getAbsolutePath(), 0777);
        } catch (ErrnoException e) {
            e.printStackTrace();
        }
        OutputStream os = null;
        try {
            FileInputStream is = new FileInputStream(srcFile);
            os = new BufferedOutputStream(new FileOutputStream(dstFile, false));
            int curSize = 0;
            byte[] data = new byte[1024];
            for (int len; (len = is.read(data)) != -1; ) {
                os.write(data, 0, len);
                curSize += len;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            try {
                if (os != null) {
                    os.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
//            srcFile.delete();
        }
    }

三、如何定制开机logo

需要几个文件,在linux下编译
vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/tool/bmp_to_raw
vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/tool/zpipe
vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/img_hdr_logo.cfg
vendor/mediatek/proprietary/bootable/bootloader/lk/scripts/mkimage
然后复制一下logo.bin编译的脚本,修改成make_logo.sh文件
如下

#!/bin/bash

if [ "$1" = "" ]; then
	echo "Please input BOOT_LOGO name,"
	echo "xunye"
	exit
fi

BASELOGO=$1
BOOT_LOGO_RESOURCE=boot_logo.raw
echo "BASELOGO=${BASELOGO}"

# step 1 make hdplus1560_uboot.raw  hdplus1560_kernel.raw
echo "===================step 1 bmp_to_raw make uboot and kernel raw===================="
#./bmp_to_raw  ./${BASELOGO}/${BASELOGO}_kernel.raw  logo.bmp
#./bmp_to_raw  ./${BASELOGO}/${BASELOGO}_uboot.raw   logo.bmp

./bmp_to_raw ./temp0.raw ./${BASELOGO}/"${BASELOGO}_uboot".bmp
./bmp_to_raw ./temp1.raw ./${BASELOGO}/"${BASELOGO}_battery".bmp
./bmp_to_raw ./temp2.raw ./${BASELOGO}/"${BASELOGO}_low_battery".bmp
./bmp_to_raw ./temp3.raw ./${BASELOGO}/"${BASELOGO}_charger_ov".bmp
./bmp_to_raw ./temp4.raw ./${BASELOGO}/"${BASELOGO}_num_0".bmp
./bmp_to_raw ./temp5.raw ./${BASELOGO}/"${BASELOGO}_num_1".bmp
./bmp_to_raw ./temp6.raw ./${BASELOGO}/"${BASELOGO}_num_2".bmp
./bmp_to_raw ./temp7.raw ./${BASELOGO}/"${BASELOGO}_num_3".bmp
./bmp_to_raw ./temp8.raw ./${BASELOGO}/"${BASELOGO}_num_4".bmp
./bmp_to_raw ./temp9.raw ./${BASELOGO}/"${BASELOGO}_num_5".bmp
./bmp_to_raw ./temp10.raw ./${BASELOGO}/"${BASELOGO}_num_6".bmp
./bmp_to_raw ./temp11.raw ./${BASELOGO}/"${BASELOGO}_num_7".bmp
./bmp_to_raw ./temp12.raw ./${BASELOGO}/"${BASELOGO}_num_8".bmp
./bmp_to_raw ./temp13.raw ./${BASELOGO}/"${BASELOGO}_num_9".bmp
./bmp_to_raw ./temp14.raw ./${BASELOGO}/"${BASELOGO}_num_percent".bmp
./bmp_to_raw ./temp15.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_01".bmp
./bmp_to_raw ./temp16.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_02".bmp
./bmp_to_raw ./temp17.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_03".bmp
./bmp_to_raw ./temp18.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_04".bmp
./bmp_to_raw ./temp19.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_05".bmp
./bmp_to_raw ./temp20.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_06".bmp
./bmp_to_raw ./temp21.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_07".bmp
./bmp_to_raw ./temp22.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_08".bmp
./bmp_to_raw ./temp23.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_09".bmp
./bmp_to_raw ./temp24.raw ./${BASELOGO}/"${BASELOGO}_bat_animation_10".bmp
./bmp_to_raw ./temp25.raw ./${BASELOGO}/"${BASELOGO}_bat_10_01".bmp
./bmp_to_raw ./temp26.raw ./${BASELOGO}/"${BASELOGO}_bat_10_02".bmp
./bmp_to_raw ./temp27.raw ./${BASELOGO}/"${BASELOGO}_bat_10_03".bmp
./bmp_to_raw ./temp28.raw ./${BASELOGO}/"${BASELOGO}_bat_10_04".bmp
./bmp_to_raw ./temp29.raw ./${BASELOGO}/"${BASELOGO}_bat_10_05".bmp
./bmp_to_raw ./temp30.raw ./${BASELOGO}/"${BASELOGO}_bat_10_06".bmp
./bmp_to_raw ./temp31.raw ./${BASELOGO}/"${BASELOGO}_bat_10_07".bmp
./bmp_to_raw ./temp32.raw ./${BASELOGO}/"${BASELOGO}_bat_10_08".bmp
./bmp_to_raw ./temp33.raw ./${BASELOGO}/"${BASELOGO}_bat_10_09".bmp
./bmp_to_raw ./temp34.raw ./${BASELOGO}/"${BASELOGO}_bat_10_10".bmp
./bmp_to_raw ./temp35.raw ./${BASELOGO}/"${BASELOGO}_bat_bg".bmp
./bmp_to_raw ./temp36.raw ./${BASELOGO}/"${BASELOGO}_bat_img".bmp
./bmp_to_raw ./temp37.raw ./${BASELOGO}/"${BASELOGO}_bat_100".bmp
./bmp_to_raw ./temp38.raw ./${BASELOGO}/"${BASELOGO}_kernel".bmp
./bmp_to_raw ./temp39.raw ./${BASELOGO}/"${BASELOGO}_uboot_clife".bmp
./bmp_to_raw ./temp40.raw ./${BASELOGO}/"${BASELOGO}_kernel_clife".bmp
echo "=========done"


# step 2 zpipe all raw to boot_logo.raw
echo "===================step 2 zpipe all raws get ${BASELOGO}.raw===================="
#./zpipe -l 9 ${BOOT_LOGO_RESOURCE} ./${BASELOGO}/${BASELOGO}_uboot.raw ./${BASELOGO}/${BASELOGO}_uboot_clife.raw ./${BASELOGO}/${BASELOGO}_battery.raw ./${BASELOGO}/${BASELOGO}_low_battery.raw  ./${BASELOGO}/${BASELOGO}_charger_ov.raw ./${BASELOGO}/${BASELOGO}_num_0.raw ./${BASELOGO}/${BASELOGO}_num_1.raw ./${BASELOGO}/${BASELOGO}_num_2.raw ./${BASELOGO}/${BASELOGO}_num_3.raw ./${BASELOGO}/${BASELOGO}_num_4.raw ./${BASELOGO}/${BASELOGO}_num_5.raw ./${BASELOGO}/${BASELOGO}_num_6.raw ./${BASELOGO}/${BASELOGO}_num_7.raw ./${BASELOGO}/${BASELOGO}_num_8.raw ./${BASELOGO}/${BASELOGO}_num_9.raw ./${BASELOGO}/${BASELOGO}_num_percent.raw ./${BASELOGO}/${BASELOGO}_bat_animation_01.raw ./${BASELOGO}/${BASELOGO}_bat_animation_02.raw ./${BASELOGO}/${BASELOGO}_bat_animation_03.raw ./${BASELOGO}/${BASELOGO}_bat_animation_04.raw ./${BASELOGO}/${BASELOGO}_bat_animation_05.raw ./${BASELOGO}/${BASELOGO}_bat_animation_06.raw ./${BASELOGO}/${BASELOGO}_bat_animation_07.raw ./${BASELOGO}/${BASELOGO}_bat_animation_08.raw ./${BASELOGO}/${BASELOGO}_bat_animation_09.raw ./${BASELOGO}/${BASELOGO}_bat_animation_10.raw ./${BASELOGO}/${BASELOGO}_bat_10_01.raw ./${BASELOGO}/${BASELOGO}_bat_10_02.raw ./${BASELOGO}/${BASELOGO}_bat_10_03.raw ./${BASELOGO}/${BASELOGO}_bat_10_04.raw ./${BASELOGO}/${BASELOGO}_bat_10_05.raw ./${BASELOGO}/${BASELOGO}_bat_10_06.raw ./${BASELOGO}/${BASELOGO}_bat_10_07.raw ./${BASELOGO}/${BASELOGO}_bat_10_08.raw ./${BASELOGO}/${BASELOGO}_bat_10_09.raw ./${BASELOGO}/${BASELOGO}_bat_10_10.raw ./${BASELOGO}/${BASELOGO}_bat_bg.raw ./${BASELOGO}/${BASELOGO}_bat_img.raw ./${BASELOGO}/${BASELOGO}_bat_100.raw ./${BASELOGO}/${BASELOGO}_kernel.raw ./${BASELOGO}/${BASELOGO}_kernel_clife.raw
./zpipe -l 9 ${BOOT_LOGO_RESOURCE} temp0.raw temp1.raw temp2.raw temp3.raw temp4.raw temp5.raw temp6.raw temp7.raw temp8.raw temp9.raw temp10.raw temp11.raw temp12.raw temp13.raw temp14.raw temp15.raw temp16.raw temp17.raw temp18.raw temp19.raw temp20.raw temp21.raw temp22.raw temp23.raw temp24.raw temp25.raw temp26.raw temp27.raw temp28.raw temp29.raw temp30.raw temp31.raw temp32.raw temp33.raw temp34.raw temp35.raw temp36.raw temp37.raw temp38.raw temp39.raw temp40.raw 
rm -rf ./temp0.raw ./temp1.raw ./temp2.raw ./temp3.raw ./temp4.raw ./temp5.raw ./temp6.raw ./temp7.raw ./temp8.raw ./temp9.raw ./temp10.raw ./temp11.raw ./temp12.raw ./temp13.raw ./temp14.raw ./temp15.raw ./temp16.raw ./temp17.raw ./temp18.raw ./temp19.raw ./temp20.raw ./temp21.raw ./temp22.raw ./temp23.raw ./temp24.raw ./temp25.raw ./temp26.raw ./temp27.raw ./temp28.raw ./temp29.raw ./temp30.raw ./temp31.raw ./temp32.raw ./temp33.raw ./temp34.raw ./temp35.raw ./temp36.raw ./temp37.raw ./temp38.raw ./temp39.raw ./temp40.raw ./bootlogo.raw 
echo "conversion finished"

echo "=========done"



# step 3 make logo.bin
echo "===================step 3 make logo.bin===================="
./mkimage ${BOOT_LOGO_RESOURCE} img_hdr_logo.cfg  > logo.bin
echo "all=========done"

rm  ${BOOT_LOGO_RESOURCE} -rf


在这里插入图片描述
编译的时候,替换xunye文件夹中的xxxxxx_uboot.bmp,xxxxxx_kernel.bmp两个文件,即logo图片
./make_logo.sh xunye就行,生成的logo.bin放入sd卡中替换

总结

logo.bin没有修改,动态修改logo.bin,只是修改了系统app对logo分区的修改权限;
开机动画与开机音乐是加入到新分区中的,然后对新分区修改SE权限,和读写权限,让系统APP能够修改,同时该分区不随OTA升级,所以用户即使替换了,升级之后也没有变化;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1103548.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

设计模式:工厂方法模式(C#、JAVA、JavaScript、C++、Python、Go、PHP):

本节主要介绍设计模式中的工厂方法模式。 简介: 工厂方法模式,它是对简单工厂模式的进一步抽象化,其好处是可以使系统在不修改原来代码的情况下引进新的产品,即满足开闭原则。 它定义了一个用于创建对象的工厂接口,让…

Nginx正向代理,反向代理,负载均衡

Nginx正向代理,反向代理,负载均衡 Nginx当中有两种代理方式: 七层代理(http协议) 四层代理(tcp/udp流量转发) 七层代理:七层代理,代理的是http的请求和响应 客户端请求…

Redis RDB持久化

前言 我们知道 Redis 之所以快,很大程度是因为它的数据直接放在内存里,而内存是易失性存储器,只有通电才存储数据,断电数据就会丢失。 这个时候就要看你的应用场景了,如果你只是拿 Redis 做关系型数据库的缓存&#x…

SpringBoot实现SSMP整合

一、整合JUnit 1、Spring 整合 JUnit 核心注解有两个: RunWith(SpringJUnit4ClassRunner.class) 是设置Spring专用于测试的类运行器(Spring程序执行程序有自己的一套独立的运行程序的方式,不能使用JUnit提供的类运行方式)Conte…

Deep Learning(0-14草履虫)

深度学习解决的问题 自动提取出最合适的特征 深度学习应用 神经网络基础 损失函数 前向传播 反向传播 绿色字体为正向传播i输入,红色字体为反向传播梯度 MAX门单元只把梯度传给最大的 神经网络整体架构 激活函数 隐藏层激活函数 一般选择Relu,sigmoid会…

STM32 IWDGWWDG

STM32 IWDG&WWDG 启动看门狗之后,看门狗是不能再被关闭的,除非发生复位。 IWDG独立看门狗 独立看门狗配置流程 开启LSI时钟,只有LSI时钟开启了,独立看门狗才能运行。 但是开启LSI的代码,并不需要我们来写&#xf…

【23种设计模式】装饰器模式

个人主页:金鳞踏雨 个人简介:大家好,我是金鳞,一个初出茅庐的Java小白 目前状况:22届普通本科毕业生,几经波折了,现在任职于一家国内大型知名日化公司,从事Java开发工作 我的博客&am…

WinSCP 集成 putty(也可以其他Terminal客户端)

putty 安装 官网安装地址 WinSCP集成putty(也可以其他Terminal客户端) 扩展 WinSCP是什么? WinSCP(Windows Secure Copy Protocol)是一个用于 Windows 操作系统的开源的 SFTP(SSH File Transfer Protoc…

【Unity HDRP渲染管线下的WorleyUtilities文件,“Hash”函数】

Unity HDRP内置文件WorleyUtilities WorleyUtilities文件路径如下:文件代码如下然后转译到ShaderLab中:存档:WorleyUtilities文件路径如下: D:…\Library\PackageCache\com.unity.render-pipelines.high-definition@14.0.8\Runtime\Lighting\VolumetricClouds\WorleyUtili…

网络解析(二)

ICMP 报文有很多的类型,不同的类型有不同的代码。最常用的类型是主动请求为 8,主动请求的应答为 0。 ICMP 相当于网络世界的侦察兵。我讲了两种类型的 ICMP 报文,一种是主动探查的查询报文,一种异常报告的差错报文; ping 使用查询报文,Traceroute 使用差错报文。 IP和…

C++ 用户学习 Python 的最佳方法

对于很多是一名计算机科学专业的学生而言,很多入门是学习的C和 C,可能熟悉非常基本的 python 语法,以及 C 中相当高级的数据结构。现在想深入学习Python的话,光看很多在线教程可能没法有较大的提升,这里有一些针对C用户…

信息系统项目管理师第四版学习笔记——组织通用治理

组织战略 组织战略是组织高质量发展的总体谋略,是组织相关干系方就其发展达成一致认识的重要基础。组织战略是指组织针对其发展进行的全局性、长远性、纲领性目标的策划和选择。 战略目标是组织在一定的战略期内总体发展的总水平和总任务。它决定了组织在该战略期…

CodePlan

CodePlan论文解读 最近在看老师给的LLM-Agent论文,在这记录一下 CodePlan: Repository-level Coding using LLMs and Planning【论文】 旨在解决储存库级别的coding task,提出一个框架called CodePlan综合多步骤的编辑链,其中每个步骤都导…

华为---PPP协议简介及示例配置

PPP协议简介 PPP是Point-to-Point Protocol的简称,中文翻译为点到点协议。与以太网协议一样,PPP也是一个数据链路层协议。以太网协议定义了以太帧的格式,PPP协议也定义了自己的帧格式,这种格式的帧称为PPP帧。 利用PPP协议建立的二层网络称为…

云耀服务器L实例部署Typecho开源博客系统|华为云云耀云服务器L实例评测使用体验

云耀服务器L实例部署Typecho开源博客系统 文章目录 云耀服务器L实例部署Typecho开源博客系统1. 华为云云耀服务器L实例介绍2. Typecho2.1 Typecho 3. 部署华为云云耀服务器L实例3.1 云耀服务器L实例购买3.1.1 云耀服务器L实例初始化配置3.1.2 远程登录云耀服务器L实例 4. Typec…

基于MATLAB的图像条形码识别系统(matlab毕毕业设计2)

摘要 : 本论文旨在介绍一种基于MATLAB的图像条形码识别系统。该系统利用计算机视觉技术和图像处理算法,实现对不同类型的条形码进行准确识别。本文将详细介绍系统学习的流程,并提供详细教案,以帮助读者理解和实施该系统。 引言…

Git构建分布式版本控制系统

一、版本控制 1、概念: 版本控制(Version Control),也被称为版本管理、源代码管理或代码控制,是一种系统和工具,用于跟踪和管理文件、数据或源代码的不同版本和历史记录,在软件开发、文档管理…

深入理解Huffman编码:原理、代码示例与应用

目录 ​编辑 介绍 Huffman编码的原理 信息理论背景 频率统计 Huffman树 Huffman编码的代码示例 数据结构 权重选择 Huffman编码生成 完整示例 完整代码 测试截图 Huffman编码的应用 总结 介绍 在这个数字时代,数据的有效压缩和传输变得至关重要。Hu…

【Linux】Ubunt20.04在vscode中使用Fira Code字体【教程】

【Linux】Ubunt20.04在vscode中使用Fira Code字体【教程】 文章目录 【Linux】Ubunt20.04在vscode中使用Fira Code字体【教程】1. 什么是Fira Code字体2. 安装Fira Code字体3. 配置vscodeReference 1. 什么是Fira Code字体 Fira Code:是一种带有编程连字的等宽字体。…

多组试验时正态分布标准差估计公式

本文介绍如何通过多组试验数据来估计正态总体的标准差. 一,各组试验次数相等 设正态总体X~N(μ,σ),其中均值μ和标准差σ未知.今有m组样本,每组样本大小n相等,其试验数据如下:求标准差σ的估计σ. 多组试验时正态分布标准差估计公式 - 百度学术