把 .pk8 .pem 格式的签名生成keystore格式的:
android默认有四个签名:
testkey – a generic key for packages that do not otherwise specify a key.
platform – a test key for packages that are part of the core platform.
shared – a test key for things that are shared in the home/contacts process.
media – a test key for packages that are part of the media/download system.
1.把pkcs8格式的私钥转换为pkcs12格式:
openssl pkcs8 -inform DER -nocrypt -in platform.pk8 -out platform.pem
2.生成pkcs12格式的密钥文件:
openssl pkcs12 -export -in platform.x509.pem -out platform.pk12 -inkey platform.pem -password pass:android -name androiddebugkey
3.生成keystore:
keytool -importkeystore -deststorepass android -destkeystore ./platform.keystore -srckeystore ./platform.pk12 -srcstoretype PKCS12 -srcstorepass android
另外:生成的keystore的alias name :androiddebugkey;pass 为:android