'adb' Is Not Recognized as a Command on Windows: Fix
Fix "'adb' is not recognized as an internal or external command" and "adb: command not found". Install platform-tools and add adb to PATH on Windows, macOS and Linux.
You type adb devices and Windows answers:
'adb' is not recognized as an internal or external command,
operable program or batch file.In PowerShell the message is adb : The term 'adb' is not recognized..., and on macOS or Linux it is adb: command not found. All of them mean the same thing: the computer cannot find the adb program. Either it is not installed, or the folder it lives in is not on your PATH.
Step 1: get platform-tools
ADB comes in Google's free Android SDK Platform-Tools package.
- Download Platform-Tools for your system from the official Android developers site.
- Unzip it somewhere permanent, for example
C:\platform-toolson Windows or~/platform-toolson macOS and Linux.
If you installed Android Studio, you already have it, usually in %LOCALAPPDATA%\Android\Sdk\platform-tools on Windows or ~/Library/Android/sdk/platform-tools on macOS.
Quick test without changing anything
Open a terminal inside the platform-tools folder and run adb from there:
- Windows Command Prompt:
cd C:\platform-tools, thenadb devices - Windows PowerShell:
cd C:\platform-tools, then.\adb devices(PowerShell needs the.\) - macOS / Linux:
cd ~/platform-tools, then./adb devices
If this works, adb is fine and only the PATH is missing.
Step 2: add platform-tools to PATH on Windows
- Press Start, type environment variables and open Edit the system environment variables.
- Click Environment Variables....
- Under User variables, select Path and click Edit.
- Click New and enter
C:\platform-tools(your real folder). - Click OK on every window.
- Close and reopen your terminal. Old windows keep the old PATH.
Test with adb version.
Step 2: add platform-tools to PATH on macOS and Linux
Add this line to ~/.zshrc (macOS) or ~/.bashrc (most Linux distributions):
export PATH="$HOME/platform-tools:$PATH"Then open a new terminal, or run source ~/.zshrc, and check with adb version. On macOS you can also install it with Homebrew (brew install --cask android-platform-tools), and on Debian or Ubuntu with sudo apt install adb.
Several adb copies
Phone suites, emulators and old SDKs often ship their own adb. If adb version shows an old version after you installed a new one, another copy comes first in PATH. On Windows, where adb lists every copy in order. On macOS and Linux use which -a adb. Remove the old folder from PATH or move the new one to the top. Mixed versions are also a common reason for devices showing as offline.
Skip the setup with ADBKit
If you only need the everyday ADB tasks, you do not need adb on your computer at all. ADBKit runs ADB inside Chrome or Edge over USB: live screen, keyboard typing, logcat, shell, file transfer and APK installs, with nothing to install and nothing to add to PATH. On a locked-down work laptop where you cannot install software, this is often the easiest way.
Next step after adb works: enable USB debugging and keep the ADB commands cheat sheet handy.