mtk Android 编译命令自定义--添加版本号

1. alps\build\core\Makefile文件:(参照CUSTOM_BUILD_VERNO)

ifeq "" "$(SURPLUS_BUILD_VERNO)"

  SURPLUS_BUILD_VERNO := $(BUILD_NUMBER)

  SURPLUS_BUILD_VERNO := $(subst eng.$(USER).,,$(SURPLUS_BUILD_VERNO))

endif

 

surplus_build_desc:= $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)-$(PLATFORM_VERSION)-$(SURPLUS_BUILD_VERNO)

$(INSTALLED_BUILD_PROP_TARGET): SURPLUS_PRIVATE_BUILD_DESC:= $(surplus_build_desc)

 

SURPLUS_PRIVATE_BUILD_DESC="$(SURPLUS_PRIVATE_BUILD_DESC)" \

 

2.\alps\build\tools\buildinfo.sh文件:(参照CUSTOM_BUILD_VERNO)

echo "ro.custom.build.version=$SURPLUS_PRIVATE_BUILD_DESC"

 

3.xshell编译命令:

./mk -opt=TARGET_BUILD_VARIANT=user,SURPLUS_BUILD_VERNO=v0.08 a9 new

 

4. alps\out\product\a9\system\build.prop文件中:

ro.custom.build.version=a9-user-4.1.2-v0.08

 

5.可以进入终端查看版本号,验证修改效果。

你可能感兴趣的:(mtk Android 编译命令自定义--添加版本号)