Ios developer builds a usb connection for android development environment under mac, and iosandroid

Source: Internet
Author: User

Ios developer builds a usb connection for android development environment under mac, and iosandroid

First, you must have a wall flip software,

1. Download Android studio at http://developer.android.com /.


2. After downloading the tool, install it according to the officially recommended configuration. You need to flip the wall to download various tools.


3. after installation, open a project that already exists and can be compiled, and run it. However, I did not identify my android mobile phone, and the device list was empty, error: google usb driver not compatible with mac OS


4. Set adb Environment Variables

1 cd ~ : Enter the user directory
2 vi. bash_profile: Create the. bash_profile file.
3 export PATH =$ {PATH}:/xxx/android-sdk-macosx/tools:/xxx/android-sdk-macosx/platform-tools: the path for importing tools and platform-tools./xxx/android-sdk-macosx/tools-points to the android SDK tools directory.
4. Execute the following command: source./. bash_profile: Make the file take effect.

5 restart terminal: Run adb for testing

5. You need to find the vid

1. Open the terminal, enter system_profiler SPUSBDataType, view all USB devices in the Mac system, and find the corresponding vendor Vender ID.
Find the corresponding usb hub connected to the Android mobile device and find the corresponding vendor's Vender ID. For example, if my test machine K-Touch T619-day phone cannot connect to adb, the corresponding information snippets are as follows: [Java]View plaincopy
  1. -----------------
  2. Spreadtrum phone:
  3. Product ID: 0x5d04
  4. Vendor ID: 0x1782
  5. ...
  6. Serial Number: T619
  7. ...
  8. -----------------

2. terminal Access/Users/user /. android, there should be an adb_usb.ini file. If not, create it, add the above Vender ID "0x1782" to the file separately, and then exit. [Java]View plaincopy
  1. # ANDROID 3RD party usb vendor id list -- do not edit.
  2. # USE 'android update adb' to generate.
  3. #1 usb vendor id per line.
  4. Zero x 1782

3. Restart the adb server process. The terminal executes the following commands in sequence: [Java]View plaincopy
  1. Adb kill-server
  2. Adb start-server
Then, you can use the adb devices command to view the device named after the Serial Number of the corresponding device. For example: [Java]View plaincopy
  1. -MacBook-Pro:. android user $ adb devices
  2. List of devices attached
5. The device List displays the mobile phone number. Then run it.


Related Article

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.