2

Why does the following list my Android device:

sudo /opt/adt-bundle-linux/sdk/platform-tools/adb start-server
/opt/adt-bundle-linux/sdk/platform-tools/adb devices
sudo /opt/adt-bundle-linux/sdk/platform-tools/adb kill-server

List of devices attached
SH176T501818    device

but the following doesn't list my Android device?:

/opt/adt-bundle-linux/sdk/platform-tools/adb start-server
/opt/adt-bundle-linux/sdk/platform-tools/adb devices
/opt/adt-bundle-linux/sdk/platform-tools/adb kill-server

List of devices attached
????????????    no permissions

I shouldn't need to run adb as root, should I? What am I missing here?

$ ls -l /etc/udev/rules.d/51-android.rules
-rw-r--r-- 1 root root 67 Dec 24 20:36 /etc/udev/rules.d/51-android.rules
$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="dev"

UPDATE: On system boot, CentOS 5.8 mentions something about unknown attribute ATTR{idVendor} briefly before the boot completes.

4

1 回答 1

0

这是.rules我系统上正在使用的文件:

https://raw.github.com/M0Rf30/android-udev-rules/master/51-android.rules

如果 CentOS 也抱怨它的语法,那么也许.rules文件不是问题。我不确定为什么你的不起作用。也许您不能将 ATTR{idProduct} 排除在外?

于 2013-03-04T18:56:15.510 回答