Merge "Add SBOM metadata for symlinks in root directory so they can be included in product SBOMs." into main
diff --git a/core/Makefile b/core/Makefile
index 07d705e..6f40063 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -7118,6 +7118,7 @@
PATH=$(INTERNAL_USERIMAGES_BINARY_PATHS):$(dir $(ZIP2ZIP)):$$PATH \
$(IMG_FROM_TARGET_FILES) \
--additional IMAGES/VerifiedBootParams.textproto:VerifiedBootParams.textproto \
+ --build_super_image $(BUILD_SUPER_IMAGE) \
$(BUILT_TARGET_FILES_PACKAGE) $@
$(call declare-1p-container,$(INTERNAL_UPDATE_PACKAGE_TARGET),)
diff --git a/core/soong_config.mk b/core/soong_config.mk
index bd6cfbb..e514475 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -151,7 +151,7 @@
$(call add_json_bool, Malloc_pattern_fill_contents, $(MALLOC_PATTERN_FILL_CONTENTS))
$(call add_json_str, Override_rs_driver, $(OVERRIDE_RS_DRIVER))
$(call add_json_str, DeviceMaxPageSizeSupported, $(TARGET_MAX_PAGE_SIZE_SUPPORTED))
-$(call add_json_bool, Device_page_size_agnostic, $(filter true,$(TARGET_PAGE_SIZE_AGNOSTIC)))
+$(call add_json_bool, DevicePageSizeAgnostic, $(filter true,$(TARGET_PAGE_SIZE_AGNOSTIC)))
$(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS))))
$(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))
diff --git a/tools/aconfig/Android.bp b/tools/aconfig/Android.bp
index 93fd6f7..a3f63a9 100644
--- a/tools/aconfig/Android.bp
+++ b/tools/aconfig/Android.bp
@@ -152,3 +152,19 @@
"server_configurable_flags",
],
}
+
+rust_aconfig_library {
+ name: "libaconfig_test_rust_library",
+ crate_name: "aconfig_test_rust_library",
+ aconfig_declarations: "aconfig.test.flags",
+}
+
+rust_test {
+ name: "aconfig.test.rust",
+ srcs: [
+ "tests/aconfig_test.rs"
+ ],
+ rustlibs: [
+ "libaconfig_test_rust_library",
+ ],
+}
\ No newline at end of file
diff --git a/tools/aconfig/tests/aconfig_test.rs b/tools/aconfig/tests/aconfig_test.rs
new file mode 100644
index 0000000..dbfe141
--- /dev/null
+++ b/tools/aconfig/tests/aconfig_test.rs
@@ -0,0 +1,7 @@
+#[test]
+fn test_flags() {
+ assert!(!aconfig_test_rust_library::disabled_ro());
+ assert!(!aconfig_test_rust_library::disabled_rw());
+ assert!(aconfig_test_rust_library::enabled_ro());
+ assert!(aconfig_test_rust_library::enabled_rw());
+}
diff --git a/tools/releasetools/img_from_target_files.py b/tools/releasetools/img_from_target_files.py
index fa53ad2..5412b2a 100755
--- a/tools/releasetools/img_from_target_files.py
+++ b/tools/releasetools/img_from_target_files.py
@@ -65,6 +65,7 @@
OPTIONS.build_super = None
OPTIONS.sparse_userimages = None
OPTIONS.use_fastboot_info = False
+OPTIONS.build_super_image = None
def LoadOptions(input_file):
"""Loads information from input_file to OPTIONS.
@@ -174,7 +175,13 @@
input_tmp = common.UnzipTemp(input_file)
super_file = common.MakeTempFile('super_', '.img')
- BuildSuperImage(input_tmp, super_file)
+
+ # Allow overriding the BUILD_SUPER_IMAGE binary
+ if OPTIONS.build_super_image:
+ command = [OPTIONS.build_super_image, input_tmp, super_file]
+ common.RunAndCheckOutput(command)
+ else:
+ BuildSuperImage(input_tmp, super_file)
logger.info('Writing super.img to archive...')
with zipfile.ZipFile(
@@ -231,6 +238,8 @@
OPTIONS.bootable_only = True
elif o == '--additional':
OPTIONS.additional_entries.append(a)
+ elif o == '--build_super_image':
+ OPTIONS.build_super_image = a
else:
return False
return True
@@ -240,6 +249,7 @@
extra_long_opts=[
'additional=',
'bootable_zip',
+ 'build_super_image=',
],
extra_option_handler=option_handler)
if len(args) != 2: