How to Fix “adb is not recognized as an internal or external command” on Windows
The error “‘adb’ is not recognized as an internal or external command, operable program or batch file” occurs when you try to run the adb
(Android Debug Bridge) command in Windows Command Prompt or PowerShell, but the system cannot find the adb
executable. This typically happens because the Android SDK Platform Tools (which includes adb
) is either not installed or not properly configured in your system’s PATH environment variable. Below is a comprehensive guide to fixing this issue on Windows 10 or 11, based on the latest available information as of August 15, 2025, and tailored for both beginners and advanced users.
Prerequisites
- Operating System: Windows 10 or 11 (64-bit recommended).
- Permissions: Administrative privileges for modifying environment variables.
- Internet Connection: Required to download SDK Platform Tools.
- Optional: An Android device with USB debugging enabled for testing.
Step-by-Step Fix
Step 1: Verify ADB Installation
The adb
command is part of the Android SDK Platform Tools. If it’s not installed, you’ll need to download it.
- Check if ADB is Installed:
- Open Command Prompt or PowerShell and type:
cmd adb --version
- If you see version information (e.g., “Android Debug Bridge version 1.0.41”), ADB is installed but not configured correctly. Proceed to Step 3.
- If you get the “not recognized” error, proceed to download ADB.
- Download Android SDK Platform Tools:
- Visit the official Android developer site: https://developer.android.com/studio/releases/platform-tools.
- Under “Downloads,” click Download SDK Platform-Tools for Windows to get the latest
platform-tools_rXX.X.X-windows.zip
(e.g., version 35.0.2 as of 2025). - Save the ZIP file to a convenient location (e.g.,
C:\Downloads
).
- Extract the Platform Tools:
- Right-click the downloaded ZIP file and select Extract All.
- Choose a destination folder, e.g.,
C:\platform-tools
. This creates aplatform-tools
folder containingadb.exe
and other tools. - Alternatively, use tools like WinRAR or 7-Zip for extraction.
Step 2: Run ADB from the Platform Tools Folder (Temporary Fix)
If you only need a quick fix without modifying system settings:
- Open File Explorer and navigate to the extracted
platform-tools
folder (e.g.,C:\platform-tools
). - Hold
Shift
, right-click inside the folder, and select Open in Terminal (or Open PowerShell window here). - In the terminal, type:
adb devices
- If ADB is installed correctly, this should list connected devices or start the ADB server.
Note: For PowerShell, you may need to use:
.\adb devices
This method works only when running commands from the platform-tools
folder. For a permanent fix, proceed to Step 3.
Step 3: Add ADB to System PATH (Permanent Fix)
To run adb
from any directory in Command Prompt or PowerShell, add the platform-tools
folder to your system’s PATH environment variable.
- Locate the Platform Tools Path:
- Note the full path to the
platform-tools
folder, e.g.,C:\platform-tools
.
- Open Environment Variables Settings:
- Press
Windows + R
, typesysdm.cpl
, and press Enter to open System Properties. - Go to the Advanced tab and click Environment Variables.
- Edit the PATH Variable:
- In the System variables section (preferred for all users) or User variables (for your account only), find and select Path, then click Edit.
- Click New and paste the full path to the
platform-tools
folder (e.g.,C:\platform-tools
). - Click OK to close all dialogs.
- Verify the PATH Update:
- Open a new Command Prompt or PowerShell window (close any open ones first).
- Type:
cmd echo %PATH%
- Confirm the
platform-tools
path is listed.
- Test ADB:
- In the new terminal, run:
cmd adb --version
- You should see output like:
Android Debug Bridge version 1.0.41 Version 35.0.2-2025 Installed as C:\platform-tools\adb.exe
- Run:
cmd adb devices
- If an Android device is connected with USB debugging enabled, it should list the device (e.g.,
device12345678 device
).
Step 4: Enable USB Debugging (If No Devices Appear)
If adb devices
shows no devices despite fixing the PATH:
- On your Android device:
- Go to Settings > About phone > Software information.
- Tap Build number 7 times to enable Developer Mode.
- Go back to Settings > Developer options and enable USB debugging.
- Connect the device via USB (use a data-capable cable, not charge-only).
- On your PC, run:
adb devices
- On the device, allow USB debugging when prompted.
Step 5: Install USB Drivers (If Needed)
Some Android devices require specific USB drivers for ADB to recognize them:
- Visit your device manufacturer’s website (e.g., Samsung, Xiaomi) to download USB drivers.
- Install the drivers and reconnect the device.
- Alternatively, download Google’s USB driver:
- From the Android SDK Platform Tools page, find the driver link or use Android Studio’s SDK Manager.
- Test again with
adb devices
.
Step 6: Troubleshooting Additional Issues
- Error Persists:
- Verify the
platform-tools
folder containsadb.exe
. If missing, re-download from the official site. - Ensure the PATH entry is correct (no typos or extra slashes).
- Run Command Prompt as Administrator:
cmd adb devices
- Device Offline or Unauthorized:
- Re-enable USB debugging on the device.
- Revoke USB debugging authorizations in Developer options and reconnect.
- Try a different USB port or cable.
- ADB Server Issues:
- Restart the ADB server:
cmd adb kill-server adb start-server
- Antivirus/Firewall Blocking:
- Temporarily disable antivirus or add an exception for
adb.exe
. - Ensure TCP port 5037 (used by ADB) is open:
cmd netstat -a | find "5037"
- PowerShell Syntax:
- In PowerShell, prepend
.\
to commands (e.g.,.\adb devices
).
Step 7: Verify with Android Studio (Optional)
If you use Android Studio:
- Open File > Settings > Appearance & Behavior > System Settings > Android SDK.
- Go to the SDK Tools tab and ensure Android SDK Platform-Tools is checked.
- Note the SDK location (e.g.,
C:\Users\YourUser\AppData\Local\Android\Sdk
). - Add the
platform-tools
subfolder (e.g.,C:\Users\YourUser\AppData\Local\Android\Sdk\platform-tools
) to PATH as in Step 3. - Test
adb devices
from a terminal.
Step 8: Post-Fix Actions
- Restart Your PC: Ensures PATH changes take effect across all sessions.
- Test Connectivity: Connect your Android device and run:
adb devices
Expected output: a list of connected devices.
- Common ADB Commands:
- Install an APK:
adb install app.apk
- Pull a file:
adb pull /sdcard/file.txt
- Access shell:
adb shell
Common Pitfalls and Tips
- Case Sensitivity: Ensure the PATH entry matches the exact folder path.
- Old SDK Versions: Avoid outdated Platform Tools; always download the latest from the official site.
- Multiple ADB Instances: Ensure only one ADB server runs (
adb kill-server
if issues persist). - Windows Environment Limits: If PATH is too long, prioritize
platform-tools
or use a shorter path likeC:\platform-tools
. - Security: Avoid running
adb
from untrusted sources; use only Google’s official binaries.
Conclusion
The “adb is not recognized” error is typically resolved by installing Android SDK Platform Tools and adding the platform-tools
folder to your system’s PATH. By following the steps above—downloading the tools, configuring PATH, enabling USB debugging, and installing drivers—you can ensure adb
works seamlessly. For persistent issues, check Stack Overflow or the Android developer forums. Always use the official source (developer.android.com) to avoid corrupted downloads.