1 connect the test machine and the development machine via USB
2 viewing USB connections with commands
Shell command: LSUSB
The current USB connection will be displayed:
Shell code:
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 003 Device 013:id 12d1:1038 Huawei Technologies Co., Ltd. Ideos (debug mode
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root Hub
Bus 005 Device 002: ID 0461: 4e04 primax Electronics, LTD
Bus 005 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 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root Hub
3 Find the ID of the port to which your phone is connected
Note that the red code shows that the current connection is the Huawei Real machine, then the Read ID is: 12D1
4 Creating an Android real-computer USB rule
Shell code 650) this.width=650; "class=" star "src=" Http://baoweiwei.iteye.com/images/icon_star.png "alt=" Favorites code "/>
sudo gedit/etc/udev/rules.d/android.rules
In the case of Huawei above, for example, ID 12d1, enter the following line in Android.rules
Shell code 650) this.width=650; "class=" star "src=" Http://baoweiwei.iteye.com/images/icon_star.png "alt=" Favorites code "/>
subsystem=="USB", sysfs{idvendor}=="12d1", mode="0666"
If you change the test machine, you can also put all of the following models to enter all, do not have to repeat the work every time. As follows:
Shell code 650) this.width=650; "class=" star "src=" Http://baoweiwei.iteye.com/images/icon_star.png "alt=" Favorites code "/>
#Acer 0502
subsystem=="USB", sysfs{idvendor}=="0502", mode="0666"
#Dell 413c
subsystem=="USB", sysfs{idvendor}=="413c", mode="0666"
#Foxconn 0489
subsystem=="USB", sysfs{idvendor}=="0489", mode="0666"
#Garmin-asus 091E
subsystem=="USB", sysfs{idvendor}=="091e", mode="0666"
#HTC 0bb4
subsystem=="USB", sysfs{idvendor}=="0bb4", mode="0666"
#Huawei 12d1
subsystem=="USB", sysfs{idvendor}=="12d1", mode="0666"
#Kyocera 0482
subsystem=="USB", sysfs{idvendor}=="0482", mode="0666"
#LG 1004
subsystem=="USB", sysfs{idvendor}=="1004", mode="0666"
#Motorola 22b8
subsystem=="USB", sysfs{idvendor}=="22b8", mode="0666"
#Nvidia 0955
subsystem=="USB", sysfs{idvendor}=="0955", mode="0666"
#Pantech 10a9
subsystem=="USB", sysfs{idvendor}=="10a9", mode="0666"
#Samsung 04e8
subsystem=="USB", sysfs{idvendor}=="04e8", mode="0666 "
#Sharp 04DD
subsystem=="USB", sysfs{idvendor}=="04DD", mode="0666"
#Sony Ericsson 0FCE
subsystem=="USB", sysfs{idvendor}=="0fce", mode="0666"
#ZTE 19D2
subsystem=="USB", sysfs{idvendor}=="19d2", mode="0666"
5 changing file permissions and restarting the USB service
Shell code 650) this.width=650; "class=" star "src=" Http://baoweiwei.iteye.com/images/icon_star.png "alt=" Favorites code "/>
sudo chmod a+rx/etc/udev/rules.d/android.rules
Restart
Shell code 650) this.width=650; "class=" star "src=" Http://baoweiwei.iteye.com/images/icon_star.png "alt=" Favorites code "/>
Sudo/etc/init.d/udev restart
6 Restart ADB service
Entering the directory sdk/platform-tools, enter the shell code
sudo adb kill-server
Also in directory Sdk/platform-tools, enter the shell code
sudo adb devices
7 You're done, turn on the real machine test.