Search code examples
androidfirebaseflutterkeytool

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


Gone through Official Documentation: Authenticating Your Client

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


Solution

  • 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