小智 34
您可以永久修复问题,而不是sudo每次需要运行时强制执行权限fastboot:
lsusb识别您的设备USB VendorIDudev为在插入设备时设置适当的权限作为奖励 - 它也将被修复adb.
例如,在我的情况下(对于'Megafon SP-A20i'):
$ fastboot devices
no permissions fastboot
$ sudo fastboot devices
[sudo] password for kaa:
MedfieldA9055F28 fastboot
$
Run Code Online (Sandbox Code Playgroud)
我们来修理:
首先,我们需要识别设备:
a)寻找USB总线号(黑客:我知道该设备是基于Intel的设备)
$ fastboot -l devices
no permissions fastboot usb:1-1.2
$ lsusb |grep 001 |grep -i intel
Bus 001 Device 044: ID 8087:09ef Intel Corp.
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
$
Run Code Online (Sandbox Code Playgroud)
b)寻找其他英特尔设备:
$ lsusb |grep 8087
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 044: ID 8087:09ef Intel Corp.
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
$
Run Code Online (Sandbox Code Playgroud)
集线器不是智能手机,因此 - 我们需要的USB供应商ID是"8087".
其次,配置udev(您必须用您的"idVendor"替换"idVendor"值):
$ sudo sh -c "echo '# Megafon SP-A20i' >> /etc/udev/rules.d/51-android.rules"
$ sudo sh -c "echo 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"8087\", MODE=\"0666\", GROUP=\"plugdev\"' >> /etc/udev/rules.d/51-android.rules"
$ sudo service udev restart
udev stop/waiting
udev start/running, process 1821
$
Run Code Online (Sandbox Code Playgroud)
第三,重新插入你的设备,以实现udev它的魔力.
最后检查:
$ fastboot -l devices
MedfieldA9055F28 fastboot usb:1-1.2
$ adb devices
List of devices attached
$ fastboot reboot
rebooting...
finished. total time: 0.253s
$ sleep 90
$ adb devices
List of devices attached
MedfieldA9055F28 device
$
Run Code Online (Sandbox Code Playgroud)
瞧!
| 归档时间: |
|
| 查看次数: |
18074 次 |
| 最近记录: |