1.
java -jar signapk.jar platform.x509.pem platform.pk8 Demo.apk signedDemo.apk 或者直接在Ubuntu 编译环境执行 java -jar out/host/linux-x86/framework/signapk.jar build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 input.apk output.apk
2.
a:把pkcs8格式的私钥转化成pkcs12格式
openssl pkcs8 -in platform.pk8 -inform DER -outform PEM -out shared.priv.pem -nocrypt
b:x509.pem公钥转换成pkcs12格式
openssl pkcs12 -export -in platform.x509.pem -inkey shared.priv.pem -out shared.pk12 -name androiddebugkey 密码都是:android
c:生成platform.keystore
keytool -importkeystore -deststorepass android -destkeypass android -destkeystore platform.keystore -srckeystore shared.pk12 -srcstoretype PKCS12 -srcstorepass android -alias androiddebugkey
本文为Adamin90原创文章,转载无需和我联系,但请注明来自http://www.lixiaopeng.top