android制作系统签名文件:(文件大小约为2KB)
step1:
development/tools/make_key releasekey '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
生成:releasekey.pk8 releasekey.x509.pem ## 文件在根目录下
注意:替换签名生成.pk8和.x509.pem时不设密码直接回车Enter,否则openssl命令生成*.pem时会解密失败
验证签名信息:
openssl x509 -noout -subject -issuer -in releasekey.x509.pem
step2:
openssl pkcs8 -inform DER -nocrypt -in releasekey.pk8 -out releasekey.pem
生成:releasekey.pem(文件大小约为2KB)
一般需要替换build/target/product/security下6组key(分别是releasekey media platform shared testkey bluetooth ),每组有3个文件
(分别是 pem/pk8/x509.pem ),共计18个文件,其中17个文件是在build/target/product/security目录下,bluetooth.x509.pem文件是在vendor/partner_modules/build/certificates目录下
android制作Apex签名文件:
step1:
development/tools/make_key com.android.bluetooth '/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
生成:com.android.bluetooth.pk8 com.android.bluetooth.x509.pem ## 文件在根目录下
注意:替换签名生成.pk8和.x509.pem时不设密码直接回车Enter,否则openssl命令生成*.pem时会解密失败
step2:
openssl pkcs8 -inform DER -nocrypt -in com.android.bluetooth.pk8 -out com.android.bluetooth.pem
生成:com.android.bluetooth.pem(文件大小约为2KB)
step3:
openssl genrsa -out com.android.bluetooth.pem 4096
生成新的4096位的com.android.bluetooth.pem(文件大小约为4KB)原文件会被覆盖(若需要原文件请提前备份)
step4:
avbtool extract_public_key --key com.android.bluetooth.pem --output com.android.bluetooth.avbpubkey
生成:com.android.bluetooth.avbpubkey(文件大小约为2KB)
注:com.android.vndk需要生成com.android.vndk.pubkey文件:
avbtool extract_public_key --key com.android.vndk.pem --output com.android.vndk.pubkey
生成:com.android.vndk.pubkey(文件大小约为2KB)
以RK3576 android14 EDLA为例需替换所有签名文件路径如下:
具体文件路径如下:
重点说明:
蓝牙相关的签名全部要用同一套签名,名字不一样的重命名即可。否则将会导致蓝牙功能无法使用。