Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Unable to Locate adb? Fix Android Debug Bridge Issues

· 5 min read · Home Tech

In this article
  1. What Is adb and Why Does It Matter?
  2. Why Does the Error Happen?
  3. How to Fix It on Windows
  4. How to Fix It on macOS and Linux
  5. What If adb Still Isn’t Found?
  6. Common Scenarios and Their Specific Fixes
  7. Frequently Asked Questions

If you see “Unable to locate adb” when running Android debugging tools, the Android Debug Bridge executable is not in your system’s PATH or the platform-tools folder is missing. This guide explains the causes and gives step-by-step fixes for Windows, macOS, and Linux, plus how to verify the installation.

What Is adb and Why Does It Matter?

adb (Android Debug Bridge) is a command-line tool that lets your computer communicate with an Android device or emulator. It is used for installing apps, copying files, running shell commands, and debugging. The tool ships inside the platform-tools package, which you download separately from the Android Studio SDK or from the official Android developer site. The error “Unable to locate adb” usually appears in a terminal, in a script, or inside an IDE like VS Code or Android Studio when the system cannot find the adb executable.

Why Does the Error Happen?

The most common reasons are:

  • platform-tools not installed – You may have installed Android Studio but not the SDK command-line tools, or you downloaded only the SDK tools without platform-tools.
  • adb not in PATH – Even if the executable exists, your shell does not search its directory. Windows uses the PATH environment variable; macOS and Linux use the shell’s PATH.
  • Wrong directory – You are running the command from a folder that does not contain adb, and you have not specified the full path.
  • Corrupted or partial download – The platform-tools zip may have been interrupted, leaving a missing or broken adb file.
  • Architecture mismatch – Rarely, you might have downloaded a package for the wrong CPU architecture (e.g., ARM on an x86 machine).

How to Fix It on Windows

  1. Download platform-tools – Go to the official Android developer page and download the Windows zip. Extract it to a simple path like C:\platform-tools.
  2. Add to PATH – Open System Properties (Windows + R, type sysdm.cpl), go to Advanced > Environment Variables. Under System variables, select Path and click Edit. Add the full path to your platform-tools folder (e.g., C:\platform-tools). Click OK.
  3. Restart your terminal – Close and reopen Command Prompt or PowerShell so it picks up the new PATH.
  4. Verify – Type adb version. You should see version information, not an error.

If you prefer not to edit PATH, you can always run adb by typing its full path: C:\platform-tools\adb.exe devices.

How to Fix It on macOS and Linux

  1. Download platform-tools – Get the macOS or Linux zip from the official page. Extract it to a folder like ~/platform-tools.
  2. Add to PATH – Open your shell profile (~/.bashrc, ~/.zshrc, or ~/.profile) and add the line: export PATH=$PATH:~/platform-tools. Save the file.
  3. Reload the profile – Run source ~/.bashrc (or the equivalent for your shell) or open a new terminal.
  4. Verify – Type adb version.

On macOS you can also install platform-tools via Homebrew: brew install android-platform-tools. On Linux, some distributions offer a package called android-tools-adb; install it with your package manager, but note that it may be older than the official build.

What If adb Still Isn’t Found?

If you’ve added the correct path and still get “Unable to locate adb”, try these checks:

  • Confirm the file exists – Navigate to your platform-tools folder and look for adb (no extension on macOS/Linux, adb.exe on Windows). If it’s missing, re-download the zip and extract again.
  • Check the PATH entry – On Windows, ensure you added the folder, not the file. On macOS/Linux, ensure there is no typo in the export line.
  • Run with full path – Temporarily run /full/path/to/adb devices to see if the executable works at all. If it does, the PATH is the issue.
  • Use Android Studio’s SDK Manager – Open Android Studio, go to SDK Manager > SDK Tools, and check “Android SDK Platform-Tools”. Install it, then note the SDK path (usually %LOCALAPPDATA%\Android\Sdk on Windows, ~/Library/Android/sdk on macOS). The adb executable is in platform-tools under that SDK folder.
  • Check for antivirus or firewall interference – Some security software may quarantine adb. Temporarily disable your antivirus and re-extract, then add an exception.

Common Scenarios and Their Specific Fixes

Android Studio shows “Unable to locate adb” – This often happens when the SDK path is misconfigured. Go to File > Settings > Languages & Frameworks > Android SDK and confirm the SDK location is correct. Then click SDK Tools and ensure “Android SDK Platform-Tools” is installed.

VS Code or a script cannot find adb – The editor or script runs in a shell that may not inherit your PATH. Restart the editor completely. If the issue persists, set the full path to adb in the script or in the editor’s settings (e.g., "adb.path": "C:\\platform-tools\\adb.exe").

adb was working before, now it’s not – Check if you recently updated platform-tools. A partial update can break the executable. Re-download and replace the folder. Also check if your PATH variable was accidentally changed by another installer.

Frequently Asked Questions

What exactly is “platform-tools”?

Platform-tools is a package from Google that contains adb, fastboot, and other utilities. It is separate from the Android SDK itself. You can download it directly from the Android developer website without installing Android Studio.

Do I need Android Studio to use adb?

No. You only need the platform-tools zip. Android Studio includes it, but you can use adb independently by downloading the command-line tools.

How do I know if adb is installed correctly?

Open a terminal and run adb version. If it prints version information, the installation is correct. If it says “command not found”, adb is not in your PATH.

Why does adb work in one terminal but not another?

Each terminal session reads the PATH at startup. If you changed PATH in one window, other windows that were already open still have the old PATH. Close and reopen all terminals after editing PATH.

Can I use adb without adding it to PATH?

Yes. You can navigate to the platform-tools folder in your terminal and run ./adb (macOS/Linux) or adb.exe (Windows). Adding to PATH is just for convenience.

What if I get “adb: command not found” on Linux even after installing the package?

Some distributions install adb to /usr/bin/adb, which should be in PATH. If not, try sudo apt install android-tools-adb (Debian/Ubuntu) or sudo pacman -S android-tools (Arch). Verify with which adb.