Android系统中如何删除开机动画
删除开机动画
Animation的资源大小和播放时长一直是影响开机时间的重要因素之一,移除开机动画将有效地加快开机速度。
frameworks/base/cmds/bootanimation/BootAnimationUtil.cpp
bool bootAnimationDisabled() {
char value[PROPERTY_VALUE_MAX];
//将获取结果改为1,则无法进入到开机动画流程中
//property_get("debug.sf.nobootanimation", value, "0");
property_get("debug.sf.nobootanimation", value, "1");
if (atoi(value) > 0) {
return true;
}
property_get("ro.boot.quiescent", value, "0");
if (atoi(value) > 0) {
// Only show the bootanimation for quiescent boots if this system property is set to enabled
if (!property_get_bool("ro.bootanim.quiescent.enabled", false)) {
return true;
}
}
return false;
}
或者在mk文件中直接配置 debug.sf.nobootanimation 属性值为1即可