Configure adb command on Mac

1. Start the terminal
2. Enter the HOME directory of the current user, and the command is as follows:
cd $ HOME

3. Update the .bash_profile file (when the file exists), if the file does not exist, you can create it with the following command:
touch .bash_profile

Open the .bash_profile file and edit its content with the following commands:
open -e .bash_profile

4. At this time, the text editor will open a text, and the editing content is as follows:
export PATH=${PATH}:/Users/apple/Library/Android/sdk/platform-tools
export PATH=${PATH}:/Users/apple/Library/Android/sdk/tools

It can be modified according to the installation directory of the SDK
Save file and close the .bash_profile
5. Update the environment variables just configured, the command is as follows:
source .bash_profile

6. To verify whether the configuration is successful, the command is as follows:
adb devices

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326252974&siteId=291194637