【BUG】no permissions (user in plugdev group; are your udev rules wrong?

本文介绍在Ubuntu18系统中解决ADB无法连接开发板的问题,通过配置udev规则,针对Google设备ID进行权限设置,实现成功连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ubuntu 18接开发板子,发现adb这个提示,查看:

felix@felix-desktop:~/wd500g/eyemore-i.mx/android_n7$ lsusb
Bus 001 Device 002: ID 8087:8001 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 004: ID 8087:0a2a Intel Corp.
Bus 002 Device 009: ID 18d1:4ee7 Google Inc.
Bus 002 Device 003: ID 0461:4d51 Primax Electronics, Ltd 0Y357C PMX-MMOCZUL (B) [Dell Laser Mouse]
Bus 002 Device 002: ID 17ef:602d Lenovo
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

发现手机端口为 Bus 002 Device 009: ID 18d1:4ee7 Google Inc.

felix@felix-desktop:/$ cd /etc/udev/rules.d/
felix@felix-desktop:/etc/udev/rules.d$ ls
felix@felix-desktop:/etc/udev/rules.d$ ls -a
. …
felix@felix-desktop:/etc/udev/rules.d$ vim 51-android.rules

参考 https://github.com/snowdream/51-android/blob/master/51-android.rules
根据id: 18d1 对于添加添加

#Google Inc.
SUBSYSTEM==“usb”, ATTR{idVendor}==“18d1”, MODE=“0666”, GROUP=“plugdev”

在执行:

chmod a+r /etc/udev/rules.d/51-android.rules
adb kill-server
adb start-server

然后就OK了
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值