[Excerpted from] http://zwkufo.blog.163.com/blog/static/2588251201126113638144/
In Linux, when debugging Android phones on a real machine, you often encounter insufficient permissions for device errors. In addition, ADB devices may be garbled and you are not authorized to perform any ADB operations. The following configuration method can solve this problem (the environment is UBUNTU ):
1. Enter terminal and enter the "lsusb" command to view the USB venderid. The following is displayed on my PC:
Bus 007 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 006 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 004 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 003 device 001: Id 1d6b: 0001 Linux Foundation 1.1 root Hub
Bus 002 device 014: Id 18d1: deed Google Inc.
Bus 002 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root Hub
Bus 001 device 001: Id 1d6b: 0002 Linux Foundation 2.0 root Hub
The above bus 002 is my connected USB device, and the venderid is 18d1
Run the following command to open the text editor. Paste the following text and save it.
Sudo gedit/etc/udev/rules. d/50-android.rulesSubsystem = "USB", sysfs {idvendor} = "18d1", mode = "0666"2. continue executing at Terminal:Sudo chmod A + Rx/etc/udev/rules. d/50-android.rulesSudo/etc/init. d/udev restart3. Go to the tools directory (or platform-tools) in the Android-SDK and execute the following command line:Sudo./ADB kill-ServerSudo./ADB ShellSuExit4. After exiting ADB, try again:Sudo./ADB remountSudo./ADB DevicesThe serial number of the real device indicates that the connection is successful. Go to eclipse, right-click the project to be installed in project Explorer-> Run as-> RUN deployments, and change the running target to manual ). Then run. A message is displayed, indicating that you can select a target and select a real machine. (If no real machine is displayed, try to unplug the USB cable and plug it in)