I am just starting to learn on Android development. I use Ubuntu 11.10 and Eclipse. I have installed the needed plugins from android development, and I have also write yet some examples that compiles and run fine on the emulator.
我刚刚开始学习Android开发。我使用Ubuntu 11.10和Eclipse。我已经从android开发安装了所需的插件,我还编写了一些在模拟器上编译和运行的例子。
But somethings as multitouch cannot be tested on the emulator, so I want to test them on my real Samsung Galaxy S2 device. The problem is that I have tried everything I have found on the web on this, but still have not been able to use it.
但有些多点触控无法在模拟器上进行测试,所以我想在真正的三星Galaxy S2设备上进行测试。问题是我已经尝试了我在网上找到的所有内容,但仍然无法使用它。
When I run ./adb devices, it does show none, although the device IS attached.
当我运行./adb设备时,虽然设备已连接,但它确实没有显示。
$ lsusb
...
Bus 001 Device 012: ID 04e8:6860 Samsung Electronics Co., Ltd
$ ./adb devices
List of devices attached
I have modified /etc/udev/rules.d/51-android.rules many times in different ways following instructions on the web, but none of them make a difference. Currently I have this line in it:
我已经按照网络上的说明以不同的方式多次修改/etc/udev/rules.d/51-android.rules,但没有一个有所作为。目前我有这条线:
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}="6860", MODE="0666", GROUP="plugdev"
Of course I tried restarting udev and adb services, even rebooting the whole system, but it did not work neither.
当然我尝试重新启动udev和adb服务,甚至重新启动整个系统,但它也没有用。
Any hint?
Thanks a lot in advance,
非常感谢提前,
5 个解决方案
#1
7
Enable USB Debugging on the device from the Settings -> Applications -> Development
在设置 - >应用程序 - >开发中启用设备上的USB调试
#2
3
Try Samsung kies, it delivers suitable ADB driver: http://www.samsung.com/uk/support/usefulsoftware/KIES/JSP
试试Samsung kies,它提供合适的ADB驱动程序:http://www.samsung.com/uk/support/usefulsoftware/KIES/JSP
With the right adb driver (from kies or elsewhere) it should work flawlessly
使用正确的adb驱动程序(来自kies或其他地方)它应该完美无缺
EDIT: on linux: http://developer.android.com/tools/device.html
编辑:在Linux上:http://developer.android.com/tools/device.html
If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux: Log in as root and create this file: /etc/udev/rules.d/51-android.rules. Use this format to add each vendor to the file: SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
如果您正在使用Ubuntu Linux进行开发,则需要添加一个udev规则文件,其中包含您要用于开发的每种类型设备的USB配置。在规则文件中,每个设备制造商都由唯一的供应商ID标识,由ATTR {idVendor}属性指定。有关供应商ID的列表,请参阅下面的USB供应商ID。要在Ubuntu Linux上设置设备检测:以root身份登录并创建此文件:/etc/udev/rules.d/51-android.rules。使用此格式将每个供应商添加到文件中:SUBSYSTEM ==“usb”,ATTR {idVendor} ==“0bb4”,MODE =“0666”,GROUP =“plugdev”
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node. Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules. Now execute: chmod a+r /etc/udev/rules.d/51-android.rules
在此示例中,供应商ID用于HTC。 MODE分配指定读/写权限,GROUP定义哪个Unix组拥有设备节点。注意:根据您的环境,规则语法可能略有不同。根据需要查阅系统的udev文档。有关规则语法的概述,请参阅编写udev规则的本指南。现在执行:chmod a + r /etc/udev/rules.d/51-android.rules
#3
0
Try another USB cable
尝试其他USB线
If you have a possibility, check if it works with another device
如果您有可能,请检查它是否适用于其他设备
Localize your problem, make sure that it's something wrong with software (if it is)
本地化您的问题,确保它与软件有关(如果是)
#4
0
Execute the following command from a terminal
从终端执行以下命令
$ echo "0x04e8" >> ~/.android/adb_usb.ini
and restart adb using
并使用重新启动adb
$ adb kill-server
$ adb start-server
check if the device is listed using adb devices
检查设备是否使用adb设备列出
#5
0
I experienced the same issue on Mac OS X with Eclipse. Simply putting the phone in 'debug' mode (Settings -> Applications -> Development -> USB debugging) did not solve the issue. I have to do below in the command line to solve the issue.
我在使用Eclipse的Mac OS X上遇到了同样的问题。只需将手机置于“调试”模式(设置 - >应用程序 - >开发 - > USB调试)就无法解决问题。我必须在命令行中执行以下操作才能解决问题。
sudo adb kill-server
sudo adb start-server
#1
7
Enable USB Debugging on the device from the Settings -> Applications -> Development
在设置 - >应用程序 - >开发中启用设备上的USB调试
#2
3
Try Samsung kies, it delivers suitable ADB driver: http://www.samsung.com/uk/support/usefulsoftware/KIES/JSP
试试Samsung kies,它提供合适的ADB驱动程序:http://www.samsung.com/uk/support/usefulsoftware/KIES/JSP
With the right adb driver (from kies or elsewhere) it should work flawlessly
使用正确的adb驱动程序(来自kies或其他地方)它应该完美无缺
EDIT: on linux: http://developer.android.com/tools/device.html
编辑:在Linux上:http://developer.android.com/tools/device.html
If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux: Log in as root and create this file: /etc/udev/rules.d/51-android.rules. Use this format to add each vendor to the file: SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
如果您正在使用Ubuntu Linux进行开发,则需要添加一个udev规则文件,其中包含您要用于开发的每种类型设备的USB配置。在规则文件中,每个设备制造商都由唯一的供应商ID标识,由ATTR {idVendor}属性指定。有关供应商ID的列表,请参阅下面的USB供应商ID。要在Ubuntu Linux上设置设备检测:以root身份登录并创建此文件:/etc/udev/rules.d/51-android.rules。使用此格式将每个供应商添加到文件中:SUBSYSTEM ==“usb”,ATTR {idVendor} ==“0bb4”,MODE =“0666”,GROUP =“plugdev”
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node. Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules. Now execute: chmod a+r /etc/udev/rules.d/51-android.rules
在此示例中,供应商ID用于HTC。 MODE分配指定读/写权限,GROUP定义哪个Unix组拥有设备节点。注意:根据您的环境,规则语法可能略有不同。根据需要查阅系统的udev文档。有关规则语法的概述,请参阅编写udev规则的本指南。现在执行:chmod a + r /etc/udev/rules.d/51-android.rules
#3
0
Try another USB cable
尝试其他USB线
If you have a possibility, check if it works with another device
如果您有可能,请检查它是否适用于其他设备
Localize your problem, make sure that it's something wrong with software (if it is)
本地化您的问题,确保它与软件有关(如果是)
#4
0
Execute the following command from a terminal
从终端执行以下命令
$ echo "0x04e8" >> ~/.android/adb_usb.ini
and restart adb using
并使用重新启动adb
$ adb kill-server
$ adb start-server
check if the device is listed using adb devices
检查设备是否使用adb设备列出
#5
0
I experienced the same issue on Mac OS X with Eclipse. Simply putting the phone in 'debug' mode (Settings -> Applications -> Development -> USB debugging) did not solve the issue. I have to do below in the command line to solve the issue.
我在使用Eclipse的Mac OS X上遇到了同样的问题。只需将手机置于“调试”模式(设置 - >应用程序 - >开发 - > USB调试)就无法解决问题。我必须在命令行中执行以下操作才能解决问题。
sudo adb kill-server
sudo adb start-server