Add system propery ro.build.flavor.
ro.build.flavor is set to "$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)" in
system.img build.prop at build time,
and it won't be overridden by oem partition's build.prop.
Bug: 18605832
Change-Id: Ic917623dd43b74d9c601119db0b457483e8c4472
diff --git a/core/Makefile b/core/Makefile
index eb3b1c3..15c7f02 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -200,6 +200,7 @@
echo "import /oem/oem.prop $(prop)" >> $@;)
endif
$(hide) TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \
+ TARGET_BUILD_FLAVOR="$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)" \
TARGET_DEVICE="$(TARGET_DEVICE)" \
PRODUCT_NAME="$(TARGET_PRODUCT)" \
PRODUCT_BRAND="$(PRODUCT_BRAND)" \
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
index ed6bd87..a80b2db 100755
--- a/tools/buildinfo.sh
+++ b/tools/buildinfo.sh
@@ -16,6 +16,7 @@
echo "ro.build.user=$USER"
echo "ro.build.host=`hostname`"
echo "ro.build.tags=$BUILD_VERSION_TAGS"
+echo "ro.build.flavor=$TARGET_BUILD_FLAVOR"
echo "ro.product.model=$PRODUCT_MODEL"
echo "ro.product.brand=$PRODUCT_BRAND"
echo "ro.product.name=$PRODUCT_NAME"