How to Fix ADB Device Unauthorized Error on Android (2024)

ADB is the bridge that connects Android devices to a Windows, Linux, macOS, or ChromeOS computer for debugging purposes. For security reasons, Android doesn’t allow external devices to access a phone or tablet without the owner’s authorization. You must authorize the ADB client to access the host device. If you haven’t set up ABD drivers properly, or enabled and authorized USB debugging, you may encounter the ‘ADB device unauthorized’ error. In this tutorial, we’ll explore the various reasons causing the issue and fix ADB issues on Android and Windows.

adb.exe: device unauthorized. This adb server’s $ADB_VENDOR_KEYS is not set Try ‘adb kill-server’ if that seems wrong.

If you get the ADB not found or recognized error on Windows, macOS, or Linux, it could be due to one of the following reasons:

  • Faulty USB cable or port
  • USB debugging is not enabled on your device
  • RSA key fingerprint not allowed
  • USB drivers need to be updated
  • Latest ADB drivers are not installed
  • The phone’s screen is locked during command execution
  • The ‘platform-tools‘ folder’s path is not added to the command window.
  • Auto Blocker is enabled (on Samsung devices)

Fixing ADB Device Unauthorized Error

Finally, let’s check out all possible fixes to solve the “adb: device unauthorized” error while sending commands to an Android device.

1. Enable Developer Options and USB Debugging

If the USB debugging is not enabled on your device, your computer won’t be able to communicate with it via the ADB Daemon. Ensure you have enabled debugging via the Developer options to avoid the device unauthorized error while using commands.

  1. Open the Settings app on your Android phone or tablet.
  2. Look for About, About phone, or About device in the settings menu. Usually, it’s located at the end of the settings menu. If you can’t find it, tap the search box in the Settings app, type “about” and you’ll find it.
  3. Now, tap Software information.
  4. On the next screen, tap Build number 7 times in a row.
  5. You’ll see a toast saying, “Developer mode has been turned on“.
  6. Now go back to the Settings menu and you’ll find a new item named Developer options listed there. On Android devices from Chinese OEMs, you might find it under Settings > Additional settings.
  7. Open the Developer options and go to the USB debugging option. Tap the toggle button next to USB debugging and tapOK when prompted to turn it on.

2. Extend Screen off Timeout Duration

If your phone’s screen is locked while you execute commands on your computer, ADB won’t detect it and you’ll get the device unauthorized error in the Terminal window. Navigate to Settings > Display > Screen timeout on your Android device and extend it to 5 or 10 minutes.

Related posts

How to Find the IMEI Number of a Lost or Stolen Phone

3. Launch the Command Window with the Path of ADB

  1. Open the ‘platform-tools‘ or the folder containing the ADB drivers.
  2. Now, launch a Command Prompt or PowerShell window with the folder path. That means you have to open the Command Prompt inside the folder window. There are 2 quick ways to do that.
    1. Place the mouse pointer inside the platform-tools folder window, right-click in any space, and select the “Open PowerShell window here” (Windows 10), or “Open in Terminal” (Windows 11) option from the Windows Context Menu.
    2. Type “cmd” or “powershell” in the folder window address bar and press Enter.
  3. If you’ve done it correctly you’ll see the path of the platform-tools folder in the Command Prompt window as shown below.

4. Revoke USB Debugging Authorizations

Revoking all previous device authorizations and starting afresh often fixes the unauthorized device error. To remove any ADB device or computer, follow the steps below.

  1. Go to Settings> Developer options on your phone.
  2. Right below the option to USB debugging option, tap Revoke USB debugging authorizations.
  3. A pop-up will appear. Just tap OK to revoke ADB authorization access for all computers you authorized on your Android device in the past.

5. Download and Install the Latest ADB Drivers

If the ADB drivers installed on your computer are outdated or very old, you might encounter the ADB device is an unauthorized error. To eliminate the possibility, install the latest Android SDK platform-tools on your Windows, macOS, or Linux system and follow the relevant tutorial.

  • Installing ADB on Windows
  • Steps to Set up ADB on macOS
  • Guide to Install ADB on Linux

6. Allow RSA Fingerprint Key for ADB Debugging

It’s one of the most common causes of the ADB device unauthorized error while sending commands to Android devices via a computer. Ensure your phone’s screen is on while you press the enter key after typing the command.

When you see a pop-up on your device asking, “Allow USB debugging?“. Select the Always allow from this computer option and tap Allow.

Now try using the aDB commands again. The device unauthorized error should have disappeared.

7. Disable ADB Authorization Timeout in Android

Please note that even when you select the “Always allow from this computer” option while authorizing ADB, your device will remember your computer only for 7 days. If you try to use ADB commands from the same computer after that period, you’ll have to authorize it again. To give your computer permanent authorization on your Android devices for ADB-related tasks, do the following.

  1. Navigate to Settings> Developer optionson your Android phone or tablet.
  2. In the Debugging section of the Developer options menu, you will find an option called Disable ADB Authorization Timeout. Just tap the toggle button next to this option and your device will save your PC as an authorized ADB device and remember its RSA key fingerprint in the future.


That’s all for now! I hope this detailed tutorial helped you fix the device unauthorized error on Android devices.

Was this Article helpful?

YesNo

How to Fix ADB Device Unauthorized Error on Android (2024)

FAQs

How to Fix ADB Device Unauthorized Error on Android? ›

Step-by-Step Solution

Navigate to the Android SDK platform-tools directory using the command prompt. Execute the command adb kill-server to stop any running ADB processes. Follow with adb start-server to initiate the ADB daemon. If no error messages appear, the ADB server has started successfully.

