【Linux】Android手机在Ubuntu上无法被adb识别解决办法(权限相关)

创建并编辑个文件:sudo vim /etc/udev/rules.d/51-android.rules,输入以下内容

SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666" OWNER="scue"
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666" OWNER="scue"

>>"scue"是当前我的用户名,替换成自己的就可以了

以上方法可以解决的错误:

$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
????????????    no permissions

$ adb shell
error: insufficient permissions for device

你可能感兴趣的:(android)