Quite often we’re using ADB and Fastboot tools to interact with our smartphone or tablet. This requires us to manually grant USB debugging permission when we connect the phone to the PC. We’re also given the option to save these keys for future reference. If they cannot be accessed then you’ll see an ADB Vendor Keys error.
You’ll notice that when you first connect your smartphone to the PC with a USB cable that it will begin to install drivers and set it up for you (at least on Windows). This gives us a basic way of accessing the smartphone or tablet for basic file transfer tasks. If we want to use ADB or Fastboot tools then we to increase our access level.
We do this by installing an ADB USB driver from the company who manufactured the smartphone.
With this installed, our PC can then send and receive commands using ADB and Fastboot. This requires us to enable the hidden Developer Options menu, go in and flip a toggle to turn on USB Debugging Mode. We then need to start the ADB server on our computer so when we connect it to the PC the permission prompt appears.
Dozens of premium Android apps go on sale every single day. Check out the latest over at PlayStoreSales.com.
We’re required to do all of this for security reasons since ADB and Fastboot tools give us a higher level of access than most people need.
What are ADB Vendor Keys?
Going through the linked guides above will tell your smartphone or tablet to check for an ADB server when it is connected to a PC with a USB cable (I’ll cover wireless ADB later). If an ADB server is running on your PC and you connect a new phone to it with USB Debugging Mode enabled then you will see the following prompt.
The prompt may look different depending on what software you’re running, but the general idea is here. You’ll be asked if you want to allow USB Debugging access from the PC it’s connected to. You’re told this PC’s RSA key fingerprint and then given the option to allow access or to deny it.
If you allow access, your smartphone can then be accessed with ADB and Fastboot tools from this specific PC. This only lasts for the current session on this specific PC and will need to be allowed again in the future. Although, you can set the “always allow” box within the prompt to automate this for future attempts.
When you grant access, ADB and Fastboot tools will also save your ADB_VENDOR_KEYS to the PC (this is similar to your PC’s RSA key fingerprint).
What is Causing this ADB Vendor Keys Error?
Now that you have a bit of a background on the technical aspect of this system, you may be curious as to why this is happening. You can see that there are some security measures put into place which need to be manually bypassed for ADB and Fastboot tools to do anything with your smartphone or tablet.
These security measures help keep your device and the data that is stored on it safe. If one of these things aren’t done, then we will be unable to execute ADB or Fastboot commands with the device. The ADB Vendor Keys error is one of these checks. Before executing an ADB or Fastboot command, it references a file to grab a key that will grant it access to the smartphone or tablet.
If that file is missing, corrupt, or inaccessible in some way then we’ll be given this ADB_VENDOR_KEYS error in our Command Prompt, terminal, or Windows PowerShell.
This file is generated (or appended to) whenever we grant USB Debugging access via the prompt you see above. Sadly, there are times when either that prompt isn’t triggered or as I mentioned above, the keys in the file are inaccessible due to it being missing, corrupt, or something like that.
How to Fix the ADB_VENDOR_KEYS Error?
When I ran into this issue recently, it was with a smartphone that I had already granted USB Debugging access. It was with a phone that I have been creating tutorials about for months and I hadn’t switched PCs nor had I done a factory reset. However, I know that there are a number of ways this error can pop up so let me cover a few of them here.
Make Sure ADB Drivers are Up to Date
ADB and Fastboot tools communicate with our smartphones and tablets over USB and so they need specific drivers to be installed. Since this is the origin point of its connection, it’s advised to make sure you have the most up to date ADB drivers installed from the OEM that manufactures the device.
You can do a Google search to find it on the manufacturer’s website or you can reference the convenient list here.
Grant and Enable USB Debugging Mode
After the USB connection is made, your smartphone will ignore ADB and Fastboot commands until you grant permission. To do this, you’ll first need to enable what is commonly referred to as Developer Mode. Doing so will reveal a hidden Developer Options menu which we then dive into to enable USB Debugging Mode.
With that done, you will then need to start the ADB server on your PC. This can be done by executing any ADB command in a Command Prompt, Terminal, or Windows PowerShell. I like to just execute the following command though, which will start the server (if it hasn’t been started already), and then print out a list of connected Android devices/emulators.
Once you have the ADB server up and running, you can then connect the smartphone or tablet to the PC with a USB cable. If everything works smoothly then you should get the USB Debugging prompt shown above and can then proceed from here. The thing is, I had done all of that before and I was still getting the ADB_VENDOR_KEYS error.
So thanks to XDA Senior Member postal302, I found out that I needed to take things a step further and did so without the need to reinstall ADB and Fastboot tools.
Regenerate Your ABD Vendor Key Files
As I had already done the other steps listed above, it was this one that actually fixed the error I was getting. Remember when I told you that your PC was storing device keys so they could be referenced later? ADB and Fastboot are storing these keys in a particular folder and we can simply delete them.
This will not delete any personal data you have on your phone but will require you to grant USB Debugging access again.
These files are going to be stored in a folder labeled “.android” (with a period in front of it) that can be found in your PC’s user directory. Windows users can open up an explorer window and type in the following at the top ‘address bar’ (or whatever it is called) of the window. . .
This should take you to the .android folder with your home directory. For me, that is “C:\Users\Doug\.android\” but it will be different for you. That’s why putting that in the explorer window and press enter is much easier because it’s a shortcut directly to your active users’ home folder. There’s something similar for Linux and macOS users as well.
So macOS and Linux users can open a terminal and execute the command “cd ~/.android” (without the quotes) to be taken directly into the .android folder that is within your home directory.
Windows, macOS, and Linux users should see two different files in here. One will be labeled adbkey and the other will be labeled adbkey.pub. ADB and Fastboot tools store your smartphone or tablet’s ADB_VENDOR_KEY in one of these files and for some reason, it can’t access it.
So go ahead and delete both of these files. Restart your computer, and start up the ADB server again with the “adb devices” command. With it running, connect the device to the PC with a USB cable and you should then see the prompt appear.
You could also execute the command “adb kill-server” and start it again with the “adb devices” command if you didn’t want to reboot.
You may be able to get by with just revoking USB Debugging authorizations from within the hidden Developer Options menu. Doing this should help trigger the access prompt we’ve talked about here, but if the files are the culprit (like they were in my situation) then this will not help. Still, it’s a great troubleshooting step that you should definitely be aware of.