adb devices no permissions user in plugdev group are your udev rules wrong

Linux下调试android设备:

adb devices
List of devices attached
xxxxxxxx    no permissions (user in plugdev group; are your udev rules wrong?);
see [http://developer.android.com/tools/device.html]

按照以下操作解决问题:

$ lsusb
Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 078: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 002 Device 003: ID 8087:07dc Intel Corp. 
Bus 002 Device 002: ID 5986:0652 Acer, Inc 
Bus 002 Device 081: ID 22b8:2e81 Motorola PCS//记录下这里的22b8和2e81 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

在对应的目录下创建文件,把内容填写进去,把上一步的id替换掉

$ sudo vi /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e81", MODE="0666", GROUP="plugdev"

新建文件的时候要给权限:

chmod a+rx /etc/udev/rules.d/51-android.rules
chmod -R 777 /etc/udev/rules.d

重启udev

sudo /etc/init.d/udev restart

最后再重启下adb服务,就可以了

cd 到adb目录
sudo ./adb kill-server
sudo ./adb devices

 

 

 

 

 

 

 

 

 

 

 

 

 

 

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页