You use ADB tools when you need to root your Android device, or communicate with it in any way. ADB tools are free and fairly easy to use even if you’re rooting or accessing your device for the first time. That said, because there are so many different Android devices running different versions of Android that have been modded for their particular device, you can run into problems when using ADB. One basic problem that prevents you from using it is the ADB device unauthorized message.
The ADB device unauthorized message appears when you run the adb devices command. It should return the device’s registration code with ‘device’ written next to it. If it returns the device code but has unauthorized written next to it, you won’t be able to communicate freely with the device.
Fix ADB Unauthorized Device
This error is fairly easy to resolve.
On Your Device
You likely have your device connected to your system. Disconnect it and open the Settings app. Go to Developer options. It might be on the main Settings screen, or it might be under System settings. The location differs based on the Android version you’re running.
Under Developer Options, turn off USB Debugging. Under the USB debugging switch, there will be an option called ‘Revoke USB debugging authorizations’. Tap it and for good measure, restart your phone.
On Your PC
Run the following two commands in Command Prompt;
adb kill-server adb start-server
These are two commands so enter the first one and tap enter. Then enter the second one and tap enter again to run it.
Reconnect Device To PC
Now return to the Developer options on your ddevice and enable USB debugging again. Connect your phone to your PC. Pull down the notifications shade where it tells you what mode your device is connected in over USB. It defaults to charging mode. This bit will involve a little experimentation but choose Transfer files and then run the adb devices command.
If it still returns the device as unauthorized, repeat the process but this time around choose Transfer Photos. One of these connection types will fix the ADB device unauthorized message.
This error has nothing to do with your root status, or whether or not the bootloader is unlocked. This is a glitch that makes ADB tools think it isn’t authorized to make changes to the connected device. Normally, when you connect your device, a prompt appears on your phone asking to authorize debugging but these authorizations fail to register with ADB hence the error.