Installing Adb on MACos

Installing ADB on macOS

Note for zsh users: replace all references to ~/.bash_profile with ~/.zshrc.

Option 1 - Using Homebrew

This is the easiest way and will provide automatic updates.

  1. Install the homebrew package manager

     /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install adb

     brew install android-platform-tools
  3. Start using adb

     adb devices

Option 2 - Manually (just the platform tools)

This is the easiest way to get a manual installation of ADB and Fastboot.

  1. Delete your old installation (optional)

     rm -rf ~/.android-sdk-macosx/
  2. Navigate to https://developer.android.com/studio/releases/platform-tools.html and click on the SDK Platform-Tools for Mac link.

  3. Go to your Downloads folder

     cd ~/Downloads/
  4. Unzip the tools you downloaded

     unzip platform-tools-latest*.zip 
  5. Move them somewhere you won't accidentally delete them

     mkdir ~/.android-sdk-macosx
    mv platform-tools/ ~/.android-sdk-macosx/platform-tools
  6. Add platform-tools to your path

     echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile
  7. Refresh your bash profile (or restart your terminal app)

     source ~/.bash_profile
  8. Start using adb

     adb devices

Option 3 - Manually (with SDK Manager)

  1. Delete your old installation (optional)

     rm -rf ~/.android-sdk-macosx/
  2. Download the Mac SDK Tools from the Android developer site under "Get just the command line tools". Make sure you save them to your Downloads folder.

  3. Go to your Downloads folder

     cd ~/Downloads/
  4. Unzip the tools you downloaded

     unzip tools_r*-macosx.zip 
  5. Move them somewhere you won't accidentally delete them

     mkdir ~/.android-sdk-macosx
    mv tools/ ~/.android-sdk-macosx/tools
  6. Run the SDK Manager

     sh ~/.android-sdk-macosx/tools/android
  7. Uncheck everything but Android SDK Platform-tools (optional)

enter image description here


  1. Click Install Packages, accept licenses, click Install. Close the SDK Manager window.

enter image description here


  1. Add platform-tools to your path

     echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile
  2. Refresh your bash profile (or restart your terminal app)

    source ~/.bash_profile
  3. Start using adb

    adb devices

Set up adb on Mac OS X

Note: this was originally written on Installing ADB on macOS but that question was closed as a duplicate of this one.

Note for zsh users: replace all references to ~/.bash_profile with ~/.zshrc.

Option 1 - Using Homebrew

This is the easiest way and will provide automatic updates.

  1. Install homebrew

     /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install adb

      brew install android-platform-tools

or try a cask install depending on your settings:

     brew install --cask android-platform-tools

  1. Start using adb

     adb devices

Option 2 - Manually (just the platform tools)

This is the easiest way to get a manual installation of ADB and Fastboot.

  1. Delete your old installation (optional)

     rm -rf ~/.android-sdk-macosx/
  2. Navigate to https://developer.android.com/studio/releases/platform-tools.html and click on the SDK Platform-Tools for Mac link.

  3. Go to your Downloads folder

     cd ~/Downloads/
  4. Unzip the tools you downloaded

     unzip platform-tools-latest*.zip 
  5. Move them somewhere you won't accidentally delete them

     mkdir ~/.android-sdk-macosx
    mv platform-tools/ ~/.android-sdk-macosx/platform-tools
  6. Add platform-tools to your path

     echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile
  7. Refresh your bash profile (or restart your terminal app)

     source ~/.bash_profile
  8. Start using adb

     adb devices

Option 3 - If you already have Android Studio installed

  1. Add platform-tools to your path

     echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.bash_profile
    echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.bash_profile
  2. Refresh your bash profile (or restart your terminal app)

     source ~/.bash_profile
  3. Start using adb

     adb devices

Option 4 - MacPorts

  1. Install the Android SDK:

     sudo port install android
  2. Run the SDK manager:

     sh /opt/local/share/java/android-sdk-macosx/tools/android
  3. Uncheck everything but Android SDK Platform-tools (optional)

  4. Install the packages, accepting licenses. Close the SDK Manager.

  5. Add platform-tools to your path; in MacPorts, they're in /opt/local/share/java/android-sdk-macosx/platform-tools. E.g., for bash:

     echo 'export PATH=$PATH:/opt/local/share/java/android-sdk-macosx/platform-tools' >> ~/.bash_profile
  6. Refresh your bash profile (or restart your terminal/shell):

    source ~/.bash_profile
  7. Start using adb:

    adb devices

Option 5 - Manually (with SDK Manager)

  1. Delete your old installation (optional)

     rm -rf ~/.android-sdk-macosx/
  2. Download the Mac SDK Tools from the Android developer site under "Get just the command line tools". Make sure you save them to your Downloads folder.

  3. Go to your Downloads folder

     cd ~/Downloads/
  4. Unzip the tools you downloaded

     unzip tools_r*-macosx.zip 
  5. Move them somewhere you won't accidentally delete them

     mkdir ~/.android-sdk-macosx
    mv tools/ ~/.android-sdk-macosx/tools
  6. Run the SDK Manager

     sh ~/.android-sdk-macosx/tools/android
  7. Uncheck everything but Android SDK Platform-tools (optional)

enter image description here


  1. Click Install Packages, accept licenses, click Install. Close the SDK Manager window.

enter image description here


  1. Add platform-tools to your path

     echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile
  2. Refresh your bash profile (or restart your terminal app)

    source ~/.bash_profile
  3. Start using adb

    adb devices

How to install adb on MacOSX?

The program or script adb is indeed part of the platform-tools.

While (home)brew may be a way to install those tools, I advise you to download it via Android's own SDK manager:

enter image description here

Look for the Android SDK Platform-tools entry and install that one.


If you really want to install it using homebrew, install that first:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

and then use the brew command which comes with the homebrew installation:

brew install android-platform-tools

(ruby comes pre-packaged with the Mac OSX installation)

That should do the same (I haven't tried, so I don't know), but if you use the official Android SDK manager, you can be sure it works.

Not able to access adb in OS X through Terminal, command not found

The problem is: adb is not in your PATH. This is where the shell looks for executables. You can check your current PATH with echo $PATH.

Bash will first try to look for a binary called adb in your Path, and not in the current directory. Therefore, if you are currently in the platform-tools directory, just call

./adb --help

The dot is your current directory, and this tells Bash to use adb from there.

But actually, you should add platform-tools to your PATH, as well as some other tools that the Android SDK comes with. This is how you do it:

  1. Find out where you installed the Android SDK. This might be (where $HOME is your user's home directory) one of the following (or verify via Configure > SDK Manager in the Android Studio startup screen):

    • Linux: $HOME/Android/Sdk
    • macOS: $HOME/Library/Android/sdk
  2. Find out which shell profile to edit, depending on which file is used:

    • Linux: typically $HOME/.bashrc
    • macOS: typically $HOME/.bash_profile
    • With Zsh: $HOME/.zshrc
  3. Open the shell profile from step two, and at the bottom of the file, add the following lines. Make sure to replace the path with the one where you installed platform-tools if it differs:

    export ANDROID_HOME="$HOME/Android/Sdk"
    export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"
  4. Save the profile file, then, re-start the terminal or run source ~/.bashrc (or whatever you just modified).

Note that setting ANDROID_HOME is required for some third party frameworks, so it does not hurt to add it.

How to check whether or not I have adb installed on my macOS?

You can check the path by going to Tools -> SDK Manager and looking at Android SDK Location. Generally, the adb is present under the platform-tools folder present under this Android SDK Location.

At that location you need to execute ./adb.

Else you can also export that platform-tools path to access adb from anywhere, as follow:

echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile 
source ~/.bash_profile

and then restart the terminal to access adb from anywhere.

bash: adb: command not found error on Mac

Go to your Library folder on your mac.

~/Library/Android/sdk/build-tools/VERSION/

ADB is part of your Android studio installation. It should be located in above path.

Set up adb on Mac OS X

Note: this was originally written on Installing ADB on macOS but that question was closed as a duplicate of this one.

Note for zsh users: replace all references to ~/.bash_profile with ~/.zshrc.

Option 1 - Using Homebrew

This is the easiest way and will provide automatic updates.

  1. Install homebrew

     /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. Install adb

      brew install android-platform-tools

or try a cask install depending on your settings:

     brew install --cask android-platform-tools

  1. Start using adb

     adb devices

Option 2 - Manually (just the platform tools)

This is the easiest way to get a manual installation of ADB and Fastboot.

  1. Delete your old installation (optional)

     rm -rf ~/.android-sdk-macosx/
  2. Navigate to https://developer.android.com/studio/releases/platform-tools.html and click on the SDK Platform-Tools for Mac link.

  3. Go to your Downloads folder

     cd ~/Downloads/
  4. Unzip the tools you downloaded

     unzip platform-tools-latest*.zip 
  5. Move them somewhere you won't accidentally delete them

     mkdir ~/.android-sdk-macosx
    mv platform-tools/ ~/.android-sdk-macosx/platform-tools
  6. Add platform-tools to your path

     echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile
  7. Refresh your bash profile (or restart your terminal app)

     source ~/.bash_profile
  8. Start using adb

     adb devices

Option 3 - If you already have Android Studio installed

  1. Add platform-tools to your path

     echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.bash_profile
    echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.bash_profile
  2. Refresh your bash profile (or restart your terminal app)

     source ~/.bash_profile
  3. Start using adb

     adb devices

Option 4 - MacPorts

  1. Install the Android SDK:

     sudo port install android
  2. Run the SDK manager:

     sh /opt/local/share/java/android-sdk-macosx/tools/android
  3. Uncheck everything but Android SDK Platform-tools (optional)

  4. Install the packages, accepting licenses. Close the SDK Manager.

  5. Add platform-tools to your path; in MacPorts, they're in /opt/local/share/java/android-sdk-macosx/platform-tools. E.g., for bash:

     echo 'export PATH=$PATH:/opt/local/share/java/android-sdk-macosx/platform-tools' >> ~/.bash_profile
  6. Refresh your bash profile (or restart your terminal/shell):

    source ~/.bash_profile
  7. Start using adb:

    adb devices

Option 5 - Manually (with SDK Manager)

  1. Delete your old installation (optional)

     rm -rf ~/.android-sdk-macosx/
  2. Download the Mac SDK Tools from the Android developer site under "Get just the command line tools". Make sure you save them to your Downloads folder.

  3. Go to your Downloads folder

     cd ~/Downloads/
  4. Unzip the tools you downloaded

     unzip tools_r*-macosx.zip 
  5. Move them somewhere you won't accidentally delete them

     mkdir ~/.android-sdk-macosx
    mv tools/ ~/.android-sdk-macosx/tools
  6. Run the SDK Manager

     sh ~/.android-sdk-macosx/tools/android
  7. Uncheck everything but Android SDK Platform-tools (optional)

enter image description here


  1. Click Install Packages, accept licenses, click Install. Close the SDK Manager window.

enter image description here


  1. Add platform-tools to your path

     echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile
  2. Refresh your bash profile (or restart your terminal app)

    source ~/.bash_profile
  3. Start using adb

    adb devices


Related Topics



Leave a reply



Submit