
Android Debug Bridge, commonly known as ADB, is a command-line tool that allows your computer to communicate with an Android device. It is widely used for app development, device troubleshooting, installing APK files, running commands, and accessing advanced features that are not available through the standard Android interface.
This guide walks you through the complete setup process for Windows, macOS, and Linux, with clear steps and explanations suitable even for beginners.
What Is ADB and Why You Might Need It?
ADB is part of the Android SDK Platform Tools. It creates a bridge between your computer and Android device, enabling tasks such as installing and uninstalling apps, capturing logs, unlocking bootloaders, pushing or pulling files, and issuing system-level commands. You may need ADB if you are developing apps, modifying your device, or troubleshooting Android issues.
Before setting up ADB on any operating system, you must enable Developer Options and USB Debugging on your Android device.
Enable USB Debugging on Your Android Device
- Open Settings on your Android phone.
- Go to About phone.
- Tap Build number seven times until you see a message confirming Developer Options are enabled.
- Go back to Settings > System > Developer options.
- Enable USB debugging.
- Connect your phone to your computer using a USB cable and allow debugging when prompted.
Setting Up ADB on Windows
Step 1: Download Platform Tools
Download the official SDK Platform Tools for Windows from the Android developer website. Extract the ZIP file to a convenient location such as C:\adb or C:\platform-tools.
Step 2: Install USB Drivers (If Required)
Some devices, especially older ones, require OEM USB drivers. If your device is not detected later, install the official driver from your device manufacturer.
Step 3: Open Command Prompt in Platform Tools Folder
Navigate to the extracted folder, hold Shift, right-click inside the folder, and choose Open Command Window here or Open in Terminal.
Step 4: Verify ADB Connection
Run the following command: adb devices
If prompted on your phone, allow USB debugging. Your device ID should appear in the list.
Optional: Add ADB to System PATH
Adding ADB to the PATH lets you run it from any directory. This can be done through System Properties > Environment Variables by adding the platform-tools folder path.
Setting Up ADB on macOS
Method 1: Using Homebrew (Recommended)
- Open Terminal.
- Install Homebrew if it is not already installed.
- Run: brew install android-platform-tools
Method 2: Manual Installation
- Download SDK Platform Tools for macOS.
- Extract the ZIP file to a folder such as ~/platform-tools.
- Open Terminal and navigate to the folder: cd ~/platform-tools
Verify Installation
Connect your device and run: adb devices
Approve the debugging prompt on your phone. The device should now be visible.
Setting Up ADB on Linux
Method 1: Install via Package Manager
On Debian or Ubuntu-based systems, run this code:
- sudo apt update
- sudo apt install android-tools-adb android-tools-fastboot
On Fedora, run this code:
- sudo dnf install android-tools
On Arch Linux, run this code:
- sudo pacman -S android-tools
Method 2: Manual Installation
- Download SDK Platform Tools for Linux.
- Extract the files to a directory such as ~/platform-tools.
- Navigate to the folder: cd ~/platform-tools
Set USB Permissions (Important on Linux)
Create or edit udev rules to avoid permission issues. Run this Code: sudo nano /etc/udev/rules.d/51-android.rules
Then Add: SUBSYSTEM==”usb”, ATTR{idVendor}==”xxxx”, MODE=”0666″, GROUP=”plugdev”
Note: Replace xxxx with your device manufacturer’s USB vendor ID. Reload rules afterward.
Verify Connection
Finally run this code to verify: adb devices
Your device should appear as authorized.
Common Troubleshooting Tips
If your device does not appear, try a different USB cable or port. Ensure USB debugging is enabled and authorized. Restarting the ADB server using adb kill-server followed by adb start-server can also resolve detection issues. On Windows, driver installation problems are the most common cause.
Setting up Android Debug Bridge on Windows, macOS, or Linux is a straightforward process once the correct tools are installed and USB debugging is enabled. After setup, ADB becomes a powerful utility for managing and controlling Android devices directly from your computer.
