adb devices: ?????? no permissio
- 环境
-Ubuntu 14.04Lts x86_64
adb devices: ?????? no permissions解决办法
-
$ adb devices
输出:
List of devices attached
?????? no permissions
- Ubuntu系统默认以非root身份在运行,要使用usb调试,需要sudo支持
$ lsusb
输出:
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 019: ID 05c6:9091 Qualcomm, Inc.
Bus 003 Device 002: ID 1bcf:0007 Sunplus Innovation Technology Inc. Optical Mouse
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub```
(列表中, Bus 003 Device 019: ID 05c6:9091 Qualcomm, Inc.这就是我所使用的高通平台的Android手机的usb使用端口,id为05c6)
- 编辑文件
$ sudo vim /etc/udev/rules.d/70-android.rules
加入以下内容:
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
- 重启udev
$ sudo chmod a+rx /etc/udev/rules.d/70-android.rules
$ sudo service udev restart
- 重启adb server (这两条命令需要 sudo -s 切换到root用户执行,之后可以退出root用户)
$ adb kill-server
$ adb start-server
- 输入adb devices
$ adb devices
输出:List of devices attached
e796a5e device
no permissions fastboot解决办法
-
$ fastboot -l devices
输出:no permissions fastboot usb:3.9
- 增加权限将fastboot的所有者属性改成root:
$ which fastboot
输出:/usr/bin/fastboot
$ cd /usr/bin/
进入到此目录
$ sudo chown root:root fastboot
$ ls -l fastboot
输出:-rwxr-xr-x 1 root root 93216 4月 1 2014 fastboot
- 将权限修改:
$ sudo chmod +s fastboot
$ ls -l fastboot
输出:-rwsr-sr-x 1 root root 93216 4月 1 2014 fastboot*
- 使用fastboot devices 可以查看到挂载设备,烧入img
$ fastboot flash system '/home/xmai/Desktop/system.img'
输出: sending 'system'(69553kB)
OKAY [ 1.375s ]
Writing 'system'...
OKAY [ 1.251s ]
finished. total time:2.626s
本文标题:adb devices: ?????? no permissio
本文链接:https://www.haomeiwen.com/subject/ciuxhftx.html
网友评论