You should know that Android 4.2.2 (or just before) introduced RSA key checking for adb access. – The device asks now if you want to allow access.

To avoid asking every time, the computer presents an RSA key, which can be permanently accepted.

The dialog on the phone shows the RSA key fingerprint. – On Linux, the public/secret key pair is here: ~/.android/adbkey(.pub).

How can I show the fingerprint of that key file? (I’m looking for a command line to do that on the Linux system.)


This line will do it (found here):

awk '{print $1}' < ~/.android/adbkey.pub | openssl base64 -A -d -a | openssl md5 -c
| improve this answer | |
  • awk '{print $1}' < ~/.android/adbkey.pub | base64 --decode | md5sum works as well – Yasushi Shoji Feb 23 '19 at 8:02


echo {public key} | base64 --decode | md5sum 
| improve this answer | |

On Android 5 and up hash-function used was changed to sha256. If your hardware is such, your could try:

awk '{print $1}' < ~/.android/adbkey.pub | openssl base64 -A -d -a | openssl sha256 -c | awk '{print $2}'|tr '[:lower:]' '[:upper:]'

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.