开发者

adb doesn't get phone's device name/number

Okay, I have a strange problem I haven't seen listed anywhere. I'm developing an android app and I would like to run it on my Huawei Ascend. I have set up a file in /etc/udev/90-android.rules with the line:

SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"

where '12d1' is the correct vendor ID for this phone (I verified this with 'lsusb' command).

When I plug in the phone (it does have debugging on) and restart the adb server I get a connection but the 开发者_开发技巧name field does not get set. The output to 'adb devices' is:

 List of devices attached \n
 ????????????    device

Plugging and unplugging the cable doesn't resolve this. Neither does restarting the adb server. Nor does a total reboot of both my computer or the phone.

This is fine as I can get logs and a shell. The problem is that in the eclipse plugin, the device's name is list as "????????????" and so when it tries connect, it quits with an error message of 'device not found' even though the device is listed and 'online'. Is there something else I need to do? Do I need to set the name of the device somehow?

              cocofan

P.S.: The app has 'debuggable' set to true in the manifest file.


I think you still might have permission problem with your rule. I use a OWNER="" on the dev rule without mode. i.e.

SUBSYSTEM=="usb",ATTRS{idVendor}=="22b8", OWNER="dona"

Apologize for error. This udev rule works for Motorola Droid.


If you working with ubuntu,do like this

log in as root

1. su root

2. service udev restart

3. ./adb kill-server

4. ./adb device

now,It's should be ok.


In Linux the ADB must run under root:

If you have the correct rules for your device in 51-android.rules (here are the codes) just kill and start the server again:

./adb kill-server ./adb start-server

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