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 is also needed when trying to verify the RSA key fingerprint presented when enabling USB debugging. Sep 25, 2020 at 16:42
  • adb is usb debugging @JonathanCross Sep 25, 2020 at 22:39
  • Now the keywords "usb debugging" are inside this answer :-) Sep 29, 2020 at 16:17

3 Answers 3


This line will do it (found here):

awk '{print $1}' < ~/.android/adbkey.pub | openssl base64 -A -d -a | openssl md5 -c


echo {public key} | base64 --decode | md5sum 

On Android 5 and above, the 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:]'
  • 5
    On Android 10 I am still getting MD5. Sep 25, 2020 at 16:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .