Android 10.0 system enables and disables adb push and adb pull transfer file function

1. Usage scenarios

  During the system development of 10.0, in some products, some developed functions are more important, to prevent leakage of technical points in the shipped products, disable
commands such as adb pull and adb push to obtain files such as jar and apk under the system system , so these commands need to be disabled

2. Analysis of the system enabling and disabling the function of adb push and adb pull to transfer files

Look at the adb code in the system source code, the source code of adb is under system/core/adb,
(1) The essence of adb is socket communication, and data and files are transmitted through the socket
(2) adb transmission is based on each fixed The data sent in packets of the format

The ADB (Android Debug Bridge) driver is a driver used to establish a connection and communication between a computer and an Android device. The main role of the ADB driver is to help developers and users perform a series of debugging, testing and management operations related to Android devices on the computer. Through adb, we can easily debug Android programs through DDMS in Eclipse . To put it bluntly, it is a debug tool.

3. The system opens the code that disables the function of adb push and adb pull to transfer files

 system\core\adb\daemon\main.cpp
 system\core\adb\transport.cpp
 system\co

Guess you like

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