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