How can I generate an Android Keystore from a key.pk8 and certificate.pem?

前端 未结 1 369
暗喜
暗喜 2021-02-02 02:33

So today I finally update my SDK to 22.0.0 however this creates an error in the AndroidManifest.xml for android:debuggable=\"false\" which means I can no longer ext

相关标签:
1条回答
  • 2021-02-02 02:54

    Ok, 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 managed to build the key.pk8 and certificate.pem into a keystore entry

    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 last step is just to verify that the key has been added to the keystore.

    0 讨论(0)
提交回复
热议问题