How to Install and Set Up ADB on Windows, Mac, and Linux

Step 1: Understanding ADB and Its Prerequisites
Android Debug Bridge (ADB) is a versatile command-line tool that lets you communicate with an Android device from a computer. It is part of the Android SDK Platform-Tools package. ADB facilitates actions like installing apps, debugging, running shell commands, transferring files, and accessing hidden system features. It works over USB or Wi-Fi, making it indispensable for developers, power users, and anyone who wants to unlock their device’s full potential.
Before installing ADB, ensure you have the following:
- A computer running Windows, macOS, or Linux (64-bit systems recommended; Windows 7+, macOS 10.10+, or any modern Linux distribution).
- An Android device (version 4.0 or newer is best; older versions work but may lack features).
- A USB cable that supports data transfer (not just charging). For wireless setups, a stable Wi-Fi network is required.
- USB debugging enabled on your Android device (go to Settings > About Phone > Tap “Build Number” 7 times to unlock Developer Options, then Settings > Developer Options > Enable USB Debugging*).
- Sufficient disk space (~500 MB for the platform-tools folder) and administrative/sudo access on your computer for installation commands.
Step 2: Installing ADB on Windows
Method A: Manual Installation (Recommended)
- Download the Platform-Tools ZIP: Visit the official Android Developer website (developer.android.com/studio/releases/platform-tools). Download the Windows ZIP file (e.g.,
platform-tools-latest-windows.zip). - Extract the files: Right-click the downloaded ZIP and select “Extract All.” Choose a simple path like
C:adborC:platform-tools. Avoid paths with spaces or special characters. - Add ADB to your System PATH (optional but crucial for convenience):
- Press
Win + R, typesysdm.cpl, and hit Enter. - Go to the Advanced tab > Environment Variables.
- Under System variables, find
Path, select it, and click Edit. - Click New and paste the full path to your extracted folder (e.g.,
C:adb). - Click OK on all windows.
- Press
- Verify installation: Open a new Command Prompt (
cmd) or PowerShell. Runadb version. You should see version info and the build date.
Method B: Using Minimal ADB and Fastboot (Alternative)
If you want a lighter installer that sets up PATH automatically, download “Minimal ADB and Fastboot” from reputable sources like XDA Developers or the official GitHub fork. Run the installer, follow the prompts, and complete installation. This method is quicker but may lag behind official updates.
Driver Installation (Critical for Windows)
Windows often lacks native drivers for Android devices. To fix this:
- Plug in your Android device with USB debugging enabled.
- Open Device Manager (right-click Start > Device Manager).
- Look for your device under Other Devices or Portable Devices (often with a yellow exclamation mark).
- Right-click it > Update driver > Browse my computer for drivers.
- Navigate to your ADB folder (e.g.,
C:platform-tools). Check Include subfolders and click Next. Alternatively, download the official Google USB Driver (from Android Studio or the OEM driver package) and point to that folder. - After successful driver installation, run
adb devicesin Command Prompt. Your device should appear as “unauthorized” initially; accept the RSA fingerprint prompt on your phone.
Step 3: Installing ADB on macOS
Method A: Using Homebrew (Simplest)
Homebrew is a package manager that handles dependencies and updates automatically.
- Install Homebrew if you haven’t: Open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Install ADB:
brew install android-platform-tools - This installs the platform-tools and symlinks ADB to
/usr/local/bin. Verify withadb version.
Method B: Manual Installation (More Control)
- Download the macOS Platform-Tools ZIP from the official Android Developer site.
- Open Terminal and navigate to your Downloads folder:
cd ~/Downloads - Extract the ZIP:
unzip platform-tools-latest-darwin.zip - Move the folder to a permanent location (e.g., your home directory):
mv platform-tools ~/ - Add ADB to your PATH (edit your shell profile; for zsh, use
~/.zshrc; for bash,~/.bash_profile):echo 'export PATH="$PATH:~/platform-tools"' >> ~/.zshrc source ~/.zshrc - Verify:
adb version.
macOS-Specific Tips
- No driver needed: Unlike Windows, macOS handles Android ADB connections natively once USB debugging is on. Modern Android devices (5.0+) work out of the box.
- Gatekeeper: If you see a security warning on first run, go to System Preferences > Security & Privacy > General and click “Allow” for ADB.
- USB-C considerations: Macs with USB-C ports may require a USB-C to USB-A adapter or cable; ensure it supports data transfer.
Step 4: Installing ADB on Linux
Method A: Using Package Managers (Distro-Specific)
- Debian/Ubuntu/Mint:
sudo apt update sudo apt install android-tools-adbOn newer releases, this also installs
fastboot. Verify withadb version. - Fedora/CentOS/RHEL:
sudo dnf install android-tools - Arch Linux/Manjaro:
sudo pacman -S android-tools - openSUSE:
sudo zypper install android-tools
Method B: Manual Installation (Always Up-to-Date)
- Download the Linux Platform-Tools ZIP from the official site.
- Open Terminal and extract:
unzip platform-tools-latest-linux.zip - Move to a system-wide location (optional but recommended):
sudo mv platform-tools /opt/ - Add to PATH (edit
~/.bashrcor~/.zshrc):echo 'export PATH="$PATH:/opt/platform-tools"' >> ~/.bashrc source ~/.bashrc - Verify:
adb version.
Linux-Specific Tips
- Udev rules: For non-root ADB access without
sudo, install udev rules. Most distros auto-configure, but if you get “no permissions” onadb devices, run:sudo apt install android-sdk-platform-tools-commonOr create
/etc/udev/rules.d/51-android.ruleswith your device’s vendor ID (e.g.,SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"). Then reload:sudo udevadm control --reload-rules && sudo udevadm trigger. - No driver need: Linux uses the generic USB storage driver; enable MTP on your phone if file transfer fails.
Step 5: Verifying the Installation and Connecting Your Device
After installation, regardless of your OS, follow these steps to confirm everything works:
- Open a terminal/command prompt and run
adb devices. You should see:List of devices attached - Connect your Android device via USB (ensure USB debugging is enabled). Your phone may show a prompt: “Allow USB debugging?” Check “Always allow from this computer” and tap OK.
- Run
adb devicesagain. You should see your device listed as “device” (not “unauthorized” or “offline”).
If your device appears as “unauthorized,” unplug, revoke USB debugging authorizations in Developer Options, and reconnect. If it says “offline,” restart both your computer and phone, then try a different USB cable or port.
Wireless ADB Setup (No USB Needed)
Once ADB is verified over USB, you can connect wirelessly:
- Connect your device and computer to the same Wi-Fi network.
- Run
adb tcpip 5555(restarts ADB in TCP/IP mode). - Disconnect the USB cable.
- Find your device’s IP address (Settings > About Phone > Status or Wi-Fi > Network).
- Run
adb connect :5555(e.g.,adb connect 192.168.1.10:5555). - Verify with
adb devices. Your device will appear as:5555 device.
To switch back to USB, run adb usb.
Step 6: Basic ADB Commands for Testing
Run these after the connection is established to ensure full functionality:
adb shell– Opens a remote shell on your device. Typeexitto leave.adb install example.apk– Installs an APK file from your computer.adb uninstall com.example.app– Removes an app by its package name.adb logcat– Displays real-time system logs (pressCtrl+Cto stop).adb pull /sdcard/file.txt .– Copies a file from your device to the current directory.adb push local.txt /sdcard/– Copies a file to your device.
If any command errors out (e.g., “command not found”), re-check your PATH or rerun the OS-specific installation steps.
Troubleshooting Common Issues Across All OSes
adb: command not found: The PATH variable is not set. Re-add the platform-tools directory as described for your OS.error: device offline: Reconnect the USB cable, restart the ADB server (adb kill-server; adb start-server), or toggle USB debugging off/on.error: insufficient permissions(Linux): Check udev rules or runsudo adb start-server(not ideal long-term; fix udev).error: device unauthorized: Accept the RSA fingerprint on your phone. If it doesn’t prompt, revoke all USB debugging authorizations in Developer Options and reconnect.- USB not recognized (Windows): Reinstall drivers using the Google USB Driver from Android Studio’s SDK Manager.
- Slow or unstable connection: Use a high-quality USB 2.0/3.0 cable shorter than 6 feet. Avoid USB hubs; connect directly to a motherboard port.
Advanced: Keeping ADB Updated
ADB evolves with Android versions. Update manually:
- Windows/macOS/Linux (manual): Re-download the latest Platform-Tools ZIP from the Android Developer site, extract it, and overwrite your existing folder.
- macOS (Homebrew): Run
brew upgrade android-platform-tools. - Linux (package manager): Run
sudo apt upgrade android-tools-adb(or your distro’s equivalent).
Set a calendar reminder every 2-3 months to check for updates, as outdated ADB versions may fail with new Android releases.
Final Configuration for Developers and Power Users
For a permanent, multi-user setup:
- Create a dedicated directory (e.g.,
/usr/local/android-sdk/platform-tools) and set appropriate permissions (chmod 755). - Add the path to global shell profiles (
/etc/profile.d/or/etc/environment). - Install multiple ADB instances if needed (e.g.,
adb1,adb2) by symlinking different versions. This is useful for beta testing new Android builds.
Now you have a fully functional ADB installation on Windows, Mac, or Linux. The tool is ready for debugging, app testing, system modifications, or automating device tasks. Each command you execute opens a direct, secure bridge to your Android device’s core operations.





