Merge "zipalign/ziptime: use ftello()/fseeko()."
diff --git a/core/Makefile b/core/Makefile
index 7a9dfe8..b5f5b35 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -3492,6 +3492,18 @@
INTERNAL_VENDORIMAGE_FILES += $(call create-partition-compat-symlink,$(TARGET_OUT_VENDOR)/lib/modules,/vendor_dlkm/lib/modules,vendor_dlkm.img)
endif
+# Install vendor/etc/linker.config.pb when PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS is set
+ifneq ($(strip $(PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS)),)
+vendor_linker_config_file := $(TARGET_OUT_VENDOR)/etc/linker.config.pb
+$(vendor_linker_config_file): private_linker_config_fragments := $(PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS)
+$(vendor_linker_config_file): $(PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS) | $(HOST_OUT_EXECUTABLES)/conv_linker_config
+ $(HOST_OUT_EXECUTABLES)/conv_linker_config proto \
+ --source $(call normalize-path-list,$(private_linker_config_fragments)) \
+ --output $@
+$(call define declare-0p-target,$(vendor_linker_config_file),)
+INTERNAL_VENDORIMAGE_FILES += $(vendor_linker_config_file)
+endif
+
INSTALLED_FILES_FILE_VENDOR := $(PRODUCT_OUT)/installed-files-vendor.txt
INSTALLED_FILES_JSON_VENDOR := $(INSTALLED_FILES_FILE_VENDOR:.txt=.json)
$(INSTALLED_FILES_FILE_VENDOR): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_VENDOR)
diff --git a/core/product.mk b/core/product.mk
index 7621c71..3b22314 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -373,6 +373,9 @@
# If true, installs a full version of com.android.virt APEX.
_product_single_value_vars += PRODUCT_AVF_ENABLED
+# List of .json files to be merged/compiled into vendor/etc/linker.config.pb
+_product_list_vars += PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS
+
# Whether to use userfaultfd GC.
# Possible values are:
# - "default" or empty: both the build system and the runtime determine whether to use userfaultfd
diff --git a/target/product/module_common.mk b/target/product/module_common.mk
index 54f3949..ec670ee 100644
--- a/target/product/module_common.mk
+++ b/target/product/module_common.mk
@@ -25,3 +25,8 @@
# Builds using a module product should build modules from source, even if
# BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE says otherwise.
PRODUCT_MODULE_BUILD_FROM_SOURCE := true
+
+# Build sdk from source if the branch is not using slim manifests.
+ifneq (,$(strip $(wildcard frameworks/base/Android.bp)))
+ UNBUNDLED_BUILD_SDKS_FROM_SOURCE := true
+endif
diff --git a/tests/b_tests.sh b/tests/b_tests.sh
index 45cb4f7..13f156d 100755
--- a/tests/b_tests.sh
+++ b/tests/b_tests.sh
@@ -27,6 +27,10 @@
b build "$test_target" --run-soong-tests
b build --run-soong-tests "$test_target"
b --run-soong-tests build "$test_target"
+# Test that the bazel server can be restarted once shut down. If run in a
+# docker container, you need to run the docker container with --init or
+# have some other process as PID 1 that can reap zombies.
+b shutdown
b cquery 'kind(test, //build/bazel/examples/android_app/...)' --config=android
b run $test_target -- --help >/dev/null
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 5f48dd0..0dd0790 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -531,7 +531,12 @@
# RECOVERY/RAMDISK/default.prop is a legacy path, but will always exist
# as a symlink in the current code. So it's a no-op here. Keeping the
# path here for clarity.
- "RECOVERY/RAMDISK/default.prop") or filename.endswith("build.prop")
+ # Some build props might be stored under path
+ # VENDOR_BOOT/RAMDISK_FRAGMENTS/recovery/RAMDISK/default.prop
+ # so overwrite all files that ends with build.prop or default.prop
+ "RECOVERY/RAMDISK/default.prop") or \
+ filename.endswith("build.prop") or \
+ filename.endswith("/default.prop")
def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,