Configuring a real-world test under Linux

Source: Internet
Author: User

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:
  1. Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root Hub

  2. Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root Hub

  3. Bus 003 Device 013:id 12d1:1038 Huawei Technologies Co., Ltd. Ideos (debug mode

  4. Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root Hub

  5. Bus 005 Device 002: ID 0461: 4e04 primax Electronics, LTD

  6. Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root Hub

  7. Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root Hub

  8. Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root Hub

  9. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root Hub

  10. 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 "/>
    1. 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 "/>
    1. 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 "/>
  1. #Acer 0502

  2. subsystem=="USB", sysfs{idvendor}=="0502", mode="0666"

  3. #Dell 413c

  4. subsystem=="USB", sysfs{idvendor}=="413c", mode="0666"

  5. #Foxconn 0489

  6. subsystem=="USB", sysfs{idvendor}=="0489", mode="0666"

  7. #Garmin-asus 091E

  8. subsystem=="USB", sysfs{idvendor}=="091e", mode="0666"

  9. #HTC 0bb4

  10. subsystem=="USB", sysfs{idvendor}=="0bb4", mode="0666"

  11. #Huawei 12d1

  12. subsystem=="USB", sysfs{idvendor}=="12d1", mode="0666"

  13. #Kyocera 0482

  14. subsystem=="USB", sysfs{idvendor}=="0482", mode="0666"

  15. #LG 1004

  16. subsystem=="USB", sysfs{idvendor}=="1004", mode="0666"

  17. #Motorola 22b8

  18. subsystem=="USB", sysfs{idvendor}=="22b8", mode="0666"

  19. #Nvidia 0955

  20. subsystem=="USB", sysfs{idvendor}=="0955", mode="0666"

  21. #Pantech 10a9

  22. subsystem=="USB", sysfs{idvendor}=="10a9", mode="0666"

  23. #Samsung 04e8

  24. subsystem=="USB", sysfs{idvendor}=="04e8", mode="0666 "

  25. #Sharp 04DD

  26. subsystem=="USB", sysfs{idvendor}=="04DD", mode="0666"

  27. #Sony Ericsson 0FCE

  28. subsystem=="USB", sysfs{idvendor}=="0fce", mode="0666"

  29. #ZTE 19D2

  30. 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 "/>
    1. 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 "/>
    1. Sudo/etc/init.d/udev restart



6 Restart ADB service
Entering the directory sdk/platform-tools, enter the shell code
    1. sudo adb kill-server


Also in directory Sdk/platform-tools, enter the shell code

    1. sudo adb devices



7 You're done, turn on the real machine test.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.