Solve the Problem of ADB devices in Ubuntu :???????????? No permissions Method

Source: Internet
Author: User

In the past, I ran a program on the simulator. This time, the team finally finished a G3 program. In order to prove that my android didn't waste time on self-learning, I wrote "Hello, walfred" and compiled the APK, however, a problem occurred while connecting to the computer via USB.

The following error occurs when using ADB devices:

List of devices attached

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

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

Solution:

1. 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 the HTC phones). According to the information on the Internet, as more and more mobile phones were used in the Android system, idvendor was assigned to each mobile phone, but the solution was the same.

$ 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, if you do not connect to other peripherals, you only need to find the line that is not the root hub.

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

2. You do not need to restart the computer. Restart ADB server.

(Important) unplug the USB and re-connect it. Then execute:

Sudo./ADB kill-Server

./ADB Devices

If you want to use multiple mobile phones, you may need to repeat the steps to add them.

After four years, I re-registered the csdn blog. I originally wanted to start recording Android study notes. I didn't expect the first article to be reposted, just to record some common problems encountered in my work.

The reprinted items will be marked later, and attention will be added after your practice! It can also be avoided. What everyone hates is simply copying from the Internet, which provides some help to solve the problem!

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.