3

在 Linux 下 Android 设备连接 USB 提示 “no permissions”

 2 years ago
source link: https://ljason.cn/Enable-Android-device-USB-on-Linux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

在 Linux 下 Android 设备连接 USB 提示 “no permissions”

发表于 2018-01-20

更新于 2020-03-08

分类于

Linux

  先在终端执行 lsusb ,然后插上 USB 再执行一遍,确定第二次多出来的设备就是新插上的 Android 设备。

00.webp

  然后运行:

cd /etc/udev/rules.d
# XX 是数字,MyDevice 是名字
sudo vi XX-MyDevice.rules

  在里面写上刚刚的设备 ID :

SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1",ATTRS{idProduct}=="4ee7",MODE="0666"

  然后运行:

sudo systemctl restart udev.service

  重新插拔即可看见新设备了,在 Android Studio 里面也可以看见了。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK