Chan Chen Coding...

Fix “???????????? no permissions” with adb and your Android phone

A common problem when using adb to access your Android phone via USB is:

$ adb devices List of devices attached ????????????    no permissions 

According to official Android Developers website:

If you’re developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different vendor ID. The example rules files below show how to add an entry for a single vendor ID (the HTC vendor ID). In order to support more devices, you will need additional lines of the same format that provide a different value for the SYSFS{idVendor} property.

Quick fix:

sudo -s adb kill-server adb start-server adb devices 

Permanent fix:

$ lsusb Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 002: ID 093a:2510 Pixart Imaging, Inc. Hama Optical Mouse 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 002: ID 18ea:0004 Matrox Graphics, Inc. TripleHead2Go [Digital Edition] Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 010: ID 0bb4:0c87 High Tech Computer Corp.  <<<<<<<< my HTC phone Bus 001 Device 008: ID 046d:0817 Logitech, Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 

Note 0bb4 is the vendor ID. Next, create /etc/udev/rules.d/51-android.rules with the following lines:

SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" 

Final steps:

sudo chmod a+r /etc/udev/rules.d/51-android.rules sudo udevadm control --reload-rules 

Done.

A list of popular vendor IDs:

Acer0502
Dell413c
Foxconn0489
Garmin-Asus091E
HTC0bb4
Huawei12d1
Kyocera0482
LG1004
Motorola22b8
Nvidia0955
Pantech10A9
Samsung04e8
Sharp04dd
Sony Ericsson0fce
ZTE19D2



-----------------------------------------------------
Silence, the way to avoid many problems;
Smile, the way to solve many problems;

posted on 2013-03-10 13:58 Chan Chen 阅读(146) 评论(0)  编辑  收藏 所属分类: Android


只有注册用户登录后才能发表评论。


网站导航: