This is an old revision of the document!
Android Debug Bridge (adb
) is a versatile command-line tool that lets you communicate with a device.
Install the adb
tool on PC Host:
$ sudo apt-get update $ sudo apt-get install android-tools-adb
Add permission and configuration files
Add permission and configuration details after installation.
Add permission
$ sudo useradd -G plugdev $USER
Write configuration files
Create a .rules file:
$ sudo vim /etc/udev/rules.d/51-android.rules
Write the following to the .rules file:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
Restart udev service
$ sudo /etc/init.d/udev restart
Install ADB Tool
When executing the adb command in the cmd terminal, you need to enter the C:\platform-tools directory, otherwise it will prompt that the adb command cannot be found.
Settings
→ Developer options
→ USB debugging
Settings
→ About device
→ Status
→ IP
$ adb connect 192.168.1.120 $ adb shell
Settings
→ Developer options
→USB debugging
$ adb shell