Merge "Add mainline_system_x86_64 product"
diff --git a/Changes.md b/Changes.md
index 461de97..5a0fd23 100644
--- a/Changes.md
+++ b/Changes.md
@@ -1,5 +1,48 @@
# Build System Changes for Android.mk Writers
+## LOCAL_C_INCLUDES outside the source/output trees are an error {#BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS}
+
+Include directories are expected to be within the source tree (or in the output
+directory, generated during the build). This has been checked in some form
+since Oreo, but now has better checks.
+
+There's now a `BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS` variable, that when set, will
+turn these errors into warnings temporarily. I don't expect this to last more
+than a release, since they're fairly easy to clean up.
+
+Neither of these cases are supported by Soong, and will produce errors when
+converting your module.
+
+### Absolute paths
+
+This has been checked since Oreo. The common reason to hit this is because a
+makefile is calculating a path, and ran abspath/realpath/etc. This is a problem
+because it makes your build non-reproducible. It's very unlikely that your
+source path is the same on every machine.
+
+### Using `../` to leave the source/output directories
+
+This is the new check that has been added. In every case I've found, this has
+been a mistake in the Android.mk -- assuming that `LOCAL_C_INCLUDES` (which is
+relative to the top of the source tree) acts like `LOCAL_SRC_FILES` (which is
+relative to `LOCAL_PATH`).
+
+Since this usually isn't a valid path, you can almost always just remove the
+offending line.
+
+
+# `BOARD_HAL_STATIC_LIBRARIES` and `LOCAL_HAL_STATIC_LIBRARIES` are obsolete {#BOARD_HAL_STATIC_LIBRARIES}
+
+Define proper HIDL / Stable AIDL HAL instead.
+
+* For libhealthd, use health HAL. See instructions for implementing
+ health HAL:
+
+ * [hardware/interfaces/health/2.1/README.md] for health 2.1 HAL (recommended)
+ * [hardware/interfaces/health/1.0/README.md] for health 1.0 HAL
+
+* For libdumpstate, use at least Dumpstate HAL 1.0.
+
## PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete {#PRODUCT_STATIC_BOOT_CONTROL_HAL}
`PRODUCT_STATIC_BOOT_CONTROL_HAL` was the workaround to allow sideloading with
@@ -480,3 +523,5 @@
[external/fonttools/Lib/fontTools/Android.bp]: https://android.googlesource.com/platform/external/fonttools/+/master/Lib/fontTools/Android.bp
[frameworks/base/Android.bp]: https://android.googlesource.com/platform/frameworks/base/+/master/Android.bp
[frameworks/base/data/fonts/Android.mk]: https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/Android.mk
+[hardware/interfaces/health/1.0/README.md]: https://android.googlesource.com/platform/hardware/interfaces/+/master/health/1.0/README.md
+[hardware/interfaces/health/2.1/README.md]: https://android.googlesource.com/platform/hardware/interfaces/+/master/health/2.1/README.md
diff --git a/core/Makefile b/core/Makefile
index bec8cfc..9946d42 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -670,10 +670,11 @@
# $(4): staging dir
# $(5): module load list
# $(6): module load list filename
+# $(7): module archive
# Returns the a list of src:dest pairs to install the modules using copy-many-files.
define build-image-kernel-modules
$(foreach module,$(1),$(module):$(2)/lib/modules/$(notdir $(module))) \
- $(eval $(call build-image-kernel-modules-depmod,$(1),$(3),$(4),$(5),$(6))) \
+ $(eval $(call build-image-kernel-modules-depmod,$(1),$(3),$(4),$(5),$(6),$(7),$(2))) \
$(4)/$(DEPMOD_STAGING_SUBDIR)/modules.dep:$(2)/lib/modules/modules.dep \
$(4)/$(DEPMOD_STAGING_SUBDIR)/modules.alias:$(2)/lib/modules/modules.alias \
$(4)/$(DEPMOD_STAGING_SUBDIR)/modules.softdep:$(2)/lib/modules/modules.softdep \
@@ -685,6 +686,13 @@
# $(3): staging dir
# $(4): module load list
# $(5): module load list filename
+# $(6): module archive
+# $(7): output dir
+# TODO(b/144844424): If a module archive is being used, this step (which
+# generates obj/PACKAGING/.../modules.dep) also unzips the module archive into
+# the output directory. This should be moved to a module with a
+# LOCAL_POST_INSTALL_CMD so that if modules.dep is removed from the output dir,
+# the archive modules are restored along with modules.dep.
define build-image-kernel-modules-depmod
$(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: .KATI_IMPLICIT_OUTPUTS := $(3)/$(DEPMOD_STAGING_SUBDIR)/modules.alias $(3)/$(DEPMOD_STAGING_SUBDIR)/modules.softdep $(3)/$(DEPMOD_STAGING_SUBDIR)/$(5)
$(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: $(DEPMOD)
@@ -694,16 +702,29 @@
$(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: PRIVATE_STAGING_DIR := $(3)
$(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: PRIVATE_LOAD_MODULES := $(4)
$(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: PRIVATE_LOAD_FILE := $(3)/$(DEPMOD_STAGING_SUBDIR)/$(5)
-$(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: $(1)
+$(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: PRIVATE_MODULE_ARCHIVE := $(6)
+$(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: PRIVATE_OUTPUT_DIR := $(7)
+$(3)/$(DEPMOD_STAGING_SUBDIR)/modules.dep: $(1) $(6)
@echo depmod $$(PRIVATE_STAGING_DIR)
rm -rf $$(PRIVATE_STAGING_DIR)
mkdir -p $$(PRIVATE_MODULE_DIR)
- cp $$(PRIVATE_MODULES) $$(PRIVATE_MODULE_DIR)/
+ $(if $(6),\
+ unzip -qo -d $$(PRIVATE_MODULE_DIR) $$(PRIVATE_MODULE_ARCHIVE); \
+ mkdir -p $$(PRIVATE_OUTPUT_DIR)/lib; \
+ rm -rf $$(PRIVATE_OUTPUT_DIR)/lib/modules; \
+ cp -r $$(PRIVATE_MODULE_DIR) $$(PRIVATE_OUTPUT_DIR)/lib/; \
+ find $$(PRIVATE_MODULE_DIR) -type f -name *.ko | xargs basename -a > $$(PRIVATE_LOAD_FILE); \
+ )
+ $(if $(1),\
+ cp $$(PRIVATE_MODULES) $$(PRIVATE_MODULE_DIR)/; \
+ for MODULE in $$(PRIVATE_LOAD_MODULES); do \
+ basename $$$$MODULE >> $$(PRIVATE_LOAD_FILE); \
+ done; \
+ )
$(DEPMOD) -b $$(PRIVATE_STAGING_DIR) 0.0
# Turn paths in modules.dep into absolute paths
sed -i.tmp -e 's|\([^: ]*lib/modules/[^: ]*\)|/\1|g' $$(PRIVATE_STAGING_DIR)/$$(DEPMOD_STAGING_SUBDIR)/modules.dep
touch $$(PRIVATE_LOAD_FILE)
- (for MODULE in $$(PRIVATE_LOAD_MODULES); do basename $$$$MODULE >> $$(PRIVATE_LOAD_FILE); done)
endef
# $(1): staging dir
@@ -747,40 +768,40 @@
endif
endif
-ifneq ($(strip $(BOARD_RECOVERY_KERNEL_MODULES)),)
+ifneq ($(strip $(BOARD_RECOVERY_KERNEL_MODULES))$(strip $(BOARD_RECOVERY_KERNEL_MODULES_ARCHIVE)),)
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT), true)
ifdef BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD
ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call module-load-list-copy-paths,$(call intermediates-dir-for,PACKAGING,ramdisk_modules),$(BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD),modules.load,$(TARGET_RECOVERY_ROOT_OUT)))
endif
endif
- ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_RECOVERY_KERNEL_MODULES),$(TARGET_RECOVERY_ROOT_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_recovery),$(BOARD_RECOVERY_KERNEL_MODULES_LOAD),modules.load.recovery))
+ ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_RECOVERY_KERNEL_MODULES),$(TARGET_RECOVERY_ROOT_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_recovery),$(BOARD_RECOVERY_KERNEL_MODULES_LOAD),modules.load.recovery,$(BOARD_RECOVERY_KERNEL_MODULES_ARCHIVE)))
endif
-ifneq ($(strip $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES)),)
+ifneq ($(strip $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES))$(strip $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_ARCHIVE)),)
ifeq ($(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD),)
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES)
endif
- ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES),$(TARGET_VENDOR_RAMDISK_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_vendor_ramdisk),$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD),modules.load))
+ ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES),$(TARGET_VENDOR_RAMDISK_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_vendor_ramdisk),$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD),modules.load,$(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_ARCHIVE)))
endif
ifneq ($(BOARD_USES_RECOVERY_AS_BOOT), true)
ifneq ($(strip $(BOARD_GENERIC_RAMDISK_KERNEL_MODULES)),)
- ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_GENERIC_RAMDISK_KERNEL_MODULES),$(TARGET_RAMDISK_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_ramdisk),$(BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD),modules.load))
+ ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_GENERIC_RAMDISK_KERNEL_MODULES),$(TARGET_RAMDISK_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_ramdisk),$(BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD),modules.load,))
endif
endif
-ifneq ($(strip $(BOARD_VENDOR_KERNEL_MODULES)),)
+ifneq ($(strip $(BOARD_VENDOR_KERNEL_MODULES)$(strip $(BOARD_VENDOR_KERNEL_MODULES_ARCHIVE))),)
ifeq ($(BOARD_VENDOR_KERNEL_MODULES_LOAD),)
BOARD_VENDOR_KERNEL_MODULES_LOAD := $(BOARD_VENDOR_KERNEL_MODULES)
endif
- ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_VENDOR_KERNEL_MODULES),$(TARGET_OUT_VENDOR),vendor,$(call intermediates-dir-for,PACKAGING,depmod_vendor),$(BOARD_VENDOR_KERNEL_MODULES_LOAD),modules.load))
+ ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_VENDOR_KERNEL_MODULES),$(TARGET_OUT_VENDOR),vendor,$(call intermediates-dir-for,PACKAGING,depmod_vendor),$(BOARD_VENDOR_KERNEL_MODULES_LOAD),modules.load,$(BOARD_VENDOR_KERNEL_MODULES_ARCHIVE)))
endif
-ifneq ($(strip $(BOARD_ODM_KERNEL_MODULES)),)
+ifneq ($(strip $(BOARD_ODM_KERNEL_MODULES))$(strip $(BOARD_ODM_KERNEL_MODULES_ARCHIVE)),)
ifeq ($(BOARD_RECOVERY_KERNEL_MODULES_LOAD),)
BOARD_ODM_KERNEL_MODULES_LOAD := $(BOARD_ODM_KERNEL_MODULES)
endif
- ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_ODM_KERNEL_MODULES),$(TARGET_OUT_ODM),odm,$(call intermediates-dir-for,PACKAGING,depmod_odm),$(BOARD_ODM_KERNEL_MODULES_LOAD),modules.load))
+ ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_ODM_KERNEL_MODULES),$(TARGET_OUT_ODM),odm,$(call intermediates-dir-for,PACKAGING,depmod_odm),$(BOARD_ODM_KERNEL_MODULES_LOAD),modules.load,$(BOARD_ODM_KERNEL_MODULES_ARCHIVE)))
endif
# -----------------------------------------------------------------
@@ -1462,6 +1483,9 @@
ifneq (true,$(TARGET_USERIMAGES_SPARSE_SQUASHFS_DISABLED))
INTERNAL_USERIMAGES_SPARSE_SQUASHFS_FLAG := -s
endif
+ifneq (true,$(TARGET_USERIMAGES_SPARSE_F2FS_DISABLED))
+ INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG := -S
+endif
INTERNAL_USERIMAGES_DEPS := \
$(BUILD_IMAGE) \
@@ -1598,6 +1622,7 @@
$(if $(INTERNAL_USERIMAGES_EXT_VARIANT),$(hide) echo "fs_type=$(INTERNAL_USERIMAGES_EXT_VARIANT)" >> $(1))
$(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(1))
$(if $(INTERNAL_USERIMAGES_SPARSE_SQUASHFS_FLAG),$(hide) echo "squashfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_SQUASHFS_FLAG)" >> $(1))
+$(if $(INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG),$(hide) echo "f2fs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG)" >> $(1))
$(if $(BOARD_EXT4_SHARE_DUP_BLOCKS),$(hide) echo "ext4_share_dup_blocks=$(BOARD_EXT4_SHARE_DUP_BLOCKS)" >> $(1))
$(if $(BOARD_FLASH_LOGICAL_BLOCK_SIZE), $(hide) echo "flash_logical_block_size=$(BOARD_FLASH_LOGICAL_BLOCK_SIZE)" >> $(1))
$(if $(BOARD_FLASH_ERASE_BLOCK_SIZE), $(hide) echo "flash_erase_block_size=$(BOARD_FLASH_ERASE_BLOCK_SIZE)" >> $(1))
@@ -3614,33 +3639,32 @@
ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
-droid_targets: check-all-partition-sizes
-
-.PHONY: check-all-partition-sizes check-all-partition-sizes-nodeps
-
-check_all_partition_sizes_file := $(call intermediates-dir-for,PACKAGING,check-all-partition-sizes)/timestamp
-
-check-all-partition-sizes: $(check_all_partition_sizes_file)
-
-$(check_all_partition_sizes_file): \
- $(CHECK_PARTITION_SIZES) \
- $(call images-for-partitions,$(BOARD_SUPER_PARTITION_PARTITION_LIST))
-
# $(1): misc_info.txt
+# #(2): optional log file
define check-all-partition-sizes-target
mkdir -p $(dir $(1))
rm -f $(1)
$(call dump-super-image-info, $(1))
$(foreach partition,$(BOARD_SUPER_PARTITION_PARTITION_LIST), \
echo "$(partition)_image="$(call images-for-partitions,$(partition)) >> $(1);)
- $(CHECK_PARTITION_SIZES) -v $(1)
+ $(CHECK_PARTITION_SIZES) $(if $(2),--logfile $(2),-v) $(1)
endef
-$(check_all_partition_sizes_file):
- $(call check-all-partition-sizes-target, \
- $(call intermediates-dir-for,PACKAGING,check-all-partition-sizes)/misc_info.txt)
- touch $@
+check_all_partition_sizes_log := $(call intermediates-dir-for,PACKAGING,check-all-partition-sizes)/check_all_partition_sizes_log
+droid_targets: $(check_all_partition_sizes_log)
+$(call dist-for-goals, droid_targets, $(check_all_partition_sizes_log))
+$(check_all_partition_sizes_log): \
+ $(CHECK_PARTITION_SIZES) \
+ $(call images-for-partitions,$(BOARD_SUPER_PARTITION_PARTITION_LIST))
+ $(call check-all-partition-sizes-target, \
+ $(call intermediates-dir-for,PACKAGING,check-all-partition-sizes)/misc_info.txt, \
+ $@)
+
+.PHONY: check-all-partition-sizes
+check-all-partition-sizes: $(check_all_partition_sizes_log)
+
+.PHONY: check-all-partition-sizes-nodeps
check-all-partition-sizes-nodeps:
$(call check-all-partition-sizes-target, \
$(call intermediates-dir-for,PACKAGING,check-all-partition-sizes-nodeps)/misc_info.txt)
@@ -4089,6 +4113,8 @@
echo "super_$(group)_partition_list=$(call filter-out-missing-vendor, $(BOARD_$(call to-upper,$(group))_PARTITION_LIST))" >> $(1);))
$(if $(filter true,$(TARGET_USERIMAGES_SPARSE_EXT_DISABLED)), \
echo "build_non_sparse_super_partition=true" >> $(1))
+ $(if $(filter true,$(TARGET_USERIMAGES_SPARSE_F2FS_DISABLED)), \
+ echo "build_non_sparse_super_partition=true" >> $(1))
$(if $(filter true,$(BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE)), \
echo "super_image_in_update_package=true" >> $(1))
$(if $(BOARD_SUPER_PARTITION_SIZE), \
@@ -4328,10 +4354,12 @@
$(hide) cp $(PRODUCT_ODM_BASE_FS_PATH) \
$(zip_root)/META/$(notdir $(PRODUCT_ODM_BASE_FS_PATH))
endif
+ifneq ($(AB_OTA_UPDATER),true)
ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),)
$(hide) PATH=$(INTERNAL_USERIMAGES_BINARY_PATHS):$$PATH MKBOOTIMG=$(MKBOOTIMG) \
$(MAKE_RECOVERY_PATCH) $(zip_root) $(zip_root)
endif
+endif
ifeq ($(AB_OTA_UPDATER),true)
@# When using the A/B updater, include the updater config files in the zip.
$(hide) cp $(TOPDIR)system/update_engine/update_engine.conf $(zip_root)/META/update_engine_config.txt
@@ -5115,8 +5143,8 @@
# target defined in make. MakeVarsContext.DistForGoal doesn't take
# into account that a PHONY rule create by Soong won't be available
# during make, and such will fail with `writing to readonly
-# directory`, because kati will see 'fuzz' as being a file, not a
+# directory`, because kati will see 'haiku' as being a file, not a
# phony target.
-.PHONY: fuzz
-fuzz: $(SOONG_FUZZ_PACKAGING_ARCH_MODULES) $(ALL_FUZZ_TARGETS)
-$(call dist-for-goals,fuzz,$(SOONG_FUZZ_PACKAGING_ARCH_MODULES))
+.PHONY: haiku
+haiku: $(SOONG_FUZZ_PACKAGING_ARCH_MODULES) $(ALL_FUZZ_TARGETS)
+$(call dist-for-goals,haiku,$(SOONG_FUZZ_PACKAGING_ARCH_MODULES))
diff --git a/core/binary.mk b/core/binary.mk
index 604315e..ae456e3 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -84,6 +84,12 @@
my_native_coverage := false
endif
+# Exclude directories from manual binder interface whitelisting.
+# TODO(b/145621474): Move this check into IInterface.h when clang-tidy no longer uses absolute paths.
+ifneq (,$(filter $(addsuffix %,$(ALLOWED_MANUAL_INTERFACE_PATHS)),$(LOCAL_PATH)))
+ my_cflags += -DDO_NOT_CHECK_MANUAL_BINDER_INTERFACES
+endif
+
ifneq ($(strip $(ENABLE_XOM)),false)
ifndef LOCAL_IS_HOST_MODULE
my_xom := true
@@ -435,15 +441,6 @@
include $(BUILD_SYSTEM)/cxx_stl_setup.mk
-# Add static HAL libraries
-ifdef LOCAL_HAL_STATIC_LIBRARIES
-$(foreach lib, $(LOCAL_HAL_STATIC_LIBRARIES), \
- $(eval b_lib := $(filter $(lib).%,$(BOARD_HAL_STATIC_LIBRARIES)))\
- $(if $(b_lib), $(eval my_static_libraries += $(b_lib)),\
- $(eval my_static_libraries += $(lib).default)))
-b_lib :=
-endif
-
ifneq ($(strip $(CUSTOM_$(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)LINKER)),)
my_linker := $(CUSTOM_$(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)LINKER)
else
@@ -1296,9 +1293,15 @@
my_c_includes += $(JNI_H_INCLUDE)
endif
-my_outside_includes := $(filter-out $(OUT_DIR)/%,$(filter /%,$(my_c_includes)))
+my_c_includes := $(foreach inc,$(my_c_includes),$(call clean-path,$(inc)))
+
+my_outside_includes := $(filter-out $(OUT_DIR)/%,$(filter /%,$(my_c_includes)) $(filter ../%,$(my_c_includes)))
ifneq ($(my_outside_includes),)
-$(error $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): C_INCLUDES must be under the source or output directories: $(my_outside_includes))
+ ifeq ($(BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS),true)
+ $(call pretty-warning,C_INCLUDES must be under the source or output directories: $(my_outside_includes))
+ else
+ $(call pretty-error,C_INCLUDES must be under the source or output directories: $(my_outside_includes))
+ endif
endif
# all_objects includes gen_o_objects which were part of LOCAL_GENERATED_SOURCES;
@@ -1803,7 +1806,7 @@
ifneq ($(strip $(my_export_c_include_dirs)$(export_include_deps)),)
EXPORTS_LIST := $(EXPORTS_LIST) $(intermediates)
- EXPORTS.$(intermediates).FLAGS := $(foreach d,$(my_export_c_include_dirs),-I $(d))
+ EXPORTS.$(intermediates).FLAGS := $(foreach d,$(my_export_c_include_dirs),-I $(call clean-path,$(d)))
EXPORTS.$(intermediates).REEXPORT := $(export_include_deps)
EXPORTS.$(intermediates).DEPS := $(my_export_c_include_deps) $(my_generated_sources) $(LOCAL_EXPORT_C_INCLUDE_DEPS)
endif
diff --git a/core/board_config.mk b/core/board_config.mk
index 4c128f1..0e3c52f 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -89,6 +89,7 @@
BUILD_BROKEN_PREBUILT_ELF_FILES \
BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW \
BUILD_BROKEN_USES_NETWORK \
+ BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS \
_build_broken_var_list += \
$(foreach m,$(AVAILABLE_BUILD_MODULE_TYPES) \
diff --git a/core/build_id.mk b/core/build_id.mk
index 03a8cd3..cefc4b2 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -18,4 +18,4 @@
# (like "CRB01"). It must be a single word, and is
# capitalized by convention.
-BUILD_ID=QD1A.190821.011
+BUILD_ID=QQ1A.191205.011
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 9ff978b..6c3b249 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -112,7 +112,6 @@
# Group static libraries with "-Wl,--start-group" and "-Wl,--end-group" when linking.
LOCAL_GROUP_STATIC_LIBRARIES:=
LOCAL_GTEST:=true
-LOCAL_HAL_STATIC_LIBRARIES:=
LOCAL_HEADER_LIBRARIES:=
LOCAL_HOST_PREFIX:=
LOCAL_HOST_REQUIRED_MODULES:=
diff --git a/core/config.mk b/core/config.mk
index 9ab3fff..4cc78b8 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -120,6 +120,8 @@
)
$(KATI_obsolete_var PRODUCT_IOT)
$(KATI_obsolete_var MD5SUM)
+$(KATI_obsolete_var BOARD_HAL_STATIC_LIBRARIES, See $(CHANGES_URL)#BOARD_HAL_STATIC_LIBRARIES)
+$(KATI_obsolete_var LOCAL_HAL_STATIC_LIBRARIES, See $(CHANGES_URL)#BOARD_HAL_STATIC_LIBRARIES)
# Used to force goals to build. Only use for conditionally defined goals.
.PHONY: FORCE
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 32690fe..55eeec6 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -34,13 +34,13 @@
$(boot_zip): PRIVATE_BOOTCLASSPATH_JARS := $(bootclasspath_jars)
$(boot_zip): PRIVATE_SYSTEM_SERVER_JARS := $(system_server_jars)
-$(boot_zip): $(bootclasspath_jars) $(system_server_jars) $(SOONG_ZIP) $(MERGE_ZIPS) $(DEXPREOPT_IMAGE_ZIP_boot)
+$(boot_zip): $(bootclasspath_jars) $(system_server_jars) $(SOONG_ZIP) $(MERGE_ZIPS) $(DEXPREOPT_IMAGE_ZIP_boot) $(DEXPREOPT_IMAGE_ZIP_art)
@echo "Create boot package: $@"
rm -f $@
$(SOONG_ZIP) -o $@.tmp \
-C $(dir $(firstword $(PRIVATE_BOOTCLASSPATH_JARS)))/.. $(addprefix -f ,$(PRIVATE_BOOTCLASSPATH_JARS)) \
-C $(PRODUCT_OUT) $(addprefix -f ,$(PRIVATE_SYSTEM_SERVER_JARS))
- $(MERGE_ZIPS) $@ $@.tmp $(DEXPREOPT_IMAGE_ZIP_boot)
+ $(MERGE_ZIPS) $@ $@.tmp $(DEXPREOPT_IMAGE_ZIP_boot) $(DEXPREOPT_IMAGE_ZIP_art)
rm -f $@.tmp
$(call dist-for-goals, droidcore, $(boot_zip))
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk
index 64ad8d9..0f994c4 100644
--- a/core/dex_preopt_config.mk
+++ b/core/dex_preopt_config.mk
@@ -92,11 +92,11 @@
$(call add_json_bool, DisableGenerateProfile, $(filter false,$(WITH_DEX_PREOPT_GENERATE_PROFILE)))
$(call add_json_str, ProfileDir, $(PRODUCT_DEX_PREOPT_PROFILE_DIR))
$(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS))
+ $(call add_json_list, UpdatableBootJars, $(PRODUCT_UPDATABLE_BOOT_JARS))
$(call add_json_list, ArtApexJars, $(ART_APEX_JARS))
- $(call add_json_list, ProductUpdatableBootModules, $(PRODUCT_UPDATABLE_BOOT_MODULES))
- $(call add_json_list, ProductUpdatableBootLocations, $(PRODUCT_UPDATABLE_BOOT_LOCATIONS))
$(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS))
$(call add_json_list, SystemServerApps, $(PRODUCT_SYSTEM_SERVER_APPS))
+ $(call add_json_list, UpdatableSystemServerJars, $(PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS))
$(call add_json_list, SpeedApps, $(PRODUCT_DEXPREOPT_SPEED_APPS))
$(call add_json_list, PreoptFlags, $(PRODUCT_DEX_PREOPT_DEFAULT_FLAGS))
$(call add_json_str, DefaultCompilerFilter, $(PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER))
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index 6705c82..aa3fd80 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -58,6 +58,11 @@
LOCAL_DEX_PREOPT :=
endif
+# Don't preopt system server jars that are updatable.
+ifneq (,$(filter %:$(LOCAL_MODULE), $(PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS)))
+ LOCAL_DEX_PREOPT :=
+endif
+
# if WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY=true and module is not in boot class path skip
# Also preopt system server jars since selinux prevents system server from loading anything from
# /data. If we don't do this they will need to be extracted which is not favorable for RAM usage
@@ -229,6 +234,7 @@
$(call end_json_map)
$(call add_json_list, Archs, $(my_dexpreopt_archs))
$(call add_json_list, DexPreoptImages, $(my_dexpreopt_images))
+ $(call add_json_list, DexPreoptImageLocations, $(DEXPREOPT_IMAGE_LOCATIONS))
$(call add_json_list, PreoptBootClassPathDexFiles, $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES))
$(call add_json_list, PreoptBootClassPathDexLocations,$(DEXPREOPT_BOOTCLASSPATH_DEX_LOCATIONS))
$(call add_json_bool, PreoptExtractedApk, $(my_preopt_for_extracted_apk))
diff --git a/core/java.mk b/core/java.mk
index cbcd1b5..907f2dc 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -413,8 +413,6 @@
legacy_proguard_flags += -printmapping $(proguard_dictionary)
legacy_proguard_flags += -printconfiguration $(proguard_configuration)
-common_proguard_flags := -forceprocessing
-
common_proguard_flag_files := $(BUILD_SYSTEM)/proguard.flags
ifneq ($(LOCAL_INSTRUMENTATION_FOR)$(filter tests,$(LOCAL_MODULE_TAGS)),)
common_proguard_flags += -dontshrink # don't shrink tests by default
diff --git a/core/main.mk b/core/main.mk
index fd02a83..5767ef4 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1745,9 +1745,9 @@
endif
# Put XML formatted API files in the dist dir.
- $(TARGET_OUT_COMMON_INTERMEDIATES)/api.xml: $(call java-lib-header-files,android_stubs_current) $(APICHECK)
- $(TARGET_OUT_COMMON_INTERMEDIATES)/system-api.xml: $(call java-lib-header-files,android_system_stubs_current) $(APICHECK)
- $(TARGET_OUT_COMMON_INTERMEDIATES)/test-api.xml: $(call java-lib-header-files,android_test_stubs_current) $(APICHECK)
+ $(TARGET_OUT_COMMON_INTERMEDIATES)/api.xml: $(call java-lib-files,android_stubs_current) $(APICHECK)
+ $(TARGET_OUT_COMMON_INTERMEDIATES)/system-api.xml: $(call java-lib-files,android_system_stubs_current) $(APICHECK)
+ $(TARGET_OUT_COMMON_INTERMEDIATES)/test-api.xml: $(call java-lib-files,android_test_stubs_current) $(APICHECK)
api_xmls := $(addprefix $(TARGET_OUT_COMMON_INTERMEDIATES)/,api.xml system-api.xml test-api.xml)
$(api_xmls):
diff --git a/core/product.mk b/core/product.mk
index 102e6a5..2276db2 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -228,6 +228,8 @@
_product_list_vars += PRODUCT_VENDOR_PROPERTY_BLACKLIST
_product_list_vars += PRODUCT_SYSTEM_SERVER_APPS
_product_list_vars += PRODUCT_SYSTEM_SERVER_JARS
+# List of system_server jars delivered via apex. Format = <apex name>:<jar name>.
+_product_list_vars += PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS
# All of the apps that we force preopt, this overrides WITH_DEXPREOPT.
_product_list_vars += PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK
@@ -364,8 +366,8 @@
_product_single_value_vars += PRODUCT_BUILD_BOOT_IMAGE
_product_single_value_vars += PRODUCT_BUILD_VBMETA_IMAGE
-_product_list_vars += PRODUCT_UPDATABLE_BOOT_MODULES
-_product_list_vars += PRODUCT_UPDATABLE_BOOT_LOCATIONS
+# List of boot jars delivered via apex
+_product_list_vars += PRODUCT_UPDATABLE_BOOT_JARS
# Whether the product would like to check prebuilt ELF files.
_product_single_value_vars += PRODUCT_CHECK_ELF_FILES
diff --git a/core/rust_device_test_config_template.xml b/core/rust_device_test_config_template.xml
new file mode 100644
index 0000000..9429d38
--- /dev/null
+++ b/core/rust_device_test_config_template.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- This test config file is auto-generated. -->
+<configuration description="Config to run {MODULE} device tests.">
+ <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
+ <option name="cleanup" value="true" />
+ <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" />
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.rust.RustBinaryTest" >
+ <option name="test-device-path" value="/data/local/tmp" />
+ <option name="module-name" value="{MODULE}" />
+ </test>
+</configuration>
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index c402717..98c646a 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -104,6 +104,16 @@
ALL_MODULES.$(my_register_name).BUILT_INSTALLED += $(my_built_installed)
$(my_all_targets): $(my_installed)
+# Copy test suite files.
+ifdef LOCAL_COMPATIBILITY_SUITE
+my_apks_to_install := $(foreach f,$(filter %.apk,$(LOCAL_SOONG_BUILT_INSTALLED)),$(call word-colon,1,$(f)))
+$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(foreach a,$(my_apks_to_install),\
+ $(call compat-copy-pair,$(a),$(dir)/$(notdir $(a)))))))
+$(call create-suite-dependencies)
+endif
+
# embedded JNI will already have been handled by soong
my_embed_jni :=
my_prebuilt_jni_libs :=
diff --git a/core/tasks/general-tests.mk b/core/tasks/general-tests.mk
index 9ea4e62..7bcc915 100644
--- a/core/tasks/general-tests.mk
+++ b/core/tasks/general-tests.mk
@@ -17,6 +17,7 @@
general_tests_tools := \
$(HOST_OUT_JAVA_LIBRARIES)/cts-tradefed.jar \
$(HOST_OUT_JAVA_LIBRARIES)/compatibility-host-util.jar \
+ $(HOST_OUT_JAVA_LIBRARIES)/vts-core-tradefed.jar \
intermediates_dir := $(call intermediates-dir-for,PACKAGING,general-tests)
general_tests_zip := $(PRODUCT_OUT)/general-tests.zip
diff --git a/core/tasks/with-license.mk b/core/tasks/with-license.mk
index daa6897..469ad76 100644
--- a/core/tasks/with-license.mk
+++ b/core/tasks/with-license.mk
@@ -20,7 +20,7 @@
name := $(name)_debug
endif
-name := $(name)-img-$(FILE_NAME_TAG)-with-license
+name := $(name)-flashable-$(FILE_NAME_TAG)-with-license
with_license_intermediates := \
$(call intermediates-dir-for,PACKAGING,with_license)
@@ -35,8 +35,7 @@
else
$(ZIP2ZIP) -i $(BUILT_TARGET_FILES_PACKAGE) -o $@ \
RADIO/bootloader.img:bootloader.img RADIO/radio.img:radio.img \
- IMAGES/system.img:system.img IMAGES/vendor.img:vendor.img \
- IMAGES/boot.img:boot.img OTA/android-info.txt:android-info.txt
+ IMAGES/*.img:. OTA/android-info.txt:android-info.txt
endif
with_license_zip := $(PRODUCT_OUT)/$(name).sh
$(with_license_zip): PRIVATE_NAME := $(name)
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index ff5fb42..8095212 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -250,7 +250,7 @@
# It must be of the form "YYYY-MM-DD" on production devices.
# It must match one of the Android Security Patch Level strings of the Public Security Bulletins.
# If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
- PLATFORM_SECURITY_PATCH := 2019-10-05
+ PLATFORM_SECURITY_PATCH := 2019-12-05
endif
.KATI_READONLY := PLATFORM_SECURITY_PATCH
diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk
index 2ff2b20..0607717 100644
--- a/target/product/aosp_arm.mk
+++ b/target/product/aosp_arm.mk
@@ -36,6 +36,12 @@
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
# All components inherited here go to product image
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk
index dda805f..e133db4 100644
--- a/target/product/aosp_arm64.mk
+++ b/target/product/aosp_arm64.mk
@@ -40,6 +40,12 @@
endif
#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
# All components inherited here go to product image
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk
index e557aa8..51b5daf 100644
--- a/target/product/aosp_x86.mk
+++ b/target/product/aosp_x86.mk
@@ -34,6 +34,12 @@
endif
#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
# All components inherited here go to product image
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk
index 153f499..9b26716 100644
--- a/target/product/aosp_x86_64.mk
+++ b/target/product/aosp_x86_64.mk
@@ -40,6 +40,12 @@
endif
#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
# All components inherited here go to product image
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
diff --git a/target/product/aosp_x86_arm.mk b/target/product/aosp_x86_arm.mk
index c0f8f8a..7b9b89c 100644
--- a/target/product/aosp_x86_arm.mk
+++ b/target/product/aosp_x86_arm.mk
@@ -32,6 +32,12 @@
system/system_ext/%
#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
# All components inherited here go to product image
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index dab3787..42e0f5d 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -51,11 +51,14 @@
com.android.apex.cts.shim.v1_prebuilt \
com.android.conscrypt \
com.android.i18n \
+ com.android.ipsec \
com.android.location.provider \
com.android.media \
com.android.media.swcodec \
com.android.resolv \
com.android.neuralnetworks \
+ com.android.sdkext \
+ com.android.telephony \
com.android.tzdata \
ContactsProvider \
content \
@@ -94,12 +97,12 @@
idmap2 \
idmap2d \
ime \
- ims-common \
incident \
incidentd \
incident_helper \
init.environ.rc \
init_system \
+ InProcessTethering \
input \
installd \
iorapd \
@@ -125,6 +128,7 @@
libcamera2ndk \
libcutils \
libdl.bootstrap \
+ libdl_android.bootstrap \
libdrmframework \
libdrmframework_jni \
libEGL \
@@ -248,7 +252,6 @@
task_profiles.json \
tc \
telecom \
- telephony-common \
tombstoned \
traced \
traced_probes \
@@ -320,12 +323,17 @@
telephony-common \
voip-common \
ims-common \
+ framework-sdkext \
+ ike \
updatable-media
-PRODUCT_UPDATABLE_BOOT_MODULES := conscrypt updatable-media
-PRODUCT_UPDATABLE_BOOT_LOCATIONS := \
- /apex/com.android.conscrypt/javalib/conscrypt.jar \
- /apex/com.android.media/javalib/updatable-media.jar
+PRODUCT_UPDATABLE_BOOT_JARS := \
+ com.android.conscrypt:conscrypt \
+ com.android.ipsec:ike \
+ com.android.media:updatable-media \
+ com.android.sdkext:framework-sdkext \
+ com.android.telephony:telephony-common \
+ com.android.telephony:ims-common
PRODUCT_COPY_FILES += \
system/core/rootdir/init.usb.rc:system/etc/init/hw/init.usb.rc \
diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk
index 1657e71..134ff31 100644
--- a/target/product/base_vendor.mk
+++ b/target/product/base_vendor.mk
@@ -23,6 +23,7 @@
init_second_stage.recovery \
ld.config.recovery.txt \
linker.recovery \
+ linkerconfig.recovery \
otacerts.recovery \
recovery \
shell_and_utilities_recovery \
diff --git a/target/product/cfi-common.mk b/target/product/cfi-common.mk
index 7a53bc1..42edd92 100644
--- a/target/product/cfi-common.mk
+++ b/target/product/cfi-common.mk
@@ -17,7 +17,7 @@
# This is a set of common components to enable CFI for (across
# compatible product configs)
PRODUCT_CFI_INCLUDE_PATHS := \
- device/google/cuttlefish_common/guest/libs/wpa_supplicant_8_lib \
+ device/google/cuttlefish/guest/libs/wpa_supplicant_8_lib \
device/google/wahoo/wifi_offload \
external/tinyxml2 \
external/wpa_supplicant_8 \
diff --git a/target/product/developer_gsi_keys.mk b/target/product/developer_gsi_keys.mk
new file mode 100644
index 0000000..79451ad
--- /dev/null
+++ b/target/product/developer_gsi_keys.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2019 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Device makers who are willing to support booting the public Developer-GSI
+# in locked state can add the following line into a device.mk to inherit this
+# makefile. This file will then install the up-to-date GSI public keys into
+# the first-stage ramdisk to pass verified boot.
+#
+# In device/<company>/<board>/device.mk:
+# $(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
+#
+# Currently, the developer GSI images can be downloaded from the following URL:
+# https://developer.android.com/topic/generic-system-image/releases
+#
+PRODUCT_PACKAGES += \
+ q-developer-gsi.avbpubkey \
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
index 536fe0c..424cf05 100644
--- a/target/product/gsi/Android.mk
+++ b/target/product/gsi/Android.mk
@@ -162,10 +162,14 @@
# TODO(b/141450808): remove following VNDK phony targets when **.libraries.txt files are provided by apexes.
LOCAL_REQUIRED_MODULES := \
$(foreach vndk_ver,$(PRODUCT_EXTRA_VNDK_VERSIONS),vndk_v$(vndk_ver)_$(TARGET_ARCH)$(_binder32))
-LOCAL_REQUIRED_MODULES += $(foreach vndk_ver,$(PRODUCT_EXTRA_VNDK_VERSIONS),com.android.vndk.v$(vndk_ver))
_binder32 :=
include $(BUILD_PHONY_PACKAGE)
+include $(CLEAR_VARS)
+LOCAL_MODULE := vndk_apex_snapshot_package
+LOCAL_REQUIRED_MODULES := $(foreach vndk_ver,$(PRODUCT_EXTRA_VNDK_VERSIONS),com.android.vndk.v$(vndk_ver))
+include $(BUILD_PHONY_PACKAGE)
+
endif # BOARD_VNDK_VERSION is set
#####################################################################
diff --git a/target/product/gsi/current.txt b/target/product/gsi/current.txt
index d9151ea..c50177f 100644
--- a/target/product/gsi/current.txt
+++ b/target/product/gsi/current.txt
@@ -79,6 +79,7 @@
VNDK-core: android.hardware.bluetooth.a2dp@1.0.so
VNDK-core: android.hardware.bluetooth.audio@2.0.so
VNDK-core: android.hardware.bluetooth@1.0.so
+VNDK-core: android.hardware.bluetooth@1.1.so
VNDK-core: android.hardware.boot@1.0.so
VNDK-core: android.hardware.boot@1.1.so
VNDK-core: android.hardware.broadcastradio@1.0.so
@@ -132,6 +133,7 @@
VNDK-core: android.hardware.ir@1.0.so
VNDK-core: android.hardware.keymaster@3.0.so
VNDK-core: android.hardware.keymaster@4.0.so
+VNDK-core: android.hardware.keymaster@4.1.so
VNDK-core: android.hardware.light@2.0.so
VNDK-core: android.hardware.media.bufferpool@1.0.so
VNDK-core: android.hardware.media.bufferpool@2.0.so
@@ -155,6 +157,7 @@
VNDK-core: android.hardware.radio.config@1.0.so
VNDK-core: android.hardware.radio.config@1.1.so
VNDK-core: android.hardware.radio.config@1.2.so
+VNDK-core: android.hardware.radio.config@1.3.so
VNDK-core: android.hardware.radio.deprecated@1.0.so
VNDK-core: android.hardware.radio@1.0.so
VNDK-core: android.hardware.radio@1.1.so
@@ -270,6 +273,7 @@
VNDK-core: libxml2.so
VNDK-core: libyuv.so
VNDK-core: libziparchive.so
+VNDK-core: vintf-vibrator-V1-ndk_platform.so
VNDK-private: libbacktrace.so
VNDK-private: libbinderthreadstate.so
VNDK-private: libblas.so
diff --git a/target/product/gsi_arm64.mk b/target/product/gsi_arm64.mk
index 645bc3a..adf7ca5 100644
--- a/target/product/gsi_arm64.mk
+++ b/target/product/gsi_arm64.mk
@@ -24,6 +24,12 @@
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
# All components inherited here go to product image
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index faaa935..aee7959 100644
--- a/target/product/gsi_release.mk
+++ b/target/product/gsi_release.mk
@@ -29,12 +29,6 @@
system/product/% \
system/system_ext/%
-
-# GSI doesn't support apex for now.
-# Properties set in product take precedence over those in vendor.
-PRODUCT_PRODUCT_PROPERTIES += \
- ro.apex.updatable=false
-
# Split selinux policy
PRODUCT_FULL_TREBLE_OVERRIDE := true
diff --git a/target/product/media_system.mk b/target/product/media_system.mk
index 5c0902d..c2c9762 100644
--- a/target/product/media_system.mk
+++ b/target/product/media_system.mk
@@ -56,6 +56,11 @@
wifi-service \
com.android.location.provider \
+# system server jars which are updated via apex modules.
+# The values should be of the format <apex name>:<jar name>
+PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS := \
+ # Ex: com.android.wifi:wifi-service
+
PRODUCT_COPY_FILES += \
system/core/rootdir/etc/public.libraries.android.txt:system/etc/public.libraries.txt
diff --git a/target/product/media_system_ext.mk b/target/product/media_system_ext.mk
index 78cc6aa..2e20af3 100644
--- a/target/product/media_system_ext.mk
+++ b/target/product/media_system_ext.mk
@@ -22,3 +22,4 @@
# /system_ext packages
PRODUCT_PACKAGES += \
+ vndk_apex_snapshot_package \
diff --git a/target/product/sdk_phone_x86.mk b/target/product/sdk_phone_x86.mk
index efb3c6e..9df26a9 100644
--- a/target/product/sdk_phone_x86.mk
+++ b/target/product/sdk_phone_x86.mk
@@ -27,6 +27,12 @@
endif
#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
# All components inherited here go to product image
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
diff --git a/target/product/sdk_phone_x86_64.mk b/target/product/sdk_phone_x86_64.mk
index 2d0d6e1..862c66e 100644
--- a/target/product/sdk_phone_x86_64.mk
+++ b/target/product/sdk_phone_x86_64.mk
@@ -28,6 +28,12 @@
endif
#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
# All components inherited here go to product image
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
diff --git a/tools/event_log_tags.py b/tools/event_log_tags.py
index 645839e..35b2de0 100644
--- a/tools/event_log_tags.py
+++ b/tools/event_log_tags.py
@@ -62,9 +62,9 @@
try:
for self.linenum, line in enumerate(file_object):
self.linenum += 1
-
+ line = re.sub('#.*$', '', line) # strip trailing comments
line = line.strip()
- if not line or line[0] == '#': continue
+ if not line: continue
parts = re.split(r"\s+", line, 2)
if len(parts) < 2:
diff --git a/tools/generate-self-extracting-archive.py b/tools/generate-self-extracting-archive.py
index 5a193ab..5b0628d 100755
--- a/tools/generate-self-extracting-archive.py
+++ b/tools/generate-self-extracting-archive.py
@@ -38,7 +38,7 @@
import os
import zipfile
-_HEADER_TEMPLATE = """#!/bin/sh
+_HEADER_TEMPLATE = """#!/bin/bash
#
{comment_line}
#
@@ -92,7 +92,7 @@
dst.write(b)
_MAX_OFFSET_WIDTH = 20
-def _generate_extract_command(start, end, extract_name):
+def _generate_extract_command(start, size, extract_name):
"""Generate the extract command.
The length of this string must be constant no matter what the start and end
@@ -101,7 +101,7 @@
Args:
start: offset in bytes of the start of the wrapped file
- end: offset in bytes of the end of the wrapped file
+ size: size in bytes of the wrapped file
extract_name: of the file to create when extracted
"""
@@ -111,11 +111,11 @@
if len(start_str) != _MAX_OFFSET_WIDTH + 1:
raise Exception('Start offset too large (%d)' % start)
- end_str = ('%d' % end).rjust(_MAX_OFFSET_WIDTH)
- if len(end_str) != _MAX_OFFSET_WIDTH:
- raise Exception('End offset too large (%d)' % end)
+ size_str = ('%d' % size).rjust(_MAX_OFFSET_WIDTH)
+ if len(size_str) != _MAX_OFFSET_WIDTH:
+ raise Exception('Size too large (%d)' % size)
- return "tail -c %s $0 | head -c %s > %s\n" % (start_str, end_str, extract_name)
+ return "tail -c %s $0 | head -c %s > %s\n" % (start_str, size_str, extract_name)
def main(argv):
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index af508fe..1e7d387 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -315,6 +315,8 @@
elif fs_type.startswith("f2fs"):
build_command = ["mkf2fsuserimg.sh"]
build_command.extend([out_file, prop_dict["image_size"]])
+ if "f2fs_sparse_flag" in prop_dict:
+ build_command.extend([prop_dict["f2fs_sparse_flag"]])
if fs_config:
build_command.extend(["-C", fs_config])
build_command.extend(["-f", in_dir])
@@ -519,6 +521,7 @@
common_props = (
"extfs_sparse_flag",
"squashfs_sparse_flag",
+ "f2fs_sparse_flag",
"skip_fsck",
"ext_mkuserimg",
"verity",
@@ -582,7 +585,6 @@
copy_prop("system_squashfs_compressor", "squashfs_compressor")
copy_prop("system_squashfs_compressor_opt", "squashfs_compressor_opt")
copy_prop("system_squashfs_block_size", "squashfs_block_size")
- copy_prop("system_base_fs_file", "base_fs_file")
copy_prop("system_extfs_inode_count", "extfs_inode_count")
if not copy_prop("system_extfs_rsv_pct", "extfs_rsv_pct"):
d["extfs_rsv_pct"] = "0"
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 031db1d..3ba9a23 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -87,6 +87,7 @@
# Stash size cannot exceed cache_size * threshold.
self.cache_size = None
self.stash_threshold = 0.8
+ self.logfile = None
OPTIONS = Options()
@@ -158,13 +159,14 @@
'default': {
'class': 'logging.StreamHandler',
'formatter': 'standard',
+ 'level': 'WARNING',
},
},
'loggers': {
'': {
'handlers': ['default'],
- 'level': 'WARNING',
'propagate': True,
+ 'level': 'INFO',
}
}
}
@@ -177,8 +179,19 @@
# Increase the logging level for verbose mode.
if OPTIONS.verbose:
- config = copy.deepcopy(DEFAULT_LOGGING_CONFIG)
- config['loggers']['']['level'] = 'INFO'
+ config = copy.deepcopy(config)
+ config['handlers']['default']['level'] = 'INFO'
+
+ if OPTIONS.logfile:
+ config = copy.deepcopy(config)
+ config['handlers']['logfile'] = {
+ 'class': 'logging.FileHandler',
+ 'formatter': 'standard',
+ 'level': 'INFO',
+ 'mode': 'w',
+ 'filename': OPTIONS.logfile,
+ }
+ config['loggers']['']['handlers'].append('logfile')
logging.config.dictConfig(config)
@@ -578,26 +591,19 @@
d["root_fs_config"] = os.path.join(
input_file, "META", "root_filesystem_config.txt")
- # Redirect {system,vendor}_base_fs_file.
- if "system_base_fs_file" in d:
- basename = os.path.basename(d["system_base_fs_file"])
- system_base_fs_file = os.path.join(input_file, "META", basename)
- if os.path.exists(system_base_fs_file):
- d["system_base_fs_file"] = system_base_fs_file
+ # Redirect {partition}_base_fs_file for each of the named partitions.
+ for part_name in ["system", "vendor", "system_ext", "product", "odm"]:
+ key_name = part_name + "_base_fs_file"
+ if key_name not in d:
+ continue
+ basename = os.path.basename(d[key_name])
+ base_fs_file = os.path.join(input_file, "META", basename)
+ if os.path.exists(base_fs_file):
+ d[key_name] = base_fs_file
else:
logger.warning(
- "Failed to find system base fs file: %s", system_base_fs_file)
- del d["system_base_fs_file"]
-
- if "vendor_base_fs_file" in d:
- basename = os.path.basename(d["vendor_base_fs_file"])
- vendor_base_fs_file = os.path.join(input_file, "META", basename)
- if os.path.exists(vendor_base_fs_file):
- d["vendor_base_fs_file"] = vendor_base_fs_file
- else:
- logger.warning(
- "Failed to find vendor base fs file: %s", vendor_base_fs_file)
- del d["vendor_base_fs_file"]
+ "Failed to find %s base fs file: %s", part_name, base_fs_file)
+ del d[key_name]
def makeint(key):
if key in d:
@@ -779,13 +785,7 @@
logger.info("%-25s = (%s) %s", k, type(v).__name__, v)
-def MergeDynamicPartitionInfoDicts(framework_dict,
- vendor_dict,
- include_dynamic_partition_list=True,
- size_prefix="",
- size_suffix="",
- list_prefix="",
- list_suffix=""):
+def MergeDynamicPartitionInfoDicts(framework_dict, vendor_dict):
"""Merges dynamic partition info variables.
Args:
@@ -793,18 +793,6 @@
partial framework target files.
vendor_dict: The dictionary of dynamic partition info variables from the
partial vendor target files.
- include_dynamic_partition_list: If true, merges the dynamic_partition_list
- variable. Not all use cases need this variable merged.
- size_prefix: The prefix in partition group size variables that precedes the
- name of the partition group. For example, partition group 'group_a' with
- corresponding size variable 'super_group_a_group_size' would have the
- size_prefix 'super_'.
- size_suffix: Similar to size_prefix but for the variable's suffix. For
- example, 'super_group_a_group_size' would have size_suffix '_group_size'.
- list_prefix: Similar to size_prefix but for the partition group's
- partition_list variable.
- list_suffix: Similar to size_suffix but for the partition group's
- partition_list variable.
Returns:
The merged dynamic partition info dictionary.
@@ -813,24 +801,21 @@
# Partition groups and group sizes are defined by the vendor dict because
# these values may vary for each board that uses a shared system image.
merged_dict["super_partition_groups"] = vendor_dict["super_partition_groups"]
- if include_dynamic_partition_list:
- framework_dynamic_partition_list = framework_dict.get(
- "dynamic_partition_list", "")
- vendor_dynamic_partition_list = vendor_dict.get("dynamic_partition_list",
- "")
- merged_dict["dynamic_partition_list"] = (
- "%s %s" % (framework_dynamic_partition_list,
- vendor_dynamic_partition_list)).strip()
+ framework_dynamic_partition_list = framework_dict.get(
+ "dynamic_partition_list", "")
+ vendor_dynamic_partition_list = vendor_dict.get("dynamic_partition_list", "")
+ merged_dict["dynamic_partition_list"] = ("%s %s" % (
+ framework_dynamic_partition_list, vendor_dynamic_partition_list)).strip()
for partition_group in merged_dict["super_partition_groups"].split(" "):
# Set the partition group's size using the value from the vendor dict.
- key = "%s%s%s" % (size_prefix, partition_group, size_suffix)
+ key = "super_%s_group_size" % partition_group
if key not in vendor_dict:
raise ValueError("Vendor dict does not contain required key %s." % key)
merged_dict[key] = vendor_dict[key]
# Set the partition group's partition list using a concatenation of the
# framework and vendor partition lists.
- key = "%s%s%s" % (list_prefix, partition_group, list_suffix)
+ key = "super_%s_partition_list" % partition_group
merged_dict[key] = (
"%s %s" %
(framework_dict.get(key, ""), vendor_dict.get(key, ""))).strip()
@@ -1241,7 +1226,7 @@
avbtool = info_dict["avb_avbtool"]
part_size = info_dict["vendor_boot_size"]
cmd = [avbtool, "add_hash_footer", "--image", img.name,
- "--partition_size", str(part_size), "--partition_name vendor_boot"]
+ "--partition_size", str(part_size), "--partition_name", "vendor_boot"]
AppendAVBSigningArgs(cmd, "vendor_boot")
args = info_dict.get("avb_vendor_boot_add_hash_footer_args")
if args and args.strip():
@@ -1797,6 +1782,9 @@
-h (--help)
Display this usage message and exit.
+
+ --logfile <file>
+ Put verbose logs to specified file (regardless of --verbose option.)
"""
def Usage(docstring):
@@ -1822,7 +1810,7 @@
"java_path=", "java_args=", "public_key_suffix=",
"private_key_suffix=", "boot_signer_path=", "boot_signer_args=",
"verity_signer_path=", "verity_signer_args=", "device_specific=",
- "extra="] +
+ "extra=", "logfile="] +
list(extra_long_opts))
except getopt.GetoptError as err:
Usage(docstring)
@@ -1864,6 +1852,8 @@
elif o in ("-x", "--extra"):
key, value = a.split("=", 1)
OPTIONS.extras[key] = value
+ elif o in ("--logfile",):
+ OPTIONS.logfile = a
else:
if extra_option_handler is None or not extra_option_handler(o, a):
assert False, "unknown option \"%s\"" % (o,)
diff --git a/tools/releasetools/merge_builds.py b/tools/releasetools/merge_builds.py
index ca348cf..3ac4ec4 100644
--- a/tools/releasetools/merge_builds.py
+++ b/tools/releasetools/merge_builds.py
@@ -96,12 +96,7 @@
merged_dict = dict(vendor_dict)
merged_dict.update(
common.MergeDynamicPartitionInfoDicts(
- framework_dict=framework_dict,
- vendor_dict=vendor_dict,
- size_prefix="super_",
- size_suffix="_group_size",
- list_prefix="super_",
- list_suffix="_partition_list"))
+ framework_dict=framework_dict, vendor_dict=vendor_dict))
output_super_empty_path = os.path.join(OPTIONS.product_out_vendor,
"super_empty.img")
build_super_image.BuildSuperImage(merged_dict, output_super_empty_path)
diff --git a/tools/releasetools/merge_target_files.py b/tools/releasetools/merge_target_files.py
index 544f996..eb68bc3 100755
--- a/tools/releasetools/merge_target_files.py
+++ b/tools/releasetools/merge_target_files.py
@@ -416,12 +416,7 @@
if (merged_dict.get('use_dynamic_partitions') == 'true') and (
framework_dict.get('use_dynamic_partitions') == 'true'):
merged_dynamic_partitions_dict = common.MergeDynamicPartitionInfoDicts(
- framework_dict=framework_dict,
- vendor_dict=merged_dict,
- size_prefix='super_',
- size_suffix='_group_size',
- list_prefix='super_',
- list_suffix='_partition_list')
+ framework_dict=framework_dict, vendor_dict=merged_dict)
merged_dict.update(merged_dynamic_partitions_dict)
# Ensure that add_img_to_target_files rebuilds super split images for
# devices that retrofit dynamic partitions. This flag may have been set to
@@ -480,11 +475,7 @@
merged_dynamic_partitions_dict = common.MergeDynamicPartitionInfoDicts(
framework_dict=framework_dynamic_partitions_dict,
- vendor_dict=vendor_dynamic_partitions_dict,
- # META/dynamic_partitions_info.txt does not use dynamic_partition_list.
- include_dynamic_partition_list=False,
- size_suffix='_size',
- list_suffix='_partition_list')
+ vendor_dict=vendor_dynamic_partitions_dict)
output_dynamic_partitions_info_txt = os.path.join(
output_target_files_dir, 'META', 'dynamic_partitions_info.txt')
diff --git a/tools/releasetools/sign_apex.py b/tools/releasetools/sign_apex.py
index f2daa46..4c0850c 100755
--- a/tools/releasetools/sign_apex.py
+++ b/tools/releasetools/sign_apex.py
@@ -44,7 +44,7 @@
def SignApexFile(avbtool, apex_file, payload_key, container_key,
- signing_args=None):
+ no_hashtree, signing_args=None):
"""Signs the given apex file."""
with open(apex_file, 'rb') as input_fp:
apex_data = input_fp.read()
@@ -56,7 +56,7 @@
container_key=container_key,
container_pw=None,
codename_to_api_level_map=None,
- no_hashtree=False,
+ no_hashtree=no_hashtree,
signing_args=signing_args)
diff --git a/tools/releasetools/test_common.py b/tools/releasetools/test_common.py
index 8a52419..53b5b76 100644
--- a/tools/releasetools/test_common.py
+++ b/tools/releasetools/test_common.py
@@ -1290,30 +1290,26 @@
framework_dict = {
'super_partition_groups': 'group_a',
'dynamic_partition_list': 'system',
- 'super_group_a_list': 'system',
+ 'super_group_a_partition_list': 'system',
}
vendor_dict = {
'super_partition_groups': 'group_a group_b',
'dynamic_partition_list': 'vendor product',
- 'super_group_a_list': 'vendor',
- 'super_group_a_size': '1000',
- 'super_group_b_list': 'product',
- 'super_group_b_size': '2000',
+ 'super_group_a_partition_list': 'vendor',
+ 'super_group_a_group_size': '1000',
+ 'super_group_b_partition_list': 'product',
+ 'super_group_b_group_size': '2000',
}
merged_dict = common.MergeDynamicPartitionInfoDicts(
framework_dict=framework_dict,
- vendor_dict=vendor_dict,
- size_prefix='super_',
- size_suffix='_size',
- list_prefix='super_',
- list_suffix='_list')
+ vendor_dict=vendor_dict)
expected_merged_dict = {
'super_partition_groups': 'group_a group_b',
'dynamic_partition_list': 'system vendor product',
- 'super_group_a_list': 'system vendor',
- 'super_group_a_size': '1000',
- 'super_group_b_list': 'product',
- 'super_group_b_size': '2000',
+ 'super_group_a_partition_list': 'system vendor',
+ 'super_group_a_group_size': '1000',
+ 'super_group_b_partition_list': 'product',
+ 'super_group_b_group_size': '2000',
}
self.assertEqual(merged_dict, expected_merged_dict)
@@ -1321,31 +1317,27 @@
framework_dict = {
'super_partition_groups': 'group_a',
'dynamic_partition_list': 'system',
- 'super_group_a_list': 'system',
- 'super_group_a_size': '5000',
+ 'super_group_a_partition_list': 'system',
+ 'super_group_a_group_size': '5000',
}
vendor_dict = {
'super_partition_groups': 'group_a group_b',
'dynamic_partition_list': 'vendor product',
- 'super_group_a_list': 'vendor',
- 'super_group_a_size': '1000',
- 'super_group_b_list': 'product',
- 'super_group_b_size': '2000',
+ 'super_group_a_partition_list': 'vendor',
+ 'super_group_a_group_size': '1000',
+ 'super_group_b_partition_list': 'product',
+ 'super_group_b_group_size': '2000',
}
merged_dict = common.MergeDynamicPartitionInfoDicts(
framework_dict=framework_dict,
- vendor_dict=vendor_dict,
- size_prefix='super_',
- size_suffix='_size',
- list_prefix='super_',
- list_suffix='_list')
+ vendor_dict=vendor_dict)
expected_merged_dict = {
'super_partition_groups': 'group_a group_b',
'dynamic_partition_list': 'system vendor product',
- 'super_group_a_list': 'system vendor',
- 'super_group_a_size': '1000',
- 'super_group_b_list': 'product',
- 'super_group_b_size': '2000',
+ 'super_group_a_partition_list': 'system vendor',
+ 'super_group_a_group_size': '1000',
+ 'super_group_b_partition_list': 'product',
+ 'super_group_b_group_size': '2000',
}
self.assertEqual(merged_dict, expected_merged_dict)
diff --git a/tools/releasetools/test_sign_apex.py b/tools/releasetools/test_sign_apex.py
index b4ef127..79d1de4 100644
--- a/tools/releasetools/test_sign_apex.py
+++ b/tools/releasetools/test_sign_apex.py
@@ -38,5 +38,6 @@
'avbtool',
foo_apex,
payload_key,
- container_key)
+ container_key,
+ False)
self.assertTrue(os.path.exists(signed_foo_apex))