adb shell报错:error: insufficient permissions for device的解决办法

1.错误描述

执行 adb shell 时,报错如下;

error: insufficient permissions for device 

2.解决办法

1,终端执行 lsusb 结果如下,注意绿色行中的 05c60901

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 003: ID 413c:2107 Dell Computer Corp. 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 05c6:9091 Qualcomm, Inc. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

2,新建一个 qcom-51-android.rules 文件,内容如下:

SUBSYSTEM=="usb", MODE="0666", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9091", SYMLINK+="android_adb"

3,拷贝这个文件到 /etc/udev/rules.d/ 

4,/home/你的用户名/.android / 下 新建 adb_usb.ini 文件,文件内容为:0x05c6

5,重启udev

$sudo service udev restart

6,重启ADB服务

$adb kill-server
$adb start-server

7,重插usb,执行adb shell 

 

 

posted @ 2017-02-22 14:02  f9q  阅读(516)  评论(0编辑  收藏  举报