首页 > 数据库技术 > 详细

error: insufficient permissions for device(解决adb shell问题)

时间:2015-03-05 00:14:35      阅读:372      评论:0      收藏:0      [点我收藏+]

今天在linux下连接平板usb,试用adb shell时出现error: insufficient permissions for device,

而且我们输入adb devices显示:

xxnan@xxnan-pt:~$ adb devices
List of devices attached
????????????    device
那么我们怎么解决它呢?


首先在终端查看usb的ID,输入lsusb命令,我们可以看到我们刚插如usb的ID号,如:

xxnan@xxnan-pt:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 0461:4d80 Primax Electronics, Ltd
Bus 001 Device 004: ID 1c7a:0801 LighTuning Technology Inc. Fingerprint Reader
Bus 002 Device 003: ID 5986:0190 Acer, Inc
Bus 001 Device 019: ID 0bb4:0c02 High Tech Computer Corp. Dream / ADP1 / G1 / Magic / Tattoo (Debug)

红色的就是我们插入usb的ID号。


那么我们进入到cd /etc/udev/rules.d/下,新建一个51-android.rules文件(sudo  vim  51-android.rules),在这个文件中写上:

SUBSYSTEM=="usb", ATTRS{idVendor}==" 0bb4", ATTRS{idProduct}=="0c02",MODE="0666"

保存,再为51-android.rules加上权限(sudo chmod a+x 51-android.rules).


拔掉usb重新插上就可以了,如:

xxnan@xxnan-pt:~$ adb devices
List of devices attached
AB100607    device

这样就解决了不能识别USB的问题。

error: insufficient permissions for device(解决adb shell问题)

原文:http://www.cnblogs.com/Bonker/p/4314608.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!