Create product sysprops on vendor partition.
Duplicate essential product sysprops for manufacturer, model, brand, name, and device
from system on vendor so that mixed builds (vendor.img + GSI system.img) have correct
product information in their CTS/VTS reports.
Test: make
Bug: 64458205
Change-Id: Ib63b37772be493b9e035d9b7e8c5e2cf66f2fa8c
diff --git a/core/Makefile b/core/Makefile
index 7f0e1cd..cc16497 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -299,7 +299,12 @@
TARGET_AAPT_CHARACTERISTICS="$(TARGET_AAPT_CHARACTERISTICS)" \
bash $(BUILDINFO_SH) >> $@
ifndef property_overrides_split_enabled
- $(hide) TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
+ $(hide) TARGET_DEVICE="$(TARGET_DEVICE)" \
+ PRODUCT_NAME="$(TARGET_PRODUCT)" \
+ PRODUCT_BRAND="$(PRODUCT_BRAND)" \
+ PRODUCT_MODEL="$(PRODUCT_MODEL)" \
+ PRODUCT_MANUFACTURER="$(PRODUCT_MANUFACTURER)" \
+ TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
bash $(VENDOR_BUILDINFO_SH) >> $@
endif
@@ -359,7 +364,12 @@
$(hide) echo ro.vendor.build.date.utc=`$(DATE_FROM_FILE) +%s`>>$@
$(hide) echo ro.vendor.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
ifdef property_overrides_split_enabled
- $(hide) TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
+ $(hide) TARGET_DEVICE="$(TARGET_DEVICE)" \
+ PRODUCT_NAME="$(TARGET_PRODUCT)" \
+ PRODUCT_BRAND="$(PRODUCT_BRAND)" \
+ PRODUCT_MODEL="$(PRODUCT_MODEL)" \
+ PRODUCT_MANUFACTURER="$(PRODUCT_MANUFACTURER)" \
+ TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
bash $(VENDOR_BUILDINFO_SH) >> $@
$(hide) echo "#" >> $@; \
diff --git a/tools/vendor_buildinfo.sh b/tools/vendor_buildinfo.sh
index 2854fa8..485ada3 100755
--- a/tools/vendor_buildinfo.sh
+++ b/tools/vendor_buildinfo.sh
@@ -6,4 +6,10 @@
echo "ro.product.board=$TARGET_BOOTLOADER_BOARD_NAME"
echo "ro.board.platform=$TARGET_BOARD_PLATFORM"
+echo "ro.vendor.product.manufacturer=$PRODUCT_MANUFACTURER"
+echo "ro.vendor.product.model=$PRODUCT_MODEL"
+echo "ro.vendor.product.brand=$PRODUCT_BRAND"
+echo "ro.vendor.product.name=$PRODUCT_NAME"
+echo "ro.vendor.product.device=$TARGET_DEVICE"
+
echo "# end build properties"