error: insufficient permissions for device问题解决
分类:Uncategorized
阅读 (5,354)
6月 122017
一、问题
通过adb连接android设备时,出现了如下错误:
error: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [http://developer.android.com/tools/device.html] for more information
二、解决办法
首先在插上usb设备和拔下设备时各执行一次lsusb命令,可以看到插上设备比拔掉设备时结果多出一行,如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
连接设备时 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 006: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 001 Device 005: ID 8087:0a2a Intel Corp. Bus 001 Device 004: ID 1bcf:2b8a Sunplus Innovation Technology Inc. Bus 001 Device 007: ID 2207:0010 Bus 001 Device 002: ID 25a7:fa23 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 拔掉时 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 006: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 001 Device 005: ID 8087:0a2a Intel Corp. Bus 001 Device 004: ID 1bcf:2b8a Sunplus Innovation Technology Inc. Bus 001 Device 002: ID 25a7:fa23 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
可以看到多了一行
Bus 001 Device 007: ID 2207:0010
然后我们编辑/etc/udev/rules.d/下的51-android.rules文件(如果没有则新建一个此文件),执行命令:
1 |
sudo gedit /etc/udev/rules.d/51-android.rules |
然后在文件中增加一行如下内容:
1 |
SUBSYSTEM=="usb", ATTRS{idVendor}=="2207", ATTRS{idProduct}=="0010",MODE="0666" |
保存文件后,给51-android.rules加上权限
1 |
sudo chmod a+x 51-android.rules |
再重新插上usb线就可以了。
Sorry, the comment form is closed at this time.