Built-in ADB Management¶
The built-in ADB service is completely independent of the system’s own ADB. Before using it, you need to manually call the following interface to install your ADB public key to the service, otherwise the connection will show as unauthorized (the key authorized in the system developer mode settings is not compatible with this built-in ADB). You can implement wireless connection to the built-in ADB. Through this function, you can connect to the highest privilege ADB without enabling developer mode.
Note
JDWP debugging-related functions are unique and conflict with the built-in system, so this built-in ADB currently does not support them.
Installing the Key¶
The key installation interface requires you to have the ADB public key ready. Usually, it’s located on your computer. You can find it in the ~/.android or C:\Users\xxxx.android directory. Its filename is adbkey.pub. If you don’t see this file but adbkey exists, you can use the adb pubkey adbkey >adbkey.pub
command to manually generate it.
Next, call the following interface to install the local public key into the service.
d.install_adb_pubkey("/path/to/adbkey.pub")
After installation, you can execute the command adb connect 192.168.0.2:65000
to connect to the built-in ADB.
Uninstalling the Key¶
If you need to remove a public key from the built-in ADB, you can execute the following call.
d.uninstall_adb_pubkey("/path/to/adbkey.pub")