Built-in ADB Management

The built-in ADB service is completely independent from the system’s own ADB. Before using it, you must manually call the following interface to install your ADB public key into the service; otherwise, connections will show as unauthorized (the authorization keys enabled via Developer Mode in system settings are not compatible with this built-in ADB). You can wirelessly connect to the built-in ADB, allowing you to connect with full ADB privileges without enabling Developer Mode.

Note

JDWP debugging related features are unique and conflict with the system’s built-in ADB, so this built-in ADB currently does not support them.

Installing a Public Key

To install a public key, you first need to prepare your ADB public key. It is usually located on your computer, under either ~/.android or C:\\Users\\xxxx\\.android, named adbkey.pub. If you don’t see this file but have adbkey, you can generate it manually using the command:
adb pubkey adbkey > adbkey.pub.

Then, call the following interface to install your machine’s public key into the service:

d.install_adb_pubkey("/path/to/adbkey.pub")

After installation, you can connect to the built-in ADB using the command:
adb connect 192.168.0.2:65000.

Uninstalling a Public Key

If you need to remove a public key from the built-in ADB, use the following call:

d.uninstall_adb_pubkey("/path/to/adbkey.pub")