Resolving ADB unauthorized issue
Issue
cd $ANDROID_SDK_HOME/platform-tools
adb devices
List of devices attached
fffffffffffffff unauthorized
One would see the 'unauthorized' keyword in the place of the device name.
adb shell
would also fail stating something about 'keys not set'.
Solution
- Unplug your android device from the computer, if it is connected
- Inside your computer:
- Go to
$ANDROID_SDK_HOME/platform-tools
- Run
adb keygen .android/adb_key
- Go to
- Open your android device
- Go to Settings -> Developer Options
- Touch 'Revoke USB debugging authorizations'
- Plug the device back into the computer
- The device should now ask you for whether to trust this computer. Say yes.