Ubuntu adb 报错:no permissions (user in plugdev group; are your udev rules wrong?);

1. 安装adb,查看自己的安卓设备

sudo apt-get install android-tools-adb
adb start-server
lsusb

输出信息:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 8087:0a2b Intel Corp. 
Bus 001 Device 003: ID 18f8:0f99  android xxx
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

2. 创建设备文件(文件名随便):

sudo vim /etc/udev/rules.d/90-android.rules

内容:

SUBSYSTEM=="usb",ATTRS{idVendor}=="18f8",ATTRS{idProduct}=="0f99",MODE="0666",GROUP="plugdev",SYMLINK+="android",SYMLINK+="android_adb"
需要替换: ATTRS{idVendor}=="xxxx" ,ATTRS{idProduct}=="xxxx"

3. 重启 abd 服务

sudo udevadm control --reload-rules
sudo service udev restart
sudo udevadm trigger
adb kill-server
adb start-server

4. 确认设备连接成功

adb devices

  List of devices attached

faf80ac7    device

 

 

Ubuntu adb 报错:no permissions (user in plugdev group; are your udev rules wrong?);

上一篇:解决Mysql group_concat长度限制


下一篇:数据库3-记录操作