Eclipse does not recognize the phone solution under Ubuntu:
123456789101112131415161718192021 |
1
) 在终端运行 lsusb
会发现结果有会有如下类似记录:
Bus
002
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
Bus
003
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
Bus
004
Device
005
: ID
1219
:
0102
#这行就是 手机
Bus
004
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
Bus
005
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
这时键入
sudo gedit /etc/udev/rules.d/
53
-android.rules
在打开的文件中增加以下文本:
SUBSYSTEM==
"usb"
, SYSFS{idVendor}==
"1219"
, MODE=
"0666"
SUBSYSTEM==
"usb"
, ATTR{idVendor}==
"1219"
, ATTR{idProduct}==
"0102"
, SYMLINK+=
"android_adb"
2
) 运行以下命令:
sudo chmod a+rx /etc/udev/rules.d/
53
-android.rules
sudo /etc/init.d/udev restart
3
) 在 android sdk 的 tools 目录下运行 (这一步很重要,必须要sudo,否则没效果)
sudo ./adb kill-server
sudo ./adb devices
然后,就可以直接用 adb shell来进行操作了。
(以上摘自http:
//yelinsen.iteye.com/blog/986617)
|
Where my computer runs LSUSB after the display as follows:
123456789101112 |
Bus
008
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
Bus
007
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
Bus
006
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
Bus
005
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
Bus
004
Device
002
: ID 0a5c:
2145
Broadcom Corp. Bluetooth with Enhanced Data Rate II
Bus
004
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
Bus
003
Device
003
: ID 093a:
2510
Pixart Imaging, Inc. Optical Mouse
Bus
003
Device
001
: ID 1d6b:
0001
Linux Foundation
1.1
root hub
Bus
002
Device
002
: ID 04e8:685e Samsung Electronics Co., Ltd
Bus
002
Device
001
: ID 1d6b:
0002
Linux Foundation
2.0
root hub
Bus
001
Device
003
: ID 17ef:
1004
Lenovo
Bus
001
Device
001
: ID 1d6b:
0002
Linux Foundation
2.0
root hub
|
That's why I can tell.
Bus 002 Device 002 : ID 04e8:685e Samsung Electronics Co., Ltd |
This line is mobile, so I should do the following:
1
)sudo gedit /etc/udev/rules.d/
53
-android.rules
在打开的文件中增加以下文本:
SUBSYSTEM==
"usb"
, SYSFS{idVendor}==
"04e8"
, MODE=
"0666"
SUBSYSTEM==
"usb"
, ATTR{idVendor}==
"04e8"
, ATTR{idProduct}==
"685e"
, SYMLINK+=
"android_adb"
2
) 运行以下命令:
sudo chmod a+rx /etc/udev/rules.d/
53
-android.rules
sudo /etc/init.d/udev restart
3
) 在 android sdk 的 platform-tools 目录下运行 (这一步很重要,必须要sudo,否则没效果)
sudo ./adb kill-server
sudo ./adb devices
然后,就可以直接用 adb shell来进行操作了。
|
Then you can identify the two phones listed here, and the others should be the same.
Ubuntu under Android development, Eclipse does not recognize the phone