Mac OS debug Android app with Real machine

Source: Internet
Author: User

First, to install the FILETRANSFER.DMG program, you can connect the Android to Mac OS

1, set the environment variables for ADB

Find the directory where Android Tools is located, and under Android tools there is the ADB tool, the directory below "/users/fenghewei/android/android_tools/android-sdk-macosx/ Platform-tools ", add this path to the ~/.bash_profile file

#adbANDROID_ADB =/users/fenghewei/android/android_tools/android-sdk-macosx/platform-toolsexport PATH= $PATH: $ Android_adb

Execution: source~/.bash_profile让文件立即生效

2 to see if the settings take effect

  ~ ADB versionandroid Debug Bridge version 1.0.32Revision 09a0d98bebce-android

3, linked to the phone, the phone's connection mode is set to "built-in disc" model.

4,system_profiler Spusbdatatype Find the vendor ID of the device

M81:          Product id:0x0c03          Vendor id:0x2a45          Version:ff.ff          Serial number:810ebma3u25h          speed:up to 480 mb/sec          Manufacturer:meizu location          id:0x14100000/15 current          Available (MA): £          Current Required (MA):          Extra Operating current (MA): 0          capacity:14.3 MB (14,297,808 bytes)          removable media:yes          Detachable Drive:yes          BSD name:disk4          Partition Map type:unknown          Volumes:            iamcdrom:              capacity:3.1 MB (3,110,912 bytes) C18/>available:zero KB              writable:no              File system:iso Joliet              BSD name:disk4s0              Mount point:/volumes /iamcdrom              content:cd_rom_mode_2_form_1

5, add the vendor ID to the ~/.android/adb_usb.ini file, if the Adb_usb.ini file does not exist, create a new file

6, enable "USB debugging" in Developer tools and restart ADB service

?  ~ adb kill-server?  ~ ADB deviceslist of Devices Attached810ebma3u25hdevice

7, now you can use the device debugging in the Android Studio tool.

Mac OS debug Android app with Real machine

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.