1:使用 lsusb 命令查看USB 设备
y@y:~$ lsusb
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001
Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID
1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 006: ID 5986:0268
Acer, Inc
Bus 002 Device 005: ID 0bda:8761 Realtek Semiconductor Corp.
Bus 002 Device 004: ID 138a:0017 Validity Sensors, Inc.
Bus 002 Device
024: ID 109b:90c8
Bus 002 Device 002: ID 0461:4d80 Primax Electronics, Ltd
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
:我的手机idVendor为 109b,idProduct为 90c8
2:添加配置文件
$sudo vim /etc/udev/rules.d/70-android.rules
70也不知道是啥意思,50,51都可以
加入一行:SUBSYSTEM=="usb", ATTRS{idVendor}=="109b", ATTRS{idProduct}=="90c8",MODE="0666"
然后添加执行权限,并重启 设备
$sudo chmod a+rx /etc/udev/rules.d/70-android.rules
$sudo service udev restart
3:使用adb命令查看设备,提示no permissions
y@y:~$ adb kill-server
y@y:~$ adb devices
* daemon not running.
starting it now on port 5037 *
* daemon started successfully *
List of
devices attached
???????????? no permissions
4:解决 ???????????? no permissions
首先使用-s参数进入root
y@y:~$ sudo -s
root@y:~# adb kill-server
root@y:~# adb
start-server
* daemon not running. starting it now on port 5037 *
* daemon
started successfully *
root@y:~# exit
再次执行adb devices则成功显示
y@y:~$ adb devices
List of devices attached
U966 device
此时在ADT中运行android 程序可以正常识别手机了: