ADB and Fastboot are amazing command-line tools that let your computer connect with your Android device. ADB can communicate with your phone to debug and make changes. If you are getting “ADB is not recognized” or “ADB command not found”, or “Fastboot is not recognized” error while trying to use ADB commands, here are some easy fixes to make ADB detect your device.
Below is a list of just a few things that you can do using ADB commands.
- Change Android device name
- Uninstall system apps without root
- Turn Safe Mode On or Off
- Unlock Android bootloader
Possible Reasons behind ADB Error
There may be various reasons why you are encountering the “adb is not recognized…” error in the Command Prompt. Depending on the scenario, the error message you get may differ. Below is a screenshot os the error that deliberately I recreated on my Windows 10 PC.
‘adb’ is not recognized as an internal or external command, operable program or batch file.
‘adb’ is not recognized as an internal or external command react-native.
The command a.exe was not found, but does exist in the current location.
or
The command adb was not found, but does exist in the current location.
‘adb’ is not recognized as an internal or external command android studio.
If you are using Windows PowerShell, you’ll get the following error.
ADB : The term ‘adb’ is not recognized as the name of a cmdlet, function, script file, or operable program.
‘adb’ command not found
‘fastboot’ command not found
‘fastboot’ is not recognized as an internal or external command, operable program or batch file.
So, if you’re getting the “adb is not recognized as an internal or external command” error in the cmd window, it could be due to one of the following reasons.
- Many people think that ADB and Fastboot are present on their Windows PC by default. The reality is, you must download and set up the ADB and Fastboot drivers additionally.
- You may also get the “ADB command not found” error if you have an outdated version of ADB and Fastboot drivers. Installing the latest Android SDK Platform-tools on your PC might fix the problem.
- If you are trying to run ADB command from a location where ‘adb.exe’ and ‘fastboot.exe’ are not present.
- You haven’t set up system-wide ADB and Fastboot on your Windows 10 PC. That’s to say, you haven’t set the correct path under User variables or System variables.
- In case you are trying to flash an OTA update.zip, a factory image, or a custom recovery image (twrp.img, for instance), make sure you have saved the files to flash in the ‘platform-tools‘ folder along with ‘adb.exe’, ‘fastboot.exe’, etc.
In case you are getting ‘adb or fastboot command not found error’ on Mac, read my tutorial to solve the issue.
Fixing ‘ADB is not Recognized…’ Error
Now that we know what could be the reason behind the ‘adb’ is not recognized as an internal or external command error, let’s try to solve the problem.
Must Read: Use ADB Commands on Android Devices without Root
Fix 1: Download Latest SDK Platform Tools
If you have installed Koush’s Universal ADB Drivers, Minimal ADB and Fastboot, 15 seconds ADB Installer, or Minimal ADB Setup, it’s most likely that you have an outdated version of ADB and Fastboot drivers on your Windows PC. Moreover, most of such tools are unsafe as they may contain a Trojan virus.
You must remove and uninstall any such 3rd-party drivers if you have them installed. The best and safest source to download the latest ADB and Fastboot driver is Google itself. I would recommend you download the latest version of Android SDK Platform Tools zip for Windows directly from Google servers. In case you have a very old version of Platform-tools, you should update them.
Fix 2: Execute ADB Command from the ‘platform-tools’ Folder
Since the official ADB and Fastboot drivers are not installer files, you are supposed to direct the Command Prompt to the exact path or location of the ‘platform-tools‘ directory. Now, there are 3 ways to do that.
- Open the ‘platform-tools‘ or the folder that contains the ADB and Fastboot files. Click in the folder address bar, type “cmd” and press the Enter key.
- Open the ‘platform-tools‘ folder. Click on the file explorer’s File tab and select Open Windows PowerShell.
- While in the ‘platform-tools‘ folder, hold the Shift key and right-click at an empty or white space (highlighted with yellow) in the folder window. Select the Open PowerShell window here option from the context menu. If you want, you can add a permanent option to launch the command prompt to the Windows context menu.
Fix 3: Use ‘platform-tools’ Folder Path in CMD
Suppose you have saved the ABD and Fastboot drivers in the C Drive and you are trying to run an ADB command by launching the Command Prompt on your Desktop screen you’ll get the ‘adb’ is not recognized as an internal or external command error.
There’s a simple workaround to make the ADB command not found error go away by using cd or chdir (change directory) command. This command tells the Command Prompt to trigger ADB or Fastboot from a given path. Just launch the command window and type cd followed by the platform-tools folder path. as shown below.
cd c:technasticplatform-tools
If you don’t know the path of the folder, here are 7 ways to find the path of a file or folder on Windows. As you can see in the screenshot below, when I executed the adb devices command I got the following result.
‘adb’ is not recognized as an internal or external command, operable program or batch file.
However, when I tried cd c:technasticplatform-tools followed by adb devices, there ADB is not found error disappeared.
Fix 4: Add a User or System Variable Path for ADB and Fastboot
Although the CD method gives the expected result, I find it a bit time taking as you need to type the folder path every time you use ADB or ADB Shell commands. The easiest way to access ADB and Fastboot universally from any screen on your Windows PC is to set up system-wide ADB and Fastboot.
This method involves adding System or User Variables for the path of the ‘platform-tools‘ folder and below we’ll see how to do that.
- Open Advanced system settings on your Windows PC. You can go to those settings in 3 ways.
- Type ‘Advanced system settings‘ in the Windows search bar and launch it.
- Right-click on This PC found on the right pane in the File Explorer window and click on Properties> Advanced system settings.
- Open Control panel and navigate to System and Security> System> Advanced system settings.
- Once you get to the System Properties pop-up window, click on Environment Variables.
- A new pop-up window named Environment Variables will appear. Click on any item under User variables or System variables and click on New.
- When the New User/System Variable pop-up appears, type “Path” under Variable name, then click on Browse Directory. Navigate to the ‘platform-tools‘ folder and click on the OK button.
- Finally, click on OK to add the path variable.
- When the new path variable is added, don’t forget to click on OK on the Environment Variables window to save it.
Done! You have successfully set up system-wide ADB and Fastboot on your Windows PC. Now, you are all set to execute ADB or Fastboot commands from any screen without navigating to the ‘platform-tools’ folder.
Fix ‘adb.exe: no devices/emulators found’ Error
If you are getting adb.exe: no devices/emulators found error it means that the ADB daemon is unable to detect your device. It might be due to the following reasons.
- Your Android phone or tablet is not connected to the computer.
- You haven’t turned on USB debugging from the Developer options on your device.
Take care of the above things, reconnect your device and try again. The error should have gone way.
Bonus Tip
In order that your Windows computer can communicate with your Android device, you must keep USB debugging enabled on your device. Not just that, don’t forget to extend the screen timeout duration. As soon as you run the first ADB command, you’ll be prompted to Allow USB debugging on your device. You must select ‘Allow‘ to authorize ADB.
Launch the Command Prompt or Windows PowerShell again to check whether the ADB is not recognized… error is fixed or not. Try any of the following commands:
adb adb devices adb version
Fix Fastboot is not Recognized Error
The fixes I suggested above to solve ADB or ADB command not recognized error will also fix the following issue.
‘fastboot’ is not recognized as an internal or external command, operable program or batch file.
However, if you’re still getting the Fastboot is not recognized error while flashing TWRP.img file, a factory image, or root your Android device, here’s how to fix it. The solution should also work if Fastboot is not detecting a connected device.
- First of all, make sure you have downloaded the SDK Platform tools from above and extracted the downloaded zip file.
- Open the ‘platform-tools‘ folder.
- Now, copy or move the files you want to flash to your Android device to the same folder where ‘adb.exe‘ and ‘fastboot.exe‘ files are present.
- Reboot your Android device into the Fastboot Mode using the following command. adb reboot fastboot
- While your device is in Fastboot Mode, use a compatible USB cable to connect it to the PC.
- Then launch a command window from the ‘platform-tools‘ folder. I have already described 3 ways to do that above.
- It’s time now to execute the following command. fastboot devices
- If you get the list of attached devices in the command window, it means everything is fine. However, if encounter any of the following issues, try plugging out the USB cable and insert it again. If it still doesn’t help, try to reboot your phone and PC and try again.
- Fastboot not detecting device
- Fastboot devices not showing in cmd
- Fastboot waiting for device
The Fastboot is not recognized error should be gone.
If you are still getting any ADB or Fastboot related issues, please let us know!
Read Next: How to Disable Talkback on Android