Merge "Update the references to verity tools."
diff --git a/Deprecation.md b/Deprecation.md
index 6468f46..01825b2 100644
--- a/Deprecation.md
+++ b/Deprecation.md
@@ -14,8 +14,8 @@
| Module type | State |
| -------------------------- | --------- |
-| `BUILD_HOST_TEST_CONFIG` | Warning |
-| `BUILD_TARGET_TEST_CONFIG` | Warning |
+| `BUILD_HOST_TEST_CONFIG` | Error |
+| `BUILD_TARGET_TEST_CONFIG` | Error |
| `BUILD_*` | Available |
## Module Type Deprecation Process
diff --git a/core/Makefile b/core/Makefile
index 9fd9b44..4565b3f 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2163,37 +2163,37 @@
# art/build/apex/art_apex_test.py.
# TODO(b/128708192): Implement this restriction in Soong instead.
-# TODO(b/124293228): Fix remaining bugs and add these libraries to the list:
-# libart-compiler.so
-# libart-dexlayout.so
-# libart.so
-# libartbase.so
-# libartpalette.so
-# libdexfile.so
-# libdexfile_external.so - aosp_marlin-userdebug gets this in a vndk-sp-Q subdirectory.
-# libicui18n.so
-# libicuuc.so
-# libnativehelper.so - cf_x86_phone-userdebug builds get this in system/lib/arm
-# libprofile.so
-# libsigchain.so - cf_x86_phone-userdebug builds get this in system/lib/arm
-# libtombstoned_client.so
+# Runtime APEX libraries
APEX_MODULE_LIBS := \
libadbconnection.so \
libandroidicu.so \
libandroidio.so \
+ libart-compiler.so \
+ libart-dexlayout.so \
+ libart.so \
+ libartbase.so \
+ libartpalette.so \
+ libdexfile.so \
+ libdexfile_external.so \
+ libdexfiled_external.so \
libdt_fd_forward.so \
libdt_socket.so \
+ libicui18n.so \
+ libicuuc.so \
libjavacore.so \
libjdwp.so \
libnativebridge.so \
+ libnativehelper.so \
libnativeloader.so \
libnpt.so \
libopenjdk.so \
libopenjdkjvm.so \
libopenjdkjvmti.so \
libpac.so \
+ libprofile.so \
+ libsigchain.so \
-# Conscrypt APEX_MODULE_LIBS
+# Conscrypt APEX libraries
APEX_MODULE_LIBS += \
libjavacrypto.so \
diff --git a/core/deprecation.mk b/core/deprecation.mk
index cbc938a..9d57527 100644
--- a/core/deprecation.mk
+++ b/core/deprecation.mk
@@ -37,13 +37,13 @@
# relevant BUILD_BROKEN_USES_BUILD_* variables, then these would move to
# DEFAULT_ERROR_BUILD_MODULE_TYPES.
DEFAULT_WARNING_BUILD_MODULE_TYPES :=$= \
- BUILD_HOST_TEST_CONFIG \
- BUILD_TARGET_TEST_CONFIG \
# These are BUILD_* variables that are errors to reference, but you can set
# BUILD_BROKEN_USES_BUILD_* in your BoardConfig.mk in order to turn them back
# to warnings.
DEFAULT_ERROR_BUILD_MODULE_TYPES :=$= \
+ BUILD_HOST_TEST_CONFIG \
+ BUILD_TARGET_TEST_CONFIG \
# These are BUILD_* variables that are always errors to reference.
# Setting the BUILD_BROKEN_USES_BUILD_* variables is also an error.
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 180edaf..32690fe 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -26,7 +26,7 @@
# We can do this only if preopt is enabled and if the product uses libart config (which sets the
# default properties for preopting).
ifeq ($(WITH_DEXPREOPT), true)
-ifeq ($(PRODUCT_USES_ART), true)
+ifeq ($(PRODUCT_USES_DEFAULT_ART_CONFIG), true)
boot_zip := $(PRODUCT_OUT)/boot.zip
bootclasspath_jars := $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES)
@@ -45,5 +45,5 @@
$(call dist-for-goals, droidcore, $(boot_zip))
-endif #PRODUCT_USES_ART
+endif #PRODUCT_USES_DEFAULT_ART_CONFIG
endif #WITH_DEXPREOPT
diff --git a/core/generate_enforce_rro.mk b/core/generate_enforce_rro.mk
index f7877f2..6a23aeb 100644
--- a/core/generate_enforce_rro.mk
+++ b/core/generate_enforce_rro.mk
@@ -34,7 +34,6 @@
endif
LOCAL_FULL_MANIFEST_FILE := $(rro_android_manifest_file)
-LOCAL_CERTIFICATE := platform
LOCAL_AAPT_FLAGS += --auto-add-overlay
LOCAL_RESOURCE_DIR := $(enforce_rro_source_overlays)
diff --git a/core/product.mk b/core/product.mk
index f3c9a98..66570e4 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -246,7 +246,7 @@
_product_var_list += \
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE \
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION \
- PRODUCT_USES_ART \
+ PRODUCT_USES_DEFAULT_ART_CONFIG \
_product_var_list += PRODUCT_SYSTEM_SERVER_COMPILER_FILTER
# Per-module sanitizer configs
diff --git a/target/board/BoardConfigEmuCommon.mk b/target/board/BoardConfigEmuCommon.mk
index c871d7e..9ec71d0 100644
--- a/target/board/BoardConfigEmuCommon.mk
+++ b/target/board/BoardConfigEmuCommon.mk
@@ -26,7 +26,7 @@
# ~140 MB vendor image. Please adjust system image / vendor image sizes
# when finalizing them. The partition size needs to be a multiple of image
# block size: 4096.
-BOARD_VENDORIMAGE_PARTITION_SIZE := 140963840
+BOARD_VENDORIMAGE_PARTITION_SIZE := 146800640
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_FLASH_BLOCK_SIZE := 512
DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml
diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk
index a88ba3c..5db32f2 100644
--- a/target/product/runtime_libart.mk
+++ b/target/product/runtime_libart.mk
@@ -96,4 +96,4 @@
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.iorapd.enable=false
-PRODUCT_USES_ART := true
+PRODUCT_USES_DEFAULT_ART_CONFIG := true
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py
index 4af10ca..99ffa31 100755
--- a/tools/releasetools/add_img_to_target_files.py
+++ b/tools/releasetools/add_img_to_target_files.py
@@ -113,7 +113,7 @@
Returns:
(which, care_map_ranges): care_map_ranges is the raw string of the care_map
- RangeSet; or an empty list.
+ RangeSet; or None.
"""
assert which in common.PARTITIONS_WITH_CARE_MAP
@@ -123,7 +123,7 @@
# invalid reads.
image_size = OPTIONS.info_dict.get(which + "_image_size")
if not image_size:
- return []
+ return None
image_blocks = int(image_size) / 4096 - 1
assert image_blocks > 0, "blocks for {} must be positive".format(which)
@@ -592,7 +592,11 @@
OPTIONS.info_dict.get(avb_hashtree_enable) == "true"):
image_path = image_paths[partition]
assert os.path.exists(image_path)
- care_map_list += GetCareMap(partition, image_path)
+
+ care_map = GetCareMap(partition, image_path)
+ if not care_map:
+ continue
+ care_map_list += care_map
# adds fingerprint field to the care_map
build_props = OPTIONS.info_dict.get(partition + ".build.prop", {})
diff --git a/tools/releasetools/test_add_img_to_target_files.py b/tools/releasetools/test_add_img_to_target_files.py
index 422262c..08e0190 100644
--- a/tools/releasetools/test_add_img_to_target_files.py
+++ b/tools/releasetools/test_add_img_to_target_files.py
@@ -283,6 +283,35 @@
self._verifyCareMap(expected, care_map_file)
+ @test_utils.SkipIfExternalToolsUnavailable()
+ def test_AddCareMapForAbOta_skipPartition(self):
+ image_paths = self._test_AddCareMapForAbOta()
+
+ # Remove vendor_image_size to invalidate the care_map for vendor.img.
+ del OPTIONS.info_dict['vendor_image_size']
+
+ AddCareMapForAbOta(None, ['system', 'vendor'], image_paths)
+
+ care_map_file = os.path.join(OPTIONS.input_tmp, 'META', 'care_map.pb')
+ expected = ['system', RangeSet("0-5 10-15").to_string_raw(),
+ "ro.system.build.fingerprint",
+ "google/sailfish/12345:user/dev-keys"]
+
+ self._verifyCareMap(expected, care_map_file)
+
+ @test_utils.SkipIfExternalToolsUnavailable()
+ def test_AddCareMapForAbOta_skipAllPartitions(self):
+ image_paths = self._test_AddCareMapForAbOta()
+
+ # Remove the image_size properties for all the partitions.
+ del OPTIONS.info_dict['system_image_size']
+ del OPTIONS.info_dict['vendor_image_size']
+
+ AddCareMapForAbOta(None, ['system', 'vendor'], image_paths)
+
+ self.assertFalse(
+ os.path.exists(os.path.join(OPTIONS.input_tmp, 'META', 'care_map.pb')))
+
def test_AddCareMapForAbOta_verityNotEnabled(self):
"""No care_map.pb should be generated if verity not enabled."""
image_paths = self._test_AddCareMapForAbOta()