From 67932ab694e636c48b332d702982c649cd969338 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 19 Apr 2019 00:09:16 -0700 Subject: [PATCH] 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 --- core/Makefile | 4 +++- tools/buildinfo.sh | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/Makefile b/core/Makefile index 8a960b6d90..5bce014c44 100644 --- a/core/Makefile +++ b/core/Makefile @@ -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 "#" >> $@; \ diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh index 24ac663f20..09d8f70f55 100755 --- a/tools/buildinfo.sh +++ b/tools/buildinfo.sh @@ -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).