Enabling Network ADBD Service in Buildroot

When building the Linux system on chips such as RK3562/6/8, RK3576, and RK3588 using Buildroot, if you want to support the ADBD service for network access to the board, the following operations are required:1. When integrating the ADBD service in Buildroot, if the configuration optionBR2_PACKAGE_ANDROID_ADBD_TCP_PORT is not set, it defaults to 0, meaning that the ADBD network PORT will not be configured, and thus the network ADB functionality will not be enabled. To enable this service, you can configureBR2_PACKAGE_ANDROID_ADBD_TCP_PORT to 5555 (the default network port for Android’s ADBD service is also this value). The corresponding configuration in the Buildroot configuration file is as follows:

BR2_PACKAGE_ANDROID_ADBD_TCP_PORT=5555

2. If the ADBD service is already integrated on the board, but the above configuration was not set during the Buildroot compilation, you can enable the ADBD port by executing the following command:

echo "export ADB_TCP_PORT=5555" >> /etc/profile.d/adbd.sh

Note that after executing this, you need to restart the ADBD service or reboot the machine.3. The configuration options related to ADBD in Buildroot are as follows. Remember that to support ADBD, you also need to enable the following configuration options:

BR2_PACKAGE_ANDROID_ADBD=y
BR2_PACKAGE_ANDROID_ADBD_STATIC=y

The second option compiles ADBD as a statically linked binary, meaning it does not depend on dynamic libraries and can be used anywhere directly.After the above configurations, you can connect to the board from your computer using the following command for regular adb debugging operations:

adb connect board_ip:5555

Once connected, you can use the following commands:

adb devices
adb shell

Thus, the network debugging functionality of ADBD is successfully configured when building the Linux environment on the board using Buildroot.

Leave a Comment