Android 13 aosp 恢复出厂设置流程
-
packages/apps/Settings/src/com/android/settings/MainClearConfirm.java
Settings中的MainClearConfirm发送FACTORY_RESET广播
-
frameworks/base/services/core/java/com/android/server/MasterClearReceiver.java
MasterClearReceiver收到广播调用RecoverySystem重启设备擦除用户数据
-
frameworks/base/core/java/android/os/RecoverySystem.java
bootCommand执行–wipe_data
调用RecoverySystemService中rebootRecoveryWithCommand
-
framewords/base/services/core/java/com/android/server/recoverysystem/RecoverySystemService.java
调用PowerManager reboot(REBOOT_RECOVERY)