How can I create Keystore Android from key.pk8 and certificate.pem?

So, today I finally updated my SDK to 22.0.0, but this creates an error in AndroidManifest.xml for android:debuggable="false" , which means that I can no longer externally sign and zipalign my own apks.

I signed my own key.pk8 and certificate.pem, however eclipse ADT requires a keystore.

Does anyone know a way to build a keystore using an already generated key or find some way?

+6
source share
1 answer

Good, so I eventually managed to solve the problem.

I downloaded openssl for windows from here

Keytool can be found at E:\Program Files\Java\jdk1.7.0_17\bin

Then, using keytool and openssl, I managed to create key.pk8 and certificate.pem in the keystore record

 openssl pkcs8 -inform DER -nocrypt -in key.pk8 -out key.pem openssl pkcs12 -export -in certificate.pem -inkey key.pem -out platform.p12 -password pass:android -name mykey keytool -importkeystore -deststorepass password -destkeystore .keystore -srckeystore platform.p12 -srcstoretype PKCS12 -srcstorepass android keytool -list -v -keystore .keystore 

The final step is to simply verify that the key has been added to the keystore.

+32
source

All Articles