今天心血來潮的要拿我的HERO來連線丟軟體,結果在 Eclipse 上是無法連接,而在Command Line 下 adb devices 結果他彈出

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

的錯誤訊息

後來在網路上找到一個地方有寫...不過是在 Android的官方網站的小小地方......(原文連結)

If you're developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different vendor ID. The example rules files below show how to add an entry for a single vendor ID (the HTC vendor ID). In order to support more devices, you will need additional lines of the same format that provide a different value for the SYSFS{idVendor} property. For other IDs, see the table of USB Vendor IDs, below.
  1. Log in as root and create this file: /etc/udev/rules.d/51-android.rules.

    For Gusty/Hardy, edit the file to read:
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

    For Dapper, edit the file to read:
    SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"

  2. Now execute:
    chmod a+r /etc/udev/rules.d/51-android.rules

You can verify that your device is connected by executing adb devices from your SDK tools/ directory. If connected, you'll see the device name listed as a "device."

If using Eclipse, select run or debug as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s). Select the device to install and run the application there.

If using the Android Debug Bridge (adb), you can issue commands with the -d flag to target your connected device.

USB Vendor IDs

This table provides a reference to the vendor IDs needed in order to add device support on Linux. The USB Vendor ID is the value given to the SYSFS{idVendor} property in the rules file.

ManufacturerUSB Vendor ID
Acer 0502
HTC 0bb4
Huawei 12d1
LG 1004
Motorola 22b8
Samsung 04e8
Sony Ericsson 0fce

改完後..記得重開機...如果還是不能連接

請下

# adb kill-server && sudo adb devices

創作者介紹

Amin's Note

Aminzai 發表在 痞客邦 PIXNET 留言(0) 人氣()