Mac ADB prompts command not found

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

The reason for this is that Android environment variables are not configured. Therefore, you need to configure environment variables for Android SDK in MAC

Start the terminal of MAC

Enter the home directory of the current user

Enter echo $home on the command line

Create. Bash_ Profile file

Command line input touch. Bash_ profile

Open.bash_ Profile file

Command line input Open – e.bash_ Profile after entering this command line, the. Bash will pop up automatically_ Edit window of profile file

In. Bash_ In the profile file, enter export path =/users/your user name/file path/platform tools /: $path

if you need to add multiple paths to the path, you need to use “:” (colon in English) to separate them
because Android and ADB commands are in different folders, the format is:
Path = ${path}: path 1: path 2
in addition, if you specify multiple paths, you don’t need to write $path at the end
for example:

export ANDROID_ HOME=/Users/*/Library/Android/sdk/

export PATH=$ANDROID_ HOME/platform-tools:$ANDROID_ HOME/tools:$ANDROID_ HOME/tools/bin

Save the file

Direct close.bash_ Profile file, you can automatically save your input

Update the environment variable you just configured

Enter source. Bash on the command line_ profile

Verify that the configuration is successful

Enter ADB, if – bash: ADB: command not found does not appear; The command parameter explanation of ADB appears. The configuration of environment variables is successful

Then execute the ADB command


adb kill-server

adb start-server

Similar Posts: