From 12fa5410d1767a46b2a25e4f4ae0815e6d17f427 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Tue, 23 Nov 2021 16:14:57 +0200 Subject: [PATCH] core: Allow overriding device/model/name/fingerprint properties Change-Id: I84c4ecb4d20fe6954551e4f07f739e04bfffd647 --- core/sysprop.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/sysprop.mk b/core/sysprop.mk index dc6f2c4ac6..1c2495d74f 100644 --- a/core/sysprop.mk +++ b/core/sysprop.mk @@ -29,15 +29,17 @@ POST_PROCESS_PROPS := $(HOST_OUT_EXECUTABLES)/post_process_props$(HOST_EXECUTABL # $(1): Partition name # $(2): Output file name define generate-common-build-props + bash -c '\ + $(or $(PRODUCT_BUILD_PROP_OVERRIDES),:);\ echo "####################################" >> $(2);\ echo "# from generate-common-build-props" >> $(2);\ echo "# These properties identify this partition image." >> $(2);\ echo "####################################" >> $(2);\ echo "ro.product.$(1).brand=$(PRODUCT_BRAND)" >> $(2);\ - echo "ro.product.$(1).device=$(TARGET_DEVICE)" >> $(2);\ + echo "ro.product.$(1).device=$${DeviceName:-$(TARGET_DEVICE)}" >> $(2);\ echo "ro.product.$(1).manufacturer=$(PRODUCT_MANUFACTURER)" >> $(2);\ - echo "ro.product.$(1).model=$(PRODUCT_MODEL)" >> $(2);\ - echo "ro.product.$(1).name=$(TARGET_PRODUCT)" >> $(2);\ + echo "ro.product.$(1).model=$${ProductModel:-$(PRODUCT_MODEL)}" >> $(2);\ + echo "ro.product.$(1).name=$${DeviceProduct:-$(TARGET_PRODUCT)}" >> $(2);\ if [ -n "$(strip $(PRODUCT_MODEL_FOR_ATTESTATION))" ]; then \ echo "ro.product.model_for_attestation=$(PRODUCT_MODEL_FOR_ATTESTATION)" >> $(2);\ fi; \ @@ -68,10 +70,7 @@ define generate-common-build-props )\ echo "ro.$(1).build.date=`$(DATE_FROM_FILE)`" >> $(2);\ echo "ro.$(1).build.date.utc=`$(DATE_FROM_FILE) +%s`" >> $(2);\ - # Allow optional assignments for ARC forward-declarations (b/249168657) - # TODO: Remove any tag-related inconsistencies once the goals from - # go/arc-android-sigprop-changes have been achieved. - echo "ro.$(1).build.fingerprint?=$(BUILD_FINGERPRINT_FROM_FILE)" >> $(2);\ + echo "ro.$(1).build.fingerprint?=$${BuildFingerprint:-$(BUILD_FINGERPRINT_FROM_FILE)}" >> $(2);\ echo "ro.$(1).build.id?=$(BUILD_ID)" >> $(2);\ echo "ro.$(1).build.tags?=$(BUILD_VERSION_TAGS)" >> $(2);\ echo "ro.$(1).build.type=$(TARGET_BUILD_VARIANT)" >> $(2);\ @@ -79,6 +78,7 @@ define generate-common-build-props echo "ro.$(1).build.version.release=$(PLATFORM_VERSION_LAST_STABLE)" >> $(2);\ echo "ro.$(1).build.version.release_or_codename=$(PLATFORM_VERSION)" >> $(2);\ echo "ro.$(1).build.version.sdk=$(PLATFORM_SDK_VERSION)" >> $(2);\ + ';\ endef