adb 调试出现问题

时间:2023-03-09 04:15:50
adb 调试出现问题

用adb shell时出现error: insufficient permissions for device

在终端输入 sudo -s

adb kill-server

adb start-server

即可

用adb shell 时出现 no devices

在终端输入 cd /etc/udev/rules.d/

sudo vi 51-android.rules

添加 SUBSYSTEM=="usb", ATTRS{idVendor}=="2207",ATTRS{idProduct}=="0010",MODE="0666"

保存并修改权限:

sudo chmod a+x 51-android.rules

其中ATTRS{idVendor}=="2207",ATTRS{idProduct}=="0010",是根据如下操作得到的:

在终端输入lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 413c:2113 Dell Computer Corp.
Bus 001 Device 003: ID 8087:0a2a Intel Corp.
Bus 001 Device 002: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 005: ID 2207:0010  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

至此完成。