Android 9.0 enters recovery mode and automatically restores the customization of factory settings

In the 9.0 device, since the customized device does not have the volume + and volume - buttons, when you manually select the mode of the recovery selection interface, you cannot choose which mode to enter. At this time, you need to enter the recovery. The
default is to enter the factory reset mode.
First look at the relevant source code of recovery.cpp
Path: bootable\recovery\recovery.cpp
First look at the main() method

int main(int argc, char **argv) {
   
    
    
// We don't have logcat yet under recovery; so we'll print error on screen and
// log to stdout (which is redirected to recovery.log) as we used to do.
android::base::InitLogging(argv, &UiLogger);
// Take last pmsg contents and rewrite it to the current pmsg s

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/124398728