Original URL: http://blog.csdn.net/maosidiaoxian/article/details/22661725
Connect Android devices under Ubuntu, though you don't have to install drivers like windows, but you will encounter an error: enter adb shell, prompt insufficient permissions for device, enter ADB Devices, the device name is displayed???????? Wait a lot of question marks.
This is because Ubuntu is running as a non-root user by default. If you want to use ADB for USB debugging, you can enter the ADB shell to use the root account to execute the command, but it is too cumbersome.
Another approach is to configure Udev rules. Here's how:
1. Enter LSUSB to view the ID number of the device. As I output the following:
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 bus 002 Device 008:id 0bb4:0d02 High Tech computer Corp. This is the USB port of my HTC phone. 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 and then add the following content
subsystem== "USB", attrs{idvendor}== "0bb4", attrs{idproduct}== "0d02", mode= "0666"
3. Modify 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 device name properly.
Ps:
The latest modification method, do not have to look at the device ID, directly under the RULES.D add a file 51-android.rules, the content is:
[Plain]View Plaincopy
- subsystem== "USB" env{devtype}== "Usb_device", mode= "0666"
Currently common to all Android devices. After saving as the above steps to modify permissions, restart Udev and ADB, and then plug in the phone again.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
"Go" Ubuntu connect Android Device (the simplest method)