Skip to content

Fix ADB Device Unauthorized Error on Android Devices [How to]

Being an open-source platform, Android supports a command-line tool called Android Debug Bridge. ADB is a versatile tool that can be used to perform a variety of tasks on Android devices using a Windows, Linux, macOS, or ChromeOS computer. In order that your PC can access your device and control it via ADB, you need to authorize the PC on your Android phone or tablet. For security reasons, ADB authorization is mandatory if you want to do things on your device via ADB commands. In this tutorial, we’ll see how we can authorize ADB on Android and fix the ADB device unauthorized error.

ADB can be used for several purposes. For example, you can use it to transfer files between your Android device and computer, install or uninstall apps, capture screenshots or record screens, get detailed information about your device, debug and fix problems, generate system logs, run ADB shell commands, root Android devices, enable and disable OS features, install OTA zip packages, back up data, control your device remotely, and so on. ADB might even come in handy, especially in situations where your phone is unusable.

To do all such things, you’ll have to use ADB commands. In order that ADB can communicate with your Android device you will need to allow the USB debugging permission for your Windows, Linux, or Mac computer. If you don’t do that, any ADB command that you execute either won’t work at all or throw the “adb device unauthorized” error:

This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.

In many cases, users get the “ADB device unauthorized” error. To fix such issues, your must follow the proper steps to fix the ADB device unauthorized error on Windows, macOS, or Linux. Actually, it’s very easy to fix the ADB device unauthorized error. If ADB is unable to detect or connect to your Android device, there could be one of the following issues you need to address.

  • Faulty USB connection
  • 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

Why Should We Keep USB Debugging Enabled?

ADB works as a bridge between your Android device and your computer. Google has implemented debugging authorization as a security measure so that no unauthorized computer can access your device over a USB connection without your permission. You can authorize a computer for single-time access, or just grant it permanent authorization for future access. In case you want to remove a computer from the list of approved devices, you can easily revoke USB debugging authorizations whenever you want to.

ADB authorization works as a primary firewall because it can be authorized only when the Android device is unlocked. If you have enabled screen lock, no one other than a hardcore hacker can control your device via ADB commands. Some people might say that keeping USB debugging enabled all the time is not safe. I think as long as you keep a screen lock method enabled, it is completely safe. On the contrary, USB debugging is one of those features that must be kept enabled. In certain tricky situations, ADB might turn up as your last resort to help fix your phone with a broken screen or power or volume buttons. If it is not enabled, you’ll get the ADB device unauthorized error because debugging is not enabled on your device. Remember, you won’t be able to enable USB debugging on Android from a computer or authorize an ADB device with a broken screen when your phone is locked.

Fixing ADB Device Unauthorized Error

As I clarified above, it’s very important that the USB debugging option is enabled on the Android device otherwise ADB will not detect it at all. If you follow the steps described below carefully, you can fix the ADB device unauthorized error easily.

Steps to Enable Developer Options and USB Debugging

The developer options on Android are not meant for normal users. As their very name suggests, there are supposed to be used by developers and geeks. By default, these options remain hidden from the Android settings menu but they can be easily activated by enabling the Developer mode. If you have already enabled debugging on your device, you can skip this part.

  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 are unable to find it, tap the search box in the Settings app, type “about” and you’ll find it.
  3. Now, tap on Software information.android software version
  4. On the next screen, tap on Build number 7 times in a row.
  5. You’ll see a toast message saying, “Developer mode has been turned on“.tap build number on android to turn on developer options
  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 on the toggle button next to USB debugging and tap on OK when prompted to turn it on.enable usb debugging on android

Revoking ADB Authorizations on Android

Before you try to fix the ADB device unauthorized error, you should start by revoking all previous ADB device authorizations on your Android device. To remove any ADB device or computer, follow the steps given below.

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

Removed authorized ADB devices

Setting up ADB on Windows, Mac, & Linux

Now that you have turned on the Developer options and enabled USB debugging on your Android phone or tablet, ADB can detect it when connected via USB to a Windows, Linux, or Mac computer. However, you won’t be able to send or execute ADB commands from your PC unless you authorize the ADB command on your device.

In order to authorize ADB commands, you’ll need to connect your device to your computer and issue a command. And, to do so, you’ll have to set up ADB and Fastboot drivers first. Depending on your computer OS, the method to install and set up ADB may differ. I have already detailed tutorials about settings up ADB and Fastboot on Windows, macOS, and Linux. You should start by downloading the latest Android SDK platform tools for your computer’s OS.

Authorizing ADB Device on Android

Well, having enabled the USB debugging on your phone and set up the ADB drivers on your computer, let’s move to the final action.

  1. Open device settings, go to Display, and increase the screen timeout to 10 minutes. You have to make sure that your phone’s screen is not locked while you issue the ADB command on your PC.
  2. Connect your Android phone or tablet to your computer using a USB cable.
  3. Navigate to the platform-tools folder and open it.
  4. 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 empty space, and select the “Open PowerShell window here” (Windows 10), or  “Open in Terminal” (Windows 11) option from the Windows Context Menu.open command prompt with folder path in windows 11
    2. Type “cmd” or “powershell” in the folder window address bar and press the Enter key.open powershell window from folder menu address bar
  5. If you’ve done it correctly you’ll see the path of the platform-tools folder in the Command Prompt window as shown below.command prompt opened in the adb and fastboot folder window
  6. Now, unlock your phone’s screen, type the following ADB command in the Command Prompt window, and hit the Enter key.
    adb devices
  7. Just as you press the Enter key, you’ll see a notification pop-up on your Android device saying, “Allow USB debugging?“. If you want to add your Windows PC to the list of authorized ADB devices for your Android phone, select the Always allow from this computer option and tap on Allow.authorize adb on samsung galaxy s22
  8. As soon as you select Allow on your phone, you’ll see your device right under the List of devices attached in the Command Prompt window. Remember, ADB doesn’t show your device by its name or model number but by device ID which consists of a string of alphanumeric values.adb devices detected on windows 11
  9. In case you fail to Allow USB debugging on your phone’s screen, you will get the unauthorized device error in the command window.

    adb device unauthorized error in windows powershell

    ADB device unauthorized error Windows 11

Disabling 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. In order to give your computer permanent authorization on your Android devices for ADB-related tasks, follow the steps given below.

  1. Navigate to Settings> Developer options on 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.

disable adb authorization timeout on android devices
That’s all for now! I hope this detailed tutorial helped you authorize ADB on your Android device and fix the ADB device unauthorized error.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.