ubuntu :~$ lsusb Bus 002 Device 003: ID 062a:3633 Creative Labs Bus 002 Device 002: ID 8087:0024 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 04d9:a06b Holtek Semiconductor, Inc. Bus 001 Device 002: ID 8087:0024 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub ubuntu :~$ lsusb Bus 002 Device 003: ID 062a:3633 Creative Labs Bus 002 Device 002: ID 8087:0024 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 005: ID 18d1:9025 Bus 001 Device 003: ID 04d9:a06b Holtek Semiconductor, Inc. Bus 001 Device 002: ID 8087:0024 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
找到個人手機的USB設備的信息是:html
Bus 001 Device 005: ID 18d1:9025
二、添加udev規則信息
udev是一個動態硬件管理服務linux
ubuntu :/etc/udev/rules.d$ sudo /etc/udev/rules.d/70-android-usb.rules
在70-android-usb.rules文件中添加以下內容:android
SUBSYSTEM=="usb",ATTRS{idVendor}=="18d1",ATTRS{idProduct}=="9025",MODE="0666"
18d1爲設備ID,MODE表示讀取模式,0666表示任何人均可以訪問。另外在另一篇文章中(連接在文章結尾),在文件中加入以下內容(沒有親自測試):shell
SUBSYSTEM=="usb", SYSFS("My Phone (USB Debug)")=="18d1",MODE="0666"
設置70-android-usb.rules文件權限,並重啓udev服務。ubuntu
ubuntu :/etc/udev/rules.d$ sudo chmod a+rx /etc/udev/rules.d/70-android-usb.rules ubuntu :/etc/udev/rules.d$ sudo /etc/init.d/udev restart
三、設置ADBwindows
拔下USB與PC鏈接線,而後再次插上,進入Android-SDK根目錄\Platform-tools\,運行命令sudo ./adb kill-server和sudo ./adb devices便可。測試
ubuntu :~/android-sdk-linux/platform-tools$ sudo ./adb kill-server ubuntu :~/android-sdk-linux/platform-tools$ sudo ./adb devices * daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached
至此,您會發現您的手機設備Eclipse已經能夠識別了。.net
相關連接:
http://www.cnblogs.com/successyiquan/archive/2012/02/08/2342669.html
http://blog.csdn.net/wuzuokun/article/details/7168521rest