Android 5.1
1,MTK系统签名key生成
cd build/target/product/security/
openssl pkcs8 -inform DER -nocrypt -in platform.pk8 -out platform.pem
//密码:android 别名:androidkey
openssl pkcs12 -export -in platform.x509.pem -out platform.p12 -inkey platform.pem -password pass:android -name androidkey
//生成签名文件 platform.jks
keytool -importkeystore -deststorepass android -destkeystore ./platform.jks -srckeystore ./platform.p12 -srcstoretype PKCS12 -srcstorepass android
//转换签名文件为pkcs12
keytool -importkeystore -srckeystore ./platform.jks -destkeystore ./platform.jks -deststoretype pkcs12
2,apk进行v1签名
// apksigner -verbose -keystore (签名地址) -signedjar (签名后的apk地址) (待签名apk地址) (别名)
jarsigner -verbose -keystore D:\fanbianyi\sign51\platform.jks -signedjar
D:\fanbianyi\sign51\BluetoothLe_signed.apk D:\fanbianyi\sign51\BluetoothLe.apk androiddkey
3,apk进行v2签名
cd E:\android_sdk\build-tools\28.0.2
// apksigner sign --ks (签名地址) --ks-key-alias (别名) --out (签名后的apk地址) (待签名apk地址)apksigner sign --ks D:\fanbianyi\sign51\platform.jks --ks-key-alias androiddkey --out D:\fanbianyi\sign51\BluetoothLe_signed.apk D:\fanbianyi\sign51\BluetoothLe.apk