MacBook under configure android ADB command using environment

Source: Internet
Author: User
Tags macbook

To use Android ADB commands under your Mac, there are two common ways to configure it:

    • Configuring the ADB command environment under the MacBook (method one)

    1. download and install the IDE (Android Studio)

      User-friendly installation, directly click Next next to complete the installation

    2. Configure the Environment

      After the installation is complete, add the directory of the Android ADB tool to the environment variable

Enter the sudo vim ~/.bash_profile in the terminal to open the. bash_profile file. Press I to enter the input mode and add the following to the end of the file content:

 for Android ADB toolsexport PATH=${path}:/users/xxx/library/android/sdk/platform-toolsexport PATH=${path}:/users/xxx/library/android/sdk/tools

The XXX in this in accordance with their actual user name to modify

Then click ESC, enter: Wq Enter (save and exit text).

Add after completion input: source ~/.bash_profile Apply the change.

    3. Testing

     Input: adb version

1.0.  the Revision 3db08f2c6889-/users/howie/library/android/sdk/platform-tools/adb

Input: adb devices

List of devices attached* Daemon not running. Starting it now at TCP:5037 * * Daemon started successfully *

This shows that the android ADB command is ready to work.

    • Configuring the ADB command environment under the MacBook (method two)

Download SDK file and unzip it in the directory you want to store, and then add the full directory of the two folders after decompression Sdk/platform-tools and Sdk/tools to the . bash_profile file and apply it in effect. The specific addition method is consistent with the above.

MacBook under configure android ADB command using environment

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.