Platform: Rockchip
OS: Android 6.0
Kernel: 3.10.92
Recovery在做清data的时候, 会做一个掉电保护,如果在wipe data中途中掉电,那么下一次重启还是
会进入recovery模式重新做wipe data动作.
比如当前使用命令恢复出厂设置:
echo –wipe_data > /cache/recovery/command
reboot recovery
那么这段code就会被跑到
recovery.cpp:
// --- if that doesn't work, try the command file
if (*argc <= 1) {
FILE *fp = fopen_path(COMMAND_FILE, "r");
if (fp != NULL) {
char *token;
char *argv0 = (*argv)[0];
*argv = (