启动异常进入recovery模式
程序员文章站
2022-06-24 18:10:36
分析frameworks/base/services/core/java/com/android/server/RescueParty.javaprivate static void executeRescueLevelInternal(Context context, int level) throws Exception { switch (level) { case LEVEL_RESET_SETTINGS_UNTRUSTED_DEFAULTS: r...
分析
frameworks/base/services/core/java/com/android/server/RescueParty.java
private static void executeRescueLevelInternal(Context context, int level) throws Exception {
switch (level) {
case LEVEL_RESET_SETTINGS_UNTRUSTED_DEFAULTS:
resetAllSettings(context, Settings.RESET_MODE_UNTRUSTED_DEFAULTS);
break;
case LEVEL_RESET_SETTINGS_UNTRUSTED_CHANGES:
resetAllSettings(context, Settings.RESET_MODE_UNTRUSTED_CHANGES);
break;
case LEVEL_RESET_SETTINGS_TRUSTED_DEFAULTS:
resetAllSettings(context, Settings.RESET_MODE_TRUSTED_DEFAULTS);
break;
case LEVEL_FACTORY_RESET:
RecoverySystem.rebootPromptAndWipeUserData(context, TAG);
break;
}
}
android系统默认核心服务和核心APP异常重启四次仍然不恢复正常时,系统的RescueParty检测到了,就进入到了factoryreset界面了。根据相关log需要去查找系统核心服务或核心APP崩溃的具体原因。
关键log
W PackageManager: Incremented rescue level to FACTORY_RESET triggered by UID 10075
出现异常rescue level会累加,根据UID找出具体崩溃的进程
本文地址:https://blog.csdn.net/xuaba/article/details/112830050