Android系统(221)---O版自定义开关机动画
O版自定义开关机动画
O较前面的版本有更改,为方便自定义开关机动画我司,使用mtkbootanimation自定义开关机动画;
[SOLUTION]
O版会根据配置生成bootanimation或者mtkbootanimation,只会生成一个;如果要自定义可以使用mtkbootanimation
1.查询生成的是mtkbootanimation还是bootanimation
例如:
如果编译时执行的是:lunch full_k63v2_64_bsp_op01_vdo-userdebug
查看对应的工程配置:
/device/mediatekprojects/k63v2_64_bsp_op01_vdo/ProjectConfig.mk
OPTR_SPEC_SEG_DEF = OP01_SPEC0200_SEGC
……
MTK_BSP_PACKAGE = yes
(1)OPTR_SPEC_SEG_DEF前缀为OP01、OP02、OP09,并且$(MTK_BSP_PACKAGE)为true;生成mtkbootanimation
(2)除了第一种情况,全部编译为:bootanimation
注意:请不要随意改动OPTR_SPEC_SEG_DEF和MTK_BSP_PACKAGE的值
2.如果配置不支持,又想使用mtkbootanimation自定义开关机动画;
(1)
/frameworks/base/cmds/bootanimation/Android.mk
删除下面
ifeq (OP01,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifneq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_EXECUTABLE)
endif
else ifeq (OP02,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifneq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_EXECUTABLE)
endif
else ifeq (OP09,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifneq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_EXECUTABLE)
endif
else
include $(BUILD_EXECUTABLE)
endif
……
ifeq (OP01,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifneq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_SHARED_LIBRARY)
endif
else ifeq (OP02,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifneq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_SHARED_LIBRARY)
endif
else ifeq (OP09,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifneq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_SHARED_LIBRARY)
endif
else
include $(BUILD_SHARED_LIBRARY)
endif
(2)
/vendor/mediatek/proprietary/operator/frameworks/bootanimation/MtkBootanimation/Android.mk
用
include $(BUILD_EXECUTABLE)
替换下面的部分;
ifeq (OP01,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifeq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_EXECUTABLE)
endif
else ifeq (OP02,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifeq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_EXECUTABLE)
endif
else ifeq (OP09,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifeq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_EXECUTABLE)
endif
endif
用
include $(BUILD_SHARED_LIBRARY)
替换下面的部分
ifeq (OP01,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifeq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_SHARED_LIBRARY)
endif
else ifeq (OP02,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifeq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_SHARED_LIBRARY)
endif
else ifeq (OP09,$(word 1,$(subst _, ,$(OPTR_SPEC_SEG_DEF))))
ifeq ($(strip $(MTK_BSP_PACKAGE)), yes)
include $(BUILD_SHARED_LIBRARY)
endif
endif
(3)
/vendor/mediatek/proprietary/frameworks/base/services/core/java/com/mediatek/server/MtkShutdownThread.java
private static boolean configShutdownAnimation(Context context) {
boolean mShutOffAnimation = false;
PowerManager pm = (PowerManager)
context.getSystemService(Context.POWER_SERVICE);
if (!bConfirmForAnimation && !pm.isScreenOn()) {
bPlayaudio = false;
} else {
bPlayaudio = true;
}
try {
mShutOffAnimation = isCustBootAnim();
mShutOffAnimation = true; //mtk add code
Log.i(TAG, "mShutOffAnimation =" + mShutOffAnimation);
} catch (Exception e) {
e.printStackTrace();
}
return mShutOffAnimation;
}
(4)
/vendor/mediatek/proprietary/operator/frameworks/bootanimation/MtkBootanimation/BootAnimation.cpp
bool BootAnimation::threadLoop()
{
bool r;
// We have no bootanimation file, so we use the stock android logo
// animation.
sp<MediaPlayer> mediaplayer;
/**
const char* resourcePath = NULL;
*/
/** MTK begin */
const char* resourcePath = initAudioPath();
/** MTK end */
status_t mediastatus = NO_ERROR;
if (resourcePath != NULL) {
bPlayMP3 = true;
ALOGD("sound file path: %s", resourcePath);
mediaplayer = new MediaPlayer();
……
}
……
}
(5)
在alps\device\mediatek\$(alps)\device.mk中无下面的赋值选项需添加
PRODUCT_PACKAGES += mtkbootanimation
PRODUCT_PACKAGES += libmtkbootanimation
$(alps)是对应的工程名,比如:6763
然后编译,编译前麻烦:make clean
注意:O版部分代码有问题,关机动画错使用成了开机动画,按照如下修改即可;
/vendor/mediatek/proprietary/operator/frameworks/bootanimation/MtkBootanimation/BootAnimation.cpp
status_t BootAnimation::readyToRun() {
……
if (bBootOrShutDown && encryptedAnimation &&
(access(SYSTEM_ENCRYPTED_BOOTANIMATION_FILE, R_OK) == 0)) {
mZipFileName = SYSTEM_ENCRYPTED_BOOTANIMATION_FILE;
return NO_ERROR;
}
static const char* bootFiles[] = {OEM_BOOTANIMATION_FILE, SYSTEM_BOOTANIMATION_FILE};
static const char* shutdownFiles[] =
{OEM_SHUTDOWNANIMATION_FILE, SYSTEM_SHUTDOWNANIMATION_FILE};
for (const char* f : (bBootOrShutDown ? bootFiles : shutdownFiles)) {
if (access(f, R_OK) == 0) {
mZipFileName = f;
return NO_ERROR;
}
}
……
}
Android系统(221)---O版自定义开关机动画相关推荐
- Android P版自定义开关机动画
Android P版自定义开关机动画 Google default关机流程只显示进度条,不会播放关机动画.如需自定义开关机动画,建议使用mtkbootanimation进行客制化 [SOLUTION] ...
- MTK平台Android 12自定义开关机动画铃声
完整的patch见 https://download.csdn.net/download/a785722173/87036230 修改文件和Q平台大同小异 Android Q自定义开关机动画_a785 ...
- Android如何定制化自己的开关机动画、开关机铃声
一.开机动画: 1) 制作bootanimation.zip.制作方法举例如下: 分别创建名为"part0"和"part1"的文件夹以及一个名为"de ...
- Android 系统(151)----添加开关机铃声
一.制作bootanimation.zip(windows)和准备开机铃声bootaudio.mp3 1.新建文件夹:bootanimation 2.在文件夹bootanimation中新建文件夹pa ...
- android 开关机动画
开机画面,按照国际惯例,一般是分为2屏,当然也有3屏的说法,不管怎样,我这里说得就是最后的一屏,按照bootanimation的字面意思翻译,大概也就是开机动画的意思,那这就不说第几屏了,直接用&qu ...
- android 关闭关机动画,Android 开关机动画 BootAnimation/ShutdownAnimation 解析
引言 (该部分转载): 开机动画的地址:system\media\bootanimation.zip,要修改开机动画就是修改bootanimation这个文件.如果说你的手机里没有这个文件,那就是说明 ...
- android开关机动画铃声
1. 开 关机 动画的启动 Android系统在init.rc中定义了很多Service,具体定义格式可以参考<Android Platform Developer's Guide>中的& ...
- Android 8.0 开机动画,RK3326 android10.0(Q) 开机logo+开关机动画替换
RK3326 android10.0(Q) 开机logo+开关机动画替换 2020年08月14日 | 萬仟网移动技术 | 我要评论 开机logouboot和kernel阶段的logo分别为开机显示的第 ...
- android开机动画多长时间_android开关机动画和铃声配置
12. 分区修改 A 修改分区文件mediatek\build\tools\ptgen\partition_table.xls B 修改分区头文件mediatek\custom\project\com ...
最新文章
- 英伟达TRTTorch
- spark算子_Spark常用算子
- 设计模式 之 代理模式
- 文件服务器的配置与管理(3) 共享文件夹的创建与使用
- HBASE完全分布式安装
- 牛客题霸 [删除链表的倒数第n个节点] C++题解/答案
- odoo基础数据加载
- 自媒体免费素材,国旗高清无水印素材,PNG格式,直接引用即可
- 凸优化学习笔记(五):凸优化算法、无约束优化算法、有约束优化算法
- 用友软件常用名词解释
- linux位系统安装官方install_flash_player_npapi_linux.x86_64.tar.gz插件包的方法
- 电脑基础常识:CPU、GPU、内存、主板、电源
- scratch3.0加载自己的作品最新版
- 电路图:LM3886低音炮电路
- 容器编排工具与 Kuberneters
- 森林图怎么分析_森林图(forest plot)怎么看|meta分析
- 重庆邮电大学计算机2019湖北分数线,2019重庆邮电大学录取分数线
- 思博伦SpirentTestCenter - RFC2889之MAC地址表容量测试 -双极未来
- 每日一BUG(javax.el.PropertyNotFoundException: 类型[com.Bean.Goods]上找不到属性[img])
- 出现NullPointerException原因