Merge "Remove redundant entries from treble_common.mk" into pi-dev
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 0b99514..f8cb2fb 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -45,6 +45,7 @@
$(call add_json_str, BuildId, $(BUILD_ID))
$(call add_json_str, BuildNumberFromFile, $$$(BUILD_NUMBER_FROM_FILE))
+$(call add_json_str, Platform_version_name, $(PLATFORM_VERSION))
$(call add_json_val, Platform_sdk_version, $(PLATFORM_SDK_VERSION))
$(call add_json_str, Platform_sdk_codename, $(PLATFORM_VERSION_CODENAME))
$(call add_json_bool, Platform_sdk_final, $(filter REL,$(PLATFORM_VERSION_CODENAME)))
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index cc06983..abd519e 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -59,6 +59,16 @@
BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
+# Android Verified Boot (AVB):
+# Builds a special vbmeta.img that disables AVB verification.
+# Otherwise, AVB will prevent the device from booting the generic system.img.
+# Also checks that BOARD_AVB_ENABLE is not set, to prevent adding verity
+# metadata into system.img.
+ifeq ($(BOARD_AVB_ENABLE),true)
+$(error BOARD_AVB_ENABLE cannot be set for GSI)
+endif
+BOARD_BUILD_DISABLED_VBMETAIMAGE := true
+
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
# GSI is always userdebug and needs a couple of properties taking precedence
# over those set by the vendor.
diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk
index 6b766a8..7fa4d8f 100644
--- a/target/board/generic_arm64/BoardConfig.mk
+++ b/target/board/generic_arm64/BoardConfig.mk
@@ -88,6 +88,16 @@
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy
+# Android Verified Boot (AVB):
+# Builds a special vbmeta.img that disables AVB verification.
+# Otherwise, AVB will prevent the device from booting the generic system.img.
+# Also checks that BOARD_AVB_ENABLE is not set, to prevent adding verity
+# metadata into system.img.
+ifeq ($(BOARD_AVB_ENABLE),true)
+$(error BOARD_AVB_ENABLE cannot be set for GSI)
+endif
+BOARD_BUILD_DISABLED_VBMETAIMAGE := true
+
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
# GSI is always userdebug and needs a couple of properties taking precedence
# over those set by the vendor.
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index 693aa6c..54f37b4 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -62,6 +62,16 @@
build/target/board/generic/sepolicy \
build/target/board/generic_x86/sepolicy
+# Android Verified Boot (AVB):
+# Builds a special vbmeta.img that disables AVB verification.
+# Otherwise, AVB will prevent the device from booting the generic system.img.
+# Also checks that BOARD_AVB_ENABLE is not set, to prevent adding verity
+# metadata into system.img.
+ifeq ($(BOARD_AVB_ENABLE),true)
+$(error BOARD_AVB_ENABLE cannot be set for GSI)
+endif
+BOARD_BUILD_DISABLED_VBMETAIMAGE := true
+
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
# GSI is always userdebug and needs a couple of properties taking precedence
# over those set by the vendor.
diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk
index 21e4fc9..b5e0dd7 100755
--- a/target/board/generic_x86_64/BoardConfig.mk
+++ b/target/board/generic_x86_64/BoardConfig.mk
@@ -60,6 +60,16 @@
build/target/board/generic/sepolicy \
build/target/board/generic_x86/sepolicy
+# Android Verified Boot (AVB):
+# Builds a special vbmeta.img that disables AVB verification.
+# Otherwise, AVB will prevent the device from booting the generic system.img.
+# Also checks that BOARD_AVB_ENABLE is not set, to prevent adding verity
+# metadata into system.img.
+ifeq ($(BOARD_AVB_ENABLE),true)
+$(error BOARD_AVB_ENABLE cannot be set for GSI)
+endif
+BOARD_BUILD_DISABLED_VBMETAIMAGE := true
+
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
# GSI is always userdebug and needs a couple of properties taking precedence
# over those set by the vendor.
diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk
index c66f954..af78bcb 100644
--- a/target/product/aosp_arm.mk
+++ b/target/product/aosp_arm.mk
@@ -25,6 +25,10 @@
prebuilts/qemu-kernel/arm64/3.18/kernel-qemu2:kernel-ranchu-64 \
device/generic/goldfish/fstab.ranchu.arm:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.ranchu
+# TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor
+PRODUCT_PACKAGES += \
+ vr_hwc
+
include $(SRC_TARGET_DIR)/product/full.mk
PRODUCT_NAME := aosp_arm
diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk
index e7378d5..d8bf924 100644
--- a/target/product/aosp_arm64.mk
+++ b/target/product/aosp_arm64.mk
@@ -38,6 +38,10 @@
PRODUCT_COPY_FILES += \
system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
+# TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor
+PRODUCT_PACKAGES += \
+ vr_hwc
+
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk)
diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk
index 6c4d1c0..7c293b7 100644
--- a/target/product/aosp_x86.mk
+++ b/target/product/aosp_x86.mk
@@ -26,6 +26,10 @@
device/generic/goldfish/data/etc/encryptionkey.img:encryptionkey.img \
prebuilts/qemu-kernel/x86_64/4.9/kernel-qemu2:kernel-ranchu-64
+# TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor
+PRODUCT_PACKAGES += \
+ vr_hwc
+
include $(SRC_TARGET_DIR)/product/full_x86.mk
PRODUCT_NAME := aosp_x86
diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk
index 92f2cb1..55c11aa 100644
--- a/target/product/aosp_x86_64.mk
+++ b/target/product/aosp_x86_64.mk
@@ -35,6 +35,10 @@
PRODUCT_COPY_FILES += \
system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
+# TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor
+PRODUCT_PACKAGES += \
+ vr_hwc
+
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk)
diff --git a/target/product/profile_boot_common.mk b/target/product/profile_boot_common.mk
index c110509..85524fc 100644
--- a/target/product/profile_boot_common.mk
+++ b/target/product/profile_boot_common.mk
@@ -23,6 +23,9 @@
PRODUCT_DEX_PREOPT_BOOT_FLAGS := --count-hotness-in-compiled-code
DEX_PREOPT_DEFAULT := nostripping
+# Disable uncompressing priv apps so that there is enough space to build the system partition.
+DONT_UNCOMPRESS_PRIV_APPS_DEXS := true
+
# Use an empty preloaded-classes list.
PRODUCT_COPY_FILES += \
build/target/product/empty-preloaded-classes:system/etc/preloaded-classes
@@ -33,6 +36,8 @@
dalvik.vm.jitmaxsize=32m \
dalvik.vm.usejitprofiles=true \
dalvik.vm.hot-startup-method-samples=256 \
- dalvik.vm.extra-opts=-Xps-profile-boot-class-path \
dalvik.vm.profilesystemserver=true \
dalvik.vm.profilebootimage=true
+
+# Use speed compiler filter since system server doesn't have JIT.
+PRODUCT_DEX_PREOPT_BOOT_FLAGS += --compiler-filter=speed
diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk
index e170666..1c557f0 100644
--- a/target/product/treble_common.mk
+++ b/target/product/treble_common.mk
@@ -63,3 +63,7 @@
# Set current VNDK version for GSI
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.gsi.vndk.version=$(PLATFORM_VNDK_VERSION)
+
+# TODO(b/78308559): includes vr_hwc into GSI before vr_hwc move to vendor
+PRODUCT_PACKAGES += \
+ vr_hwc
diff --git a/target/product/vndk/28.txt b/target/product/vndk/28.txt
index 2993512..38241f5 100644
--- a/target/product/vndk/28.txt
+++ b/target/product/vndk/28.txt
@@ -155,8 +155,6 @@
VNDK-core: libaudioroute.so
VNDK-core: libaudioutils.so
VNDK-core: libbinder.so
-VNDK-core: libbufferhub.so
-VNDK-core: libbufferhubqueue.so
VNDK-core: libcamera_metadata.so
VNDK-core: libcap.so
VNDK-core: libcn-cbor.so
@@ -190,7 +188,6 @@
VNDK-core: libopus.so
VNDK-core: libpagemap.so
VNDK-core: libpcre2.so
-VNDK-core: libpdx_default_transport.so
VNDK-core: libpiex.so
VNDK-core: libpng.so
VNDK-core: libpower.so
@@ -248,10 +245,7 @@
VNDK-core: libziparchive.so
VNDK-private: libbacktrace.so
VNDK-private: libblas.so
-VNDK-private: libbufferhub.so
-VNDK-private: libbufferhubqueue.so
VNDK-private: libcompiler_rt.so
VNDK-private: libft2.so
VNDK-private: libgui.so
-VNDK-private: libpdx_default_transport.so
VNDK-private: libunwind.so
diff --git a/target/product/vndk/current.txt b/target/product/vndk/current.txt
index 2993512..38241f5 100644
--- a/target/product/vndk/current.txt
+++ b/target/product/vndk/current.txt
@@ -155,8 +155,6 @@
VNDK-core: libaudioroute.so
VNDK-core: libaudioutils.so
VNDK-core: libbinder.so
-VNDK-core: libbufferhub.so
-VNDK-core: libbufferhubqueue.so
VNDK-core: libcamera_metadata.so
VNDK-core: libcap.so
VNDK-core: libcn-cbor.so
@@ -190,7 +188,6 @@
VNDK-core: libopus.so
VNDK-core: libpagemap.so
VNDK-core: libpcre2.so
-VNDK-core: libpdx_default_transport.so
VNDK-core: libpiex.so
VNDK-core: libpng.so
VNDK-core: libpower.so
@@ -248,10 +245,7 @@
VNDK-core: libziparchive.so
VNDK-private: libbacktrace.so
VNDK-private: libblas.so
-VNDK-private: libbufferhub.so
-VNDK-private: libbufferhubqueue.so
VNDK-private: libcompiler_rt.so
VNDK-private: libft2.so
VNDK-private: libgui.so
-VNDK-private: libpdx_default_transport.so
VNDK-private: libunwind.so