Android源码下的4对KEY
在Android源码的build/target/product/security/目录下有如下的4对KEY:
1、media.pk8与media.x509.pem;
2、platform.pk8与platform.x509.pem;
3、shared.pk8与shared.x509.pem;
4、testkey.pk8与testkey.x509.pem;
其中,“*.pk8”文件为私钥,“*.x509.pem”文件为公钥,这需要去了解下非对称加密方式。
在该目录下有README文件,其中有如下解释:
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.
而这些KEY如何与被签名的APK对应上呢?在APK源码目录下的Android.mk文件中有LOCAL_CERTIFICATE字段,用于指定签