What keystore does ionic use to sign the apk?

I use google oauth in my app. Which needs a SHA-1 fingerprint to be included on google developer console.

I have added SHA-1 , which I got using the android debug keystore :-

keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

But , when Ionic app is built and run , Oauth won’t work because of unmatched fingerprint.

So , to make it work everytime I have to sign the ionic built app manually using android debug keystore.Then the app works.

Is there a way to tell ionic to sign the apk with android debug keystore ?

OR

Can I get SHA-1 of keystore , which is used by ionic to signing while building ?

Manually , signing after every build is a tedious task , since I can’t directly run on device.

Any help is appreciated. Thanks

I just solved this, even if it’s an old question it might still help people who have issues getting this to work and find this through google:

Solution is really simple: just get your own debug keystore (there should be already one at C:\Users\yourname\.android\debug.keystore) and place it in the root directory of your application.
Then go in platforms/android and create a file named “debug-signing.properties” (you can also make a release-signing.properties file, this is how I found this solution) and paste in the following:

target=android-25
android.library.reference.1=CordovaLib
keyPassword=android
storePassword=android
keyAlias=androiddebugkey
storeFile=../../debug.keystore

that’s it, now every time your app is compiled it should use that one keystore, no more weird hashes for who knows where

7 Likes