How do I fix unauthorized adb devices? ›

Fix unauthorized device error in adb
  1. Disconnect USB between PC and device.
  2. Stop adb server by entering adb kill-server in command window.
  3. On device use Revoke USB debugging authorizations in Developer Options.
  4. On PC delete adbkey file in user directory, eg. . ...
  5. Reconnect the device to the PC.

How to authorize a device on adb? ›

Authorize Android Device
  1. Disconnect your Android device from the computer.
  2. Revoke USB Debugging on the device: Open the Settings app on your device. ...
  3. Reconnect the device: The device will prompt you to agree to connect the computer. ...
  4. The computer is now authorized for debugging!

How do I fix an adb connection error? ›

Step-by-Step Solution

Navigate to the Android SDK platform-tools directory using the command prompt. Execute the command adb kill-server to stop any running ADB processes. Follow with adb start-server to initiate the ADB daemon. If no error messages appear, the ADB server has started successfully.

How do I authorize an adb in recovery? ›

Enable ADB (1/2): enable USB debugging

type and enter adb devices to check if the device is connected in recovery mode. Now type adb shell mount data and adb shell mount system to mount the respective directories. Now open that file in a texteditor and edit it to mtp,adb and save.

How do I reset my device from adb? ›

Connect the Android device to your computer via USB. Open a command prompt or terminal window. Enter the ADB shell environment using the command adb shell . Issue the factory reset command: recovery --wipe_data .

How do I turn off adb on my Android phone? ›

To stop using ADB Android, type in ADB kill-server on your development machine, then switch off USB Debugging on your device by navigating to Settings>Developer Options>USB Debugging.

How do I enable adb devices? ›

To connect to your device, follow these steps:
  1. Enable developer options on your device.
  2. Open Android Studio and select Pair Devices Using Wi-Fi from the run configurations menu. ...
  3. On your device, tap Wireless debugging and pair your device: ...
  4. After your device is paired, you can attempt to deploy your app to your device.

How do I get adb to recognize my device? ›

Enable USB Debugging on Your Android Device. It might be that the ADB issue is not with your computer but is with your Android device. In most cases, device not detected in ADB is because the USB debugging option is turned off on the device. Turning this option on can fix the issue for you and this is pretty easy to do ...

How do I get my ADB to work? ›

Using ADB Commands in the Windows Command Prompt
  1. Open the Command Prompt on your Windows computer. ...
  2. Connect your Android device to your computer using a supported USB cable for your device.
  3. In the Command Prompt window, enter adb followed by the desired command. ...
  4. Type the desired ADB command and press Enter to execute it.

Why are adb devices not working? ›

The ADB error can be triggered by various reasons, for example, the ADB driver is not updated, USB debugging is disabled, the connection mode is incorrect, etc.

How to solve detected adb error in android studio? ›

Ensure the ADB executable is included in your system's PATH variable:
  1. Locate adb.exe in your SDK's platform-tools directory.
  2. Add this path to your system's PATH environment variable.
  3. Restart Android Studio to apply the changes.
May 21, 2024

How to fix device unauthorized adb? ›

Mar 6, 2024•Knowledge
  1. Disconnect USB between PC and device.
  2. Stop adb server by entering "adb kill-server" in command window.
  3. On device use "Revoke USB debugging authorizations" in "Developer Options"
  4. On PC delete "adbkey" file in user directory, for example "C:\Users\JohnDoo\.android"
  5. Reconnect the device to the PC.

How do I Authorise a device in adb? ›

After restarting the ADB server, reconnect your device to your computer. You should see a prompt on your device asking for authorization. Confirm the connection by selecting “o*k.” Your device should now be listed as “device” instead of “unauthorized.”

How do I reboot my adb to recovery? ›

  1. Open CMD in Windows or Terminal in Linux (after ADB fastboot drivers are Installed)
  2. Type the command - adb devices.
  3. This command will list all the devices connected to your computer. ...
  4. Once you confirm you can see your device, enter the command - adb reboot bootloader.
  5. This will take you recovery menu.
Aug 14, 2020

How to remove adb from Android? ›

Turn Ad privacy features on or off
  1. On your Android device, open Settings .
  2. Tap Privacy and security. More privacy settings.
  3. Tap Ads. Ads privacy. Ad topics.
  4. Under “Ad topics,” select the topics you want to block.
  5. Tap OK.

How do I revoke adb permission? ›

To grant permissions(s) we can use the adb shell pm grant <package> <permission> command. We can grand all requested permissions to application by adding -g to the adb shell pm grant command. To revoke permissions(s) we can use the adb shell pm revoke <package> <permission> command.

How do I get adb permission? ›

However, Windows users will use PowerShell, while Mac and Linux users need to use a terminal or shell to execute the ADB commands.
  1. Step 1: Download the SDK Tool. ...
  2. Step 2: Open PowerShell or the Terminal. ...
  3. Step 3: Enable Developer Options and USB Debugging. ...
  4. Step 4: Confirm the Device Connection. ...
  5. Step 5: Allow USB Debugging.

Top Articles
Latest Posts
Article information

Author: Prof. Nancy Dach

Last Updated:

Views: 6459

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Prof. Nancy Dach

Birthday: 1993-08-23

Address: 569 Waelchi Ports, South Blainebury, LA 11589

Phone: +9958996486049

Job: Sales Manager

Hobby: Web surfing, Scuba diving, Mountaineering, Writing, Sailing, Dance, Blacksmithing

Introduction: My name is Prof. Nancy Dach, I am a lively, joyous, courageous, lovely, tender, charming, open person who loves writing and wants to share my knowledge and understanding with you.