How To Setting up a Device for Development In Archlinux ?

2 views
Skip to first unread message

youly Liu

unread,
Aug 27, 2011, 12:09:05 AM8/27/11
to lzuitslab

sh-4.2$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 04f2:b071 Chicony Electronics Co., Ltd 2.0M UVC Webcam / CNF7129
Bus 003 Device 002: ID 046d:c058 Logitech, Inc. M115 Mouse
Bus 001 Device 010: ID 12d1:1031 Huawei Technologies Co., Ltd.
 
从最后一行可以看到识别出了usb设备,但
 
sh-4.2$ sudo adb kill-server
Password:
sh-4.2$ sudo adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
sh-4.2$ adb devices
List of devices attached
 
adb没有识别出,是什么问题呢?
 
sh-4.2$ cat /proc/partitions
major minor  #blocks  name
   8        0  312571224 sda
   8        1   42218788 sda1
   8        2   92160000 sda2
   8        3   62703616 sda3
   8        4          1 sda4
   8        5   31447205 sda5
   8        6    1951744 sda6
   8        7   19529728 sda7
   8        8   62554112 sda8
也没有检测u盘。
 
android developers这样写: (http://developer.android.com/guide/developing/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"
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
 
照着写了,
 
sh-4.2$ more 51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666" ,GROUP="youly"
 
可还是不行啊,求助。
 

 

kang kang

unread,
Aug 28, 2011, 9:58:37 PM8/28/11
to lzui...@googlegroups.com
找个叫 usb-modeswitch 的工具

2011/8/27 youly Liu <youl...@gmail.com>
Reply all
Reply to author
Forward
0 new messages