linux下使用adb devices

linux下使用adb devices一些相关的搜集

ubuntu 9.04使用adb无法连接g1的解决办法

在ubuntu 9.04下通过usb连接g1,使用adb时,会返回无法找到设备,解决办法如下:
1) 在终端运行 lsusb
会发现结果有会有如下类似记录:
Bus 002 Device 015: ID 0bb4:0c02 High Tech Computer Corp.

2)
sudo gedit /etc/udev/rules.d/50-android.rules

在打开的文件中增加以下文本:
SUBSYSTEM==”usb”, SYSFS{ “High Tech Computer Corp. }==”0bb4″, MODE=”0666″

3) sudo gedit /etc/udev/rules.d/90-android.rules
在打开的文件中增加以下文本:
SUBSYSTEM==”usb”, ATTR{ “High Tech Computer Corp. }==”0bb4″, MODE=”0666″

4) 运行以下命令:
sudo chmod a+rx /etc/udev/rules.d/50-android.rules
sudo chmod a+rx /etc/udev/rules.d/90-android.rules
sudo /etc/init.d/udev restart

5) 在android sdk的tools 目录下运行
sudo ./adb kill-server
sudo ./adb devices

OK~搞定,接下来使用./adb shell等指令都正常了!

Here's what works for me on Ubuntu Karmic with my Htc Dream (Vendor ID
0bb4 as seen with 'lsusb') :
- device in usb debug mode (settings/applications/developpment/)

- in file /etc/udev/rules.d/51-android.rules :
SUBSYSTEM=3D=3D=E2=80=9Dusb=E2=80=9D,ATTRS(idVendor)=3D=3D=E2=80=9D0bb4=E2=
=80=9C,SYMLINK
+=3D"android_adb",MODE=3D=E2=80=9D0666=E2=80=B3

- chmod a+x /etc/udev/rules.d/51-android.rules (don't think it's
necessary, though)

- killall adb

- /etc/init.d/udev restart ; /etc/init.d/udev-finish restart

- adb in $PATH

Now 'adb devices' lists my device.

http://www.johandekoning.nl/index.php/2009/02/07/android-dev-phone-ubuntu-and-vmware-server/

Udev configuration

You can perform a check, to see that the Android Dev Phone is shared with Ubuntu, by opening a Terminal (inside Ubuntu. Open a VMWare Remote Console to make use of the Ubuntu) and type the following command

lsusb

A list of USB devices will be shown. For example:

Bus 002 Device 001: ID ld6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0bb4:0c02 High Tech Computer Corp.
Bus 001 Device 001: ID ld6b:0002 Linux Foundation 2.0 root hub

The Android Dev Phone is the device with the name High Tech Computer Corp (HTC). Make a note of the first part of the device ID (in this case 0bb4) because this is needed for the udev rule.

Create a new file (as root)

sudo gedit /etc/udev/rules.d/50-android.rules

with the following content

SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

Make sure that the text after {idVendor} is the same as the device id found when using the lsusb command. Save and exit the editor

To make execution of the rule possible, perform a chmod

sudo chmod a+rx /etc/udev/rules.d/50-android.rules

To make the rule active, restart udev

sudo /etc/init.d/udev restart

发布了13 篇原创文章 · 获赞 6 · 访问量 12万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章