no permissions fastboot 解决

使连接上的机器进入fastboot模式
设置usb权限
因为ubuntu这样的系统都是默认以非root身份在运行的,要使用usb调试,需要sudo支持。
$ lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 413c:2106 Dell Computer Corp.
Bus 002 Device 002: ID 0461:4d81 Primax Electronics, Ltd
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 010: ID 0bb4:0c87 High Tech Computer Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
列表中,Bus 001 Device 010: ID 0bb4:0c87 High Tech Computer Corp. 这一行为htc手机的usb使用端口,记录一下,id为0bb4(基于上所有的htc都是这个ID)。
$sudo vim /etc/udev/rules.d/70-android.rules   //70-android.rules为新建的。
加入以下内容:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0c87",MODE="0666"

其中的idvendor idProduct指的是USB的ID可以使用lsusb查询得到。
比如我的是:
lsusb

Bus 001 Device 010: ID 0bb4:0c87 High Tech Computer Corp

ID 0bb4 就是idVendor ,0c87就是 idProduct
运行命令,重启udev:
$sudo chmod a+rx /etc/udev/rules.d/70-android.rules
$sudo service udev restart
(很重要)拔掉usb重新连上再执行:
fastboot devices

你可能感兴趣的:(no permissions fastboot 解决)