Connect the Android device under Ubuntu, although you don't have to install the drive like Windows, but you'll encounter an error: Enter the ADB shell, prompt insufficient permissions for device, and enter the ADB devices, The device name is displayed???????? Wait for a lot of question marks.
This is because Ubuntu runs by default as a non-root user. If you want to use the ADB for USB debugging, using the root account to execute the relevant commands can go into the adb shell, but it is too cumbersome.
Another approach is to configure the rules for Udev. The method is as follows:
1, input lsusb, view the device ID number. As my output reads as follows:
Bus 002 Device 008:id 0bb4:0d02 High Tech Computer Corp.
Bus 008 Device 002:id 046d:c52e Logitech, Inc.
Bus 001 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub
Bus 002 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub
Bus 003 Device 001:id 1d6b:0001 Linux Foundation 1.1 root Hub
Bus 004 Device 001:id 1d6b:0001 Linux Foundation 1.1 root Hub
Bus 005 Device 001:id 1d6b:0001 Linux Foundation 1.1 root Hub
Bus 006 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub
Bus 007 Device 001:id 1d6b:0003 Linux Foundation 3.0 root Hub
Bus 008 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub
Bus 009 Device 001:id 1d6b:0003 Linux Foundation 3.0 root Hub
One of the bus 002 Device 008:id 0bb4:0d02 High Tech Computer Corp. This line is my HTC phone's USB usage port. Remember these two id:0bb4 and 0d02 in the middle.
2, sudo vi/etc/udev/rules.d/70-android.rules
If you do not have this file, you can create it and then add the following
subsystem== "USB", attrs{idvendor}== "0bb4", attrs{idproduct}== "0d02", mode= "0666"
3, modify the permissions
sudo chmod a+rx/etc/udev/rules.d/70-android.rules
4, restart the Udev service:
sudo service udev restart
5, restart the ADB server.
Re-connect the device, and then execute sudo./adb kill-server
ADB start-server
Then see if the ADB devices has already shown the name of the device properly.
Ps:
The latest modification method, not to see the device ID, directly under the RULES.D to add a file 51-android.rules, the content is:
[plain] view plain copy subsystem== "USB" env{devtype}== "Usb_device", mode= "0666" is currently universal for all Android devices. After saving as the above steps to modify permissions, restart Udev and ADB, and then plug in the phone again.