Ubuntu ADB devices: No permissions Solution

Source: Internet
Author: User

After connecting to the Android phone via USB under untun, the following error occurs when using ADB devices:

List of devices attached

???????????? No Permissions

The device name is displayed in ddms as well ????, The process name cannot be displayed, and the log cannot be viewed.

I. Introduction to tools
Android-sdk-linux_x86/tools has a bunch of tools, today is used: Android debug bridge, In the android development process, this tool is the most used. (ADB, a bit like GDB in GCC)

ADB start-server-in fact, it will start an ADB fork-server Server
ADB kill-server-kill
ADB devices-list all devices

2. Set USB Permissions
Because ubuntu and other systems run as non-root by default, sudo is required for 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

In the list, bus 001 device 010: Id 0bb4: 0c87 high tech Computer Corp. this line uses the USB port of the HTC mobile phone. record that the ID is 0bb4 (based on the ID of all HTC ).

$ 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 indicates the usb id that can be queried using lsusb.
For example, mine is:
Lsusb

Bus 001 device 010: Id 0bb4: 0c87 high tech Computer Corp

Id 0bb4 is idvendor, and 0c87 is idproduct.

Run the following command to restart udev:

$ Sudo chmod A + Rx/etc/udev/rules. d/70-android.rules
$ Sudo service udev restart

3. Restart ADB Server
(Important) unplug the USB and re-connect it. Then execute:

Sudo./ADB kill-Server
./ADB Devices
./ADB root (this step is important)

4. Use USB for debugging
The problem in the Problem description has been resolved.

Select the corresponding devices in ddms and you will see the log ....

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.