Android 13.0 removes the menu options on the recovery mode UI operation page

1 Overview

In the customized development of system ROM in 13.0, some menu options in the recovery mode will be removed when entering the recovery mode as needed,
Reboot to bootloader, Enter rescue and other menu items, after analysis, we found that
just remove some menu options in device.cpp. Next, we will analyze and implement related functions

2. Remove the core code of menu options on the recovery mode UI operation page

    bootable/recovery/recovery_ui/device.cpp
    bootable/recovery/recovery_main.cpp

3. Analysis and implementation of the core functions of removing the menu options on the recovery mode UI operation page

In the recovery module of 13.0, you enter recovery through Powermanager in the system. Powermanager calls the reboot function.
Finally writes a recovery flag to the register. When the machine restarts Read this flag in BootLoader, and then enter the recovery mode, which is similar to the adb reboot recovery method
After analysis, we found that g_menu_actions in device.cpp is the collection of recovery user operation options, and the corresponding event processing
Corresponding recovery mode selection events, you can remove certain events from here

    diff --git a/bootable/recovery/recovery_ui/device

Guess you like

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