Ubuntu adb devices:no Permissions Solution

Source: Internet
Author: User

Ntun after USB connection to Android phone, use ADB devices appears as follows:

List of devices attached

???????????? No permissions

Also display the device name in the DDMS display???? , the process name cannot be displayed, and the log cannot be viewed.

I. Introduction of TOOLS
Android-sdk-linux_x86/tools has a bunch of tools to use today: Android Debug Bridge, which is the most used tool in Android development. (abbreviated ADB, sort of like GCC's gdb)

ADB start-server– In fact it will start an ADB fork-server server
ADB Kill-server–kill off
ADB devices– List of all devices

Second, set the USB permissions
Because systems such as Ubuntu are running by default as non-root, you need sudo support to use USB debugging.

$ lsusb
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 003:id 413c:2106 Dell computer Corp.
Bus 002 Device 002:id 0461:4d81 Primax Electronics, LTD
Bus 002 Device 001:id 1d6b:0001 Linux Foundation 1.1 root Hub
Bus 001 Device 010:id 0bb4:0c87 high Tech computer Corp.
Bus 001 Device 001:id 1d6b:0002 Linux Foundation 2.0 root Hub

List, Bus 001 Device 010:id 0bb4:0c87 high Tech computer Corp. This behavior for the HTC phone's USB port, record the ID of 0BB4 (based on all HTC is this ID).

$sudo Vim/etc/udev/rules.d/70-android.rules

Add the following content:

subsystem== "USB", attrs{idvendor}== "0bb4", attrs{idproduct}== "0c87", mode= "0666"

The Idvendor idproduct refers to the USB ID that can be obtained using the LSUSB query.
For example, mine is:
Lsusb

Bus 001 Device 010:id 0bb4:0c87 high Tech computer Corp

ID 0bb4 is Idvendor, 0c87 is idproduct

To run the command, restart Udev:

$sudo chmod a+rx/etc/udev/rules.d/70-android.rules
$sudo Service Udev Restart

Third, restart ADB server
(Very important) unplug the USB reconnect and perform:

sudo./adb kill-server
./ADB Devices
./adb root (This step is important)

Iv. using USB for debugging
The problem in the description of the problem has been resolved.

In DDMS Select the corresponding devices, you can see the log ....

V. Accumulation of knowledge

1. Gooogle Udev

2. Plug in the USB and use the following command to monitor system information in real time
sudo tail-f/var/log/messages

VI, Ubuntu tapping ADB devices device list is empty, but Lsusb can view the PID and vid

sudo gedit ~/.android/adb_usb.ini edit the file

After joining 0x0bb4, execute the following command

sudo service udev restart

Android Update ADB updates service


Vii. Reference

1. http://edu.codepub.com/2010/1229/28405.php

2. http://blog.csdn.net/zhenwenxian/archive/2010/09/23/5901350.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.