How to generate SHA1, SHA256, MD5 for default debug key using keytool in Mac, Windows and Linux?

2,204

Following will give you SHA1, SHA256, MD5 for default debug key. And it can be used for developing and debugging with google play services.

Linux & Mac command

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

Windows

keytool -exportcert -keystore C:\Users\<USERNAME>\.android\debug.keystore -list -v

Replace with your windows account name example:

keytool -exportcert -keystore C:\Users\Aakash\.android\debug.keystore -list -v

If asked password, type: android

Share:
2,204
Aakash Solanki
Author by

Aakash Solanki

Updated on December 21, 2022

Comments

  • Aakash Solanki
    Aakash Solanki over 1 year

    Gone through Official Documentation: Authenticating Your Client

    But still, either terminal was not able to find keytool or command doesn't work?

  • Amit Verma
    Amit Verma about 3 years
    While this code may provide a solution to the question, it's better to add context as to why/how it works. This can help future users learn and eventually apply that knowledge to their own code. You are also likely to have positive-feedback/upvotes from users, when the code is explained.
  • Amit Verma
    Amit Verma about 3 years
    While this code may provide a solution to the question, it's better to add context as to why/how it works. This can help future users learn and eventually apply that knowledge to their own code. You are also likely to have positive-feedback/upvotes from users, when the code is explained.