1. Install the adb tool
sudo apt-get install android-tools-adb
After completing this step, connect the android device to the computer, open USB debugging and execute the adb shell will prompt "error: device not found" by default
2. Add vendor ID and product ID
1) Type the lsusb in the terminal to view the usb device before and after the android device is connected to the computer. Compare the ID information of the android device
2) Create adb_usb.ini file and write the device manufacturer ID
mkdir ~/.android && cd ~/.android
touch adb_usb.ini
echo 0x22d9 > adb_usb.ini
3) Add permissions
sudo vim /etc/udev/rules.d/70-android.rules , add the following:
SUBSYSTEM=="usb", ATTRS{idVendor}=="22d9", ATTRS{idProduct}=="2765", MODE="0666"
3. Restart the usb service
sudo chmod a+rx /etc/udev/rules.d/70-android.rules
sudo service udev restart
Finally, type adb devices to discover the newly added android device: