Search code examples
androidadb

How to install "adb" on MacOSX?


I searched Google and Stackoverflow and found some discussion on this. It's saying that there'd be an adb after installing Android SDKs.

But I don't have any adb command after installing. All I got is:

enter image description here

And some articles saying that use brew install android-platform-tools can work. I also tried but failed because it's telling me brew is not owned by root. I don't know where to find the brew command.


Solution

  • 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.