android 客制化系统签名文件

1.源码环境下切换到development/tools
2.运行
说明:
即切换到development/tools下 执行./make_key releasekey ..............  是直接执行./make_key +国家省份等个人信息的语句 然后输入密码
–development/tools/make_key releasekey '/C=CN/ST=BeiJing/L=HaiDian/O=MediaTek/OU=WCD/CN=demo/[email protected]'
之后输入相关信息
'/C=CN/ST=GuangDong/L=ShenZhen/O=Company/OU=Department/CN=xiaozheng/[email protected]'  
'/C=CN/ST=GuangDong/L=guangzhou/O=Company/OU=Department/CN=yangxiaozheng/[email protected]'  
C-国家
ST-省份
L-城市名
O-公司信息
OU-部门信息
CN-用户名
emailAddress-邮箱
./make_key releasekey  '/C=CN/ST=GuangDong/L=guangzhou/O=Company/OU=Department/CN=yangxiaozheng/[email protected]'
./make_key testkey '/C=CN/ST=GuangDong/L=guangzhou/O=Company/OU=Department/CN=yangxiaozheng/[email protected]'
./make_key platform '/C=CN/ST=GuangDong/L=guangzhou/O=Company/OU=Department/CN=yangxiaozheng/[email protected]'
./make_key shared '/C=CN/ST=GuangDong/L=guangzhou/O=Company/OU=Department/CN=yangxiaozheng/[email protected]'
./make_key media '/C=CN/ST=GuangDong/L=guangzhou/O=Company/OU=Department/CN=yangxiaozheng/[email protected]'
./make_key verity '/C=CN/ST=GuangDong/L=guangzhou/O=Company/OU=Department/CN=yangxiaozheng/[email protected]'

注意:生成key的过程中会提示输入password,实际应该不输入,否则编译会报错.之后生成相应的key文件,*.pk8是生成的私钥,而*.x509.pem是公钥,生成时两者是成对出现的.
3.将生成的签名文件放到build\target\product\security路径下,如果是MTK平台,客制化需求是另外新建文件路径。
即新建文件夹device\mediatek\common\security\eboda8167_tb_a_n,然后将签名文件放入此目录
device/eboda/eboda8167_tb_a_n/ProjectConfig.mk中的MTK_SIGNATURE_CUSTOMIZATION属性设为yes
4.修改build\core\Makefile文件
不管user还是userdebug都用release-keys
BUILD_KEYS += release-keys
#else
#ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/target/product/security/testkey)
#BUILD_KEYS := test-keys
#else
#BUILD_KEYS := dev-keys
#endif
#endif
===================================
说明1:
device\mediatek\common\device.mk中觉得PRODUCT_DEFAULT_DEV_CERTIFICATE用哪个
# To specify customer's releasekey
ifeq ($(MTK_INTERNAL),yes)
  PRODUCT_DEFAULT_DEV_CERTIFICATE := device/mediatek/common/security/releasekey
else
  ifeq ($(MTK_SIGNATURE_CUSTOMIZATION),yes)
    ifeq ($(wildcard device/mediatek/common/security/$(strip $(MTK_TARGET_PROJECT))),)
      $(error Please create device/mediatek/common/security/$(strip $(MTK_TARGET_PROJECT))/ and put your releasekey there!!)
    else
      PRODUCT_DEFAULT_DEV_CERTIFICATE := device/mediatek/common/security/$(strip $(MTK_TARGET_PROJECT))/releasekey
    endif
  else
#   Not specify PRODUCT_DEFAULT_DEV_CERTIFICATE and the default testkey will be used.
  endif
endif
说明2:release-keys也可使用这种配置
ifeq ($(TARGET_BUILD_VARIANT),user)
BUILD_KEYS += release-keys
else
ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/target/product/security/testkey)
BUILD_KEYS := test-keys
else
BUILD_KEYS := dev-keys
endif
endif
-------


 

你可能感兴趣的:(系统开发,android)