Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jks or pkcs12: which one should I use to sign the apk for Google Play Store?

Android Studio 3.5.3, after the creation of my new Key Store, suggests me to convert it using this command:

keytool -importkeystore -srckeystore /path/myKeyStore.jks -destkeystore /path/myKeyStore.jks -deststoretype pkcs12

On the Web and on SO I read a little about it (for example the pkcs12 format is widely supported regardless of the programming language used to read it) but I can't find the answer to this question:

Is the format pkcs12 perfectly compatible with Google Play Store to publish my Apps?

If yes, which one should I use to sign my apks and why?

Thanks a lot!

like image 442
user2342558 Avatar asked Dec 13 '19 06:12

user2342558


2 Answers

Both pkcs12 and jks are formats holding the public and private key (PPK) used for signing the APK for release and publishing on Google Play Store. It doesn't matter how the PPK is stored as long you can use it for signing. Certain tools or services might prefer using one format over the other and converting between them is by using either command line tools, KeyStore Explorer or similar. Regardless of the conversion direction, the PPK contained stays always the same.

Convert from PKCS12 to JKS

Convert from JKS to PKCS12

KeyStore Explorer

like image 58
ahasbini Avatar answered Nov 14 '22 22:11

ahasbini


jks is java key store, which is more of a java related format, and you can use it directly for signing your release apks for the playstore. So if you're just going to be using it for this purpose, you don't really need to convert it to pkcs12. PKCS12 is not specific to java. If you want to store other keys for other purposes, in the same key store, in a language-neutral format, you may want to convert it to pkcs12.

like image 20
auspicious99 Avatar answered Nov 14 '22 22:11

auspicious99