Write ro.build.ab_update to /vendor/build.prop.

It's a vendor-specific property, which was historically included into
/system/build.prop prior to this change.

Whether a target uses A/B OTA shouldn't affect anything on the system
image, including the `ro.build_ab_update` property. Moving it to vendor
partition will also make it consistent with other A/B specific configs,
such as the `slotselect` flag in device fstab
(/vendor/etc/fstab.$(PRODUCT_PLATFORM)).

Bug: 130516531
Test: Build and flash crosshatch-userdebug. Check /system/build.prop,
      /vendor/build.prop and the runtime property.
Change-Id: I927625fbcc02c4a875a1f39850b51576f5ff6c66
This commit is contained in:
Tao Bao
2019-04-19 00:09:16 -07:00
parent 22c434e80f
commit 67932ab694
2 changed files with 3 additions and 4 deletions

View File

@@ -421,7 +421,6 @@ endif
BUILD_HOSTNAME="$(BUILD_HOSTNAME)" \
BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \
BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \
AB_OTA_UPDATER="$(AB_OTA_UPDATER)" \
PLATFORM_VERSION="$(PLATFORM_VERSION)" \
PLATFORM_SECURITY_PATCH="$(PLATFORM_SECURITY_PATCH)" \
PLATFORM_BASE_OS="$(PLATFORM_BASE_OS)" \
@@ -497,6 +496,9 @@ $(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(intermediate_sys
$(hide) echo ro.board.platform="$(TARGET_BOARD_PLATFORM)">>$@
ifdef TARGET_SCREEN_DENSITY
$(hide) echo ro.sf.lcd_density="$(TARGET_SCREEN_DENSITY)">>$@
endif
ifeq ($(AB_OTA_UPDATER),true)
$(hide) echo ro.build.ab_update=true >> $@
endif
$(hide) $(call generate-common-build-props,vendor,$@)
$(hide) echo "#" >> $@; \

View File

@@ -25,9 +25,6 @@ echo "ro.build.flavor=$TARGET_BUILD_FLAVOR"
if [ -n "$BOARD_BUILD_SYSTEM_ROOT_IMAGE" ] ; then
echo "ro.build.system_root_image=$BOARD_BUILD_SYSTEM_ROOT_IMAGE"
fi
if [ -n "$AB_OTA_UPDATER" ] ; then
echo "ro.build.ab_update=$AB_OTA_UPDATER"
fi
# These values are deprecated, use "ro.product.cpu.abilist"
# instead (see below).