diff options
author | Ying Wang <wangying@google.com> | 2014-10-07 18:42:11 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2014-10-07 18:59:47 -0700 |
commit | e24e17a976025de11c010280575281d0705c7d2e (patch) | |
tree | 26f918baaa843a44f607b766afc425d2758222ed | |
parent | 397a8be4bc26a696cf205ac9800865caee3ecf61 (diff) | |
download | build-e24e17a976025de11c010280575281d0705c7d2e.tar.gz |
Export build thumbprint only if the product has specified at least one oem fingerprint property
Bug: 17888863
Change-Id: I4d12bc977dcb5e8e1858efb2a395466d8779de34
-rw-r--r-- | core/Makefile | 15 | ||||
-rwxr-xr-x | tools/buildinfo.sh | 4 |
2 files changed, 13 insertions, 6 deletions
diff --git a/core/Makefile b/core/Makefile index 7bef52e7c2..72ca56cbd6 100644 --- a/core/Makefile +++ b/core/Makefile @@ -133,6 +133,13 @@ ifneq ($(words $(BUILD_THUMBPRINT)),1) $(error BUILD_THUMBPRINT cannot contain spaces: "$(BUILD_THUMBPRINT)") endif +KNOWN_OEM_THUMBPRINT_PROPERTIES := \ + ro.product.brand \ + ro.product.name \ + ro.product.device +OEM_THUMBPRINT_PROPERTIES := $(filter $(KNOWN_OEM_THUMBPRINT_PROPERTIES),\ + $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OEM_PROPERTIES)) + # Display parameters shown under Settings -> About Phone ifeq ($(TARGET_BUILD_VARIANT),user) # User builds should show: @@ -212,7 +219,7 @@ endif BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \ TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \ BUILD_FINGERPRINT="$(BUILD_FINGERPRINT)" \ - BUILD_THUMBPRINT="$(BUILD_THUMBPRINT)" \ + $(if $(OEM_THUMBPRINT_PROPERTIES),BUILD_THUMBPRINT="$(BUILD_THUMBPRINT)") \ TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \ TARGET_CPU_ABI_LIST="$(TARGET_CPU_ABI_LIST)" \ TARGET_CPU_ABI_LIST_32_BIT="$(TARGET_CPU_ABI_LIST_32_BIT)" \ @@ -1398,11 +1405,9 @@ endif $(hide) echo "use_set_metadata=1" >> $(zip_root)/META/misc_info.txt $(hide) echo "multistage_support=1" >> $(zip_root)/META/misc_info.txt $(hide) echo "update_rename_support=1" >> $(zip_root)/META/misc_info.txt -ifneq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OEM_PROPERTIES),) +ifneq ($(OEM_THUMBPRINT_PROPERTIES),) # OTA scripts are only interested in fingerprint related properties -ifneq ($(filter ro.product.brand ro.product.name ro.product.device, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OEM_PROPERTIES)),) - $(hide) echo "oem_fingerprint_properties=$(filter ro.product.brand ro.product.name ro.product.device, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OEM_PROPERTIES))" >> $(zip_root)/META/misc_info.txt -endif + $(hide) echo "oem_fingerprint_properties=$(OEM_THUMBPRINT_PROPERTIES)" >> $(zip_root)/META/misc_info.txt endif $(call generate-userimage-prop-dictionary, $(zip_root)/META/misc_info.txt) $(hide) ./build/tools/releasetools/make_recovery_patch $(zip_root) $(zip_root) diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh index 593e5b5a4b..ed6bd87ed2 100755 --- a/tools/buildinfo.sh +++ b/tools/buildinfo.sh @@ -50,7 +50,9 @@ echo "ro.build.product=$TARGET_DEVICE" echo "# Do not try to parse description, fingerprint, or thumbprint" echo "ro.build.description=$PRIVATE_BUILD_DESC" echo "ro.build.fingerprint=$BUILD_FINGERPRINT" -echo "ro.build.thumbprint=$BUILD_THUMBPRINT" +if [ -n "$BUILD_THUMBPRINT" ] ; then + echo "ro.build.thumbprint=$BUILD_THUMBPRINT" +fi echo "ro.build.characteristics=$TARGET_AAPT_CHARACTERISTICS" echo "# end build properties" |