Installing ADB on macOS
Categories:
Installing ADB on macOS: A Comprehensive Guide for Android Developers

Learn how to set up Android Debug Bridge (ADB) on your macOS machine, enabling powerful debugging and device management capabilities for Android development.
Android Debug Bridge (ADB) is a versatile command-line tool that lets you communicate with an emulator instance or connected Android device. It's a client-server program that includes three components: a client, which sends commands; a daemon (adbd), which runs on the device; and a server, which manages communication between the client and the daemon. This article will guide you through installing and configuring ADB on your macOS system, ensuring you have the necessary tools for Android development and debugging.
Prerequisites and Setup Options
Before diving into the installation, ensure your macOS system is up to date. There are two primary ways to install ADB: as part of the Android SDK Platform-Tools package, which is the recommended method for developers, or via Homebrew, a popular package manager for macOS. Both methods are straightforward, but the Android SDK provides a complete environment for development.
fastboot) and keeps them updated more reliably with the Android ecosystem.Method 1: Installing ADB with Android SDK Platform-Tools
This method is preferred for Android developers as it provides the official set of SDK tools. You don't need to install the entire Android Studio if you only need the Platform-Tools. You can download just the SDK Platform-Tools package directly from the Android developer website.
1. Step 1
Download the Android SDK Platform-Tools for macOS from the official Android Developers website. This will be a ZIP archive.
2. Step 2
Extract the downloaded ZIP file. You'll find a folder named platform-tools.
3. Step 3
Move the platform-tools folder to a convenient and permanent location, such as /Users/<your-username>/android-sdk/platform-tools or /usr/local/android-sdk/platform-tools. For this guide, we'll assume you move it to ~/platform-tools for simplicity, but a more structured path is recommended for larger projects.
4. Step 4
Open your ~/.zshrc or ~/.bash_profile file (depending on your shell) using a text editor like nano or VS Code.
5. Step 5
Add the following line to your shell configuration file to add the platform-tools directory to your PATH environment variable:
export PATH=$PATH:~/platform-tools
Remember to replace ~/platform-tools with the actual path where you moved the folder.
6. Step 6
Save the file and exit the text editor.
7. Step 7
Apply the changes by running source ~/.zshrc or source ~/.bash_profile in your terminal.
8. Step 8
Verify the installation by opening a new terminal window and typing adb version. You should see the ADB version information.
export PATH=$PATH:~/platform-tools
source ~/.zshrc # or ~/.bash_profile
Commands to add ADB to your system's PATH and refresh your shell.
Method 2: Installing ADB using Homebrew
Homebrew is a simple and effective way to install many command-line tools on macOS. If you already use Homebrew, this might be your preferred method for a quick ADB setup.
1. Step 1
Ensure Homebrew is installed on your system. If not, you can install it by running the following command in your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. Step 2
Once Homebrew is installed, install android-platform-tools by running:
brew install --cask android-platform-tools
3. Step 3
Homebrew typically handles PATH configuration automatically, but you can verify it by running adb version in your terminal. If it doesn't work, you might need to restart your terminal or explicitly add Homebrew's bin directory to your PATH.
brew install --cask android-platform-tools
Command to install ADB and other platform tools via Homebrew.

Flowchart of ADB installation methods on macOS.
Enabling USB Debugging on Your Android Device
After installing ADB on your macOS, you need to enable USB debugging on your Android device to allow communication with your computer. This usually involves enabling Developer Options.
1. Step 1
On your Android device, go to Settings > About phone.
2. Step 2
Tap on Build number seven times rapidly. You'll see a toast message indicating 'You are now a developer!'
3. Step 3
Go back to Settings (or System > Developer options on some devices).
4. Step 4
Find and enable USB debugging.
5. Step 5
Connect your Android device to your macOS machine using a USB cable. You might see a prompt on your device asking to 'Allow USB debugging'. Always grant this permission from your computer.
Verifying ADB Connection
Once ADB is installed and USB debugging is enabled, it's crucial to verify that your macOS machine can communicate with your Android device.
adb devices
Command to list connected Android devices.
If successful, you should see a list of connected devices, typically showing a device ID followed by 'device'. If it shows 'unauthorized', check your device for a prompt to allow USB debugging and ensure you've accepted it. If it shows nothing, try restarting the ADB server with adb kill-server followed by adb start-server.