Android 10.0 disables adb reboot recovery command to achieve normal restart function

1 Introduction


  In the system development of 10.0, when customizing the recovery module, because product development needs to disable recovery-related functions, such as
entering recovery through the adb reboot recovery method of the adb command, it also needs to be disabled, so you need to understand the relevant access to recovery process to disable the feature

2. Disable the adb reboot recovery command to realize the core class of normal restart function

system\core\adb\daemon\services.cpp
system\core\adb\daemon\reboot_service.cpp

3. Disable the adb reboot recovery command to realize the core function analysis and implementation of the normal restart function


 In the 10.0 product, after entering the recovery mode through adb reboot recovery, recovery-related operations can be performed normally, and
adb is a PC-side tool, and adbd is a server-side, running on the mobile phone adbd reads the socket and parses the command string sent by adb , analyze related commands to execute related functions, so inputting adb related commands on the PC side will analyze related commands in the
system\core\adb module.

3.1 Analysis of related codes on the server side in services.cpp

In the system\core\adb module, services.cpp will be started during the boot process, as a daemon process, to process the core bin file for the communication between the adb module and the PC terminal, and to process various Such adb command, all the next detailed analysis of its adb-related communication command source code

asocket* daemon_service_to_socket(std::string_view na

Guess you like

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