Merge "Fixes typo when calling process_dynamic_partitions_info_txt."
diff --git a/Deprecation.md b/Deprecation.md
index 405a39e..0d925cb 100644
--- a/Deprecation.md
+++ b/Deprecation.md
@@ -18,9 +18,11 @@
 | `BUILD_AUX_STATIC_LIBRARY`       | Warning   |
 | `BUILD_HOST_FUZZ_TEST`           | Warning   |
 | `BUILD_HOST_NATIVE_TEST`         | Warning   |
+| `BUILD_HOST_SHARED_TEST_LIBRARY` | Error     |
 | `BUILD_HOST_STATIC_TEST_LIBRARY` | Warning   |
 | `BUILD_HOST_TEST_CONFIG`         | Error     |
 | `BUILD_NATIVE_BENCHMARK`         | Warning   |
+| `BUILD_SHARED_TEST_LIBRARY`      | Error     |
 | `BUILD_STATIC_TEST_LIBRARY`      | Warning   |
 | `BUILD_TARGET_TEST_CONFIG`       | Error     |
 | `BUILD_*`                        | Available |
diff --git a/core/board_config.mk b/core/board_config.mk
index 62d779c..597b10e 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -534,6 +534,14 @@
   TARGET_VENDOR_TEST_SUFFIX :=
 endif
 
+###########################################
+# APEXes are by default flattened, i.e. non-updatable.
+# It can be unflattened (and updatable) by inheriting from
+# updatable_apex.mk
+ifeq (,$(TARGET_FLATTEN_APEX))
+TARGET_FLATTEN_APEX := true
+endif
+
 ifeq (,$(TARGET_BUILD_APPS))
 ifdef PRODUCT_EXTRA_VNDK_VERSIONS
   $(foreach v,$(PRODUCT_EXTRA_VNDK_VERSIONS),$(call check_vndk_version,$(v)))
diff --git a/core/deprecation.mk b/core/deprecation.mk
index 0b668ac..11fe290 100644
--- a/core/deprecation.mk
+++ b/core/deprecation.mk
@@ -10,7 +10,6 @@
   BUILD_HOST_JAVA_LIBRARY \
   BUILD_HOST_PREBUILT \
   BUILD_HOST_SHARED_LIBRARY \
-  BUILD_HOST_SHARED_TEST_LIBRARY \
   BUILD_HOST_STATIC_LIBRARY \
   BUILD_JAVA_LIBRARY \
   BUILD_MULTI_PREBUILT \
@@ -21,7 +20,6 @@
   BUILD_PREBUILT \
   BUILD_RRO_PACKAGE \
   BUILD_SHARED_LIBRARY \
-  BUILD_SHARED_TEST_LIBRARY \
   BUILD_STATIC_JAVA_LIBRARY \
   BUILD_STATIC_LIBRARY \
 
@@ -48,6 +46,8 @@
 # These are BUILD_* variables that are always errors to reference.
 # Setting the BUILD_BROKEN_USES_BUILD_* variables is also an error.
 OBSOLETE_BUILD_MODULE_TYPES :=$= \
+  BUILD_HOST_SHARED_TEST_LIBRARY \
+  BUILD_SHARED_TEST_LIBRARY \
 
 $(foreach m,$(OBSOLETE_BUILD_MODULE_TYPES),\
   $(KATI_obsolete_var $(m),Please convert to Soong) \
diff --git a/core/main.mk b/core/main.mk
index dce78fb..df5c13c 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1200,31 +1200,44 @@
 # Runtime APEX libraries
 APEX_MODULE_LIBS := \
   libadbconnection.so \
+  libadbconnectiond.so \
   libandroidicu.so \
   libandroidio.so \
   libart-compiler.so \
   libart-dexlayout.so \
+  libart-disassembler.so \
   libart.so \
   libartbase.so \
+  libartbased.so \
+  libartd-compiler.so \
+  libartd-dexlayout.so \
+  libartd.so \
   libartpalette.so \
+  libc.so \
   libdexfile.so \
   libdexfile_external.so \
+  libdexfiled.so \
   libdexfiled_external.so \
+  libdl.so \
   libdt_fd_forward.so \
   libdt_socket.so \
   libicui18n.so \
   libicuuc.so \
   libjavacore.so \
   libjdwp.so \
+  libm.so \
   libnativebridge.so \
   libnativehelper.so \
   libnativeloader.so \
   libnpt.so \
   libopenjdk.so \
   libopenjdkjvm.so \
+  libopenjdkjvmd.so \
   libopenjdkjvmti.so \
+  libopenjdkjvmtid.so \
   libpac.so \
   libprofile.so \
+  libprofiled.so \
   libsigchain.so \
 
 # Conscrypt APEX libraries
@@ -1235,6 +1248,9 @@
 # still may create these libraries in /system (b/129006418).
 DISABLE_APEX_LIBS_ABSENCE_CHECK ?=
 
+# Bionic should not be in /system, except for the bootstrap instance.
+APEX_LIBS_ABSENCE_CHECK_EXCLUDE := lib/bootstrap lib64/bootstrap
+
 # Exclude lib/arm and lib/arm64 which contain the native bridge proxy libs. They
 # are compiled for the guest architecture and used with an entirely different
 # linker config. The native libs are then linked to as usual via exported
@@ -1242,7 +1258,7 @@
 # native architecture.
 # TODO(b/130630776): Introduce a make variable for the appropriate directory
 # when native bridge is active.
-APEX_LIBS_ABSENCE_CHECK_EXCLUDE := lib/arm lib/arm64
+APEX_LIBS_ABSENCE_CHECK_EXCLUDE += lib/arm lib/arm64
 
 # Exclude vndk-* subdirectories which contain prebuilts from older releases.
 APEX_LIBS_ABSENCE_CHECK_EXCLUDE += lib/vndk-% lib64/vndk-%
diff --git a/core/product.mk b/core/product.mk
index 8716e3e..1a566f7 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -302,6 +302,9 @@
 # A flag to override PRODUCT_COMPATIBLE_PROPERTY
 _product_single_value_vars += PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE
 
+# List of extra VNDK versions to be included
+_product_list_vars += PRODUCT_EXTRA_VNDK_VERSIONS
+
 # Whether the whitelist of actionable compatible properties should be disabled or not
 _product_single_value_vars += PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE
 
diff --git a/target/product/updatable_apex.mk b/target/product/updatable_apex.mk
index 4b31578..038f66e 100644
--- a/target/product/updatable_apex.mk
+++ b/target/product/updatable_apex.mk
@@ -18,3 +18,4 @@
 
 PRODUCT_PROPERTY_OVERRIDES := ro.apex.updatable=true
 PRODUCT_PACKAGES := com.android.apex.cts.shim.v1_prebuilt
+TARGET_FLATTEN_APEX := false