1.修改系统签名文件类型test-keys为release-keys的核心文件
/build/make/core/config.mk
/build/make/core/sysprop.mk
2.修改系统签名文件类型test-keys为release-keys的核心功能实现和分析
在修改系统签名文件类型test-keys为release-keys的核心功能实现中,在通过上述的分析得知,
关于系统签名的相关问题分析
在app开发中 app的系统签名类型
AndroidManifest.xml中的android:sharedUserId=“android.uid.system”,代表的意思是和系统相同的uid,可以拥有修改系统时间,文件操作等权限。
android的标准签名key有:
testkey
media
platform
shared
以上的四种,可以在源码的/build/target/product/security里面看到对应的密钥,其中shared.pk8代表私钥
系统中的apk的android.mk中没有设置LOCAL_CERTIFICATE的值,就默认使用testkey。
build\make\core\sysprop.mk
# The "test-keys" tag marks builds signed with the old test keys, # which are available in the SDK. "dev-keys" marks builds signed with # non-default dev keys (usually private keys from a vendor directory). # Both of these tags will be removed and replaced with "release-keys" # when the target-files is signed in a post-build step. ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/make/target/product/security/testkey) BUILD_KEYS := test-keys else BUILD_KEYS := dev-keys endif
build\make\core\config.mk
# The default key if not set as LOCAL_CERTIFICATE ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE DEFAULT_SYSTEM_DEV_CERTIFICATE := $(PRODUCT_DEFAULT_DEV_CERTIFICATE) else DEFAULT_SYSTEM_DEV_CERTIFICATE := build/make/target/product/security/testkey endif
修改签名 一般指定签名文件的路径,并提供指定的签名文件即可