Merge "Changes host_init_verifier to use hidl interface inheritance hierarchy."
diff --git a/core/Makefile b/core/Makefile
index 838a96c..78f510f 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -592,33 +592,26 @@
$(hide) $(POST_PROCESS_PROPS) $@
# -----------------------------------------------------------------
-# product_services build.prop (unless it's merged into /product)
-ifdef MERGE_PRODUCT_SERVICES_INTO_PRODUCT
- ifneq (,$(PRODUCT_PRODUCT_SERVICES_PROPERTIES))
- $(error PRODUCT_PRODUCT_SERVICES_PROPERTIES is not supported in this build.)
- endif
-else
-INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT_SERVICES)/build.prop
-ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET)
+# system_ext build.prop
+INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_EXT)/build.prop
+ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET)
-FINAL_PRODUCT_SERVICES_PROPERTIES += \
- $(call collapse-pairs, $(PRODUCT_PRODUCT_SERVICES_PROPERTIES))
-FINAL_PRODUCT_SERVICES_PROPERTIES := $(call uniq-pairs-by-first-component, \
- $(FINAL_PRODUCT_SERVICES_PROPERTIES),=)
-$(INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PROPS)
- @echo Target product_services buildinfo: $@
+FINAL_SYSTEM_EXT_PROPERTIES += \
+ $(call collapse-pairs, $(PRODUCT_SYSTEM_EXT_PROPERTIES))
+FINAL_SYSTEM_EXT_PROPERTIES := $(call uniq-pairs-by-first-component, \
+ $(FINAL_SYSTEM_EXT_PROPERTIES),=)
+
+$(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PROPS)
+ @echo Target system_ext buildinfo: $@
@mkdir -p $(dir $@)
$(hide) echo > $@
-ifdef BOARD_USES_PRODUCT_SERVICESIMAGE
- $(hide) $(call generate-common-build-props,product_services,$@)
-endif # BOARD_USES_PRODUCT_SERVICESIMAGE
+ $(hide) $(call generate-common-build-props,system_ext,$@)
$(hide) echo "#" >> $@; \
- echo "# ADDITIONAL PRODUCT_SERVICES PROPERTIES" >> $@; \
+ echo "# ADDITIONAL SYSTEM_EXT BUILD PROPERTIES" >> $@; \
echo "#" >> $@;
- $(hide) $(foreach line,$(FINAL_PRODUCT_SERVICES_PROPERTIES), \
+ $(hide) $(foreach line,$(FINAL_SYSTEM_EXT_PROPERTIES), \
echo "$(line)" >> $@;)
$(hide) $(POST_PROCESS_PROPS) $@
-endif # MERGE_PRODUCT_SERVICES_INTO_PRODUCT
# ----------------------------------------------------------------
@@ -716,32 +709,40 @@
(for MODULE in $$(PRIVATE_LOAD_MODULES); do basename $$$$MODULE >> $$@; done)
endef
+# Until support for a vendor-boot/vendor-ramdisk is added, store vendor ramdisk
+# kernel modules on the generic ramdisk as a stopgap.
+ifneq ($(BOARD_VENDOR_RAMDISK_KERNEL_MODULES),)
+ BOARD_GENERIC_RAMDISK_KERNEL_MODULES += $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES)
+endif
+ifneq ($(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD),)
+ BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD += $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD)
+endif
ifeq ($(BOARD_RECOVERY_KERNEL_MODULES_LOAD),)
BOARD_RECOVERY_KERNEL_MODULES_LOAD := $(BOARD_RECOVERY_KERNEL_MODULES)
endif
-ifeq ($(BOARD_RAMDISK_KERNEL_MODULES_LOAD),)
- BOARD_RAMDISK_KERNEL_MODULES_LOAD := $(BOARD_RAMDISK_KERNEL_MODULES)
+ifeq ($(BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD),)
+ BOARD_GENERIC_RAMDISK_KERNEL_MODULES_LOAD := $(BOARD_GENERIC_RAMDISK_KERNEL_MODULES)
endif
-ifdef BOARD_RAMDISK_KERNEL_MODULES
+ifdef BOARD_GENERIC_RAMDISK_KERNEL_MODULES
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT), true)
- BOARD_RECOVERY_KERNEL_MODULES += $(BOARD_RAMDISK_KERNEL_MODULES)
+ BOARD_RECOVERY_KERNEL_MODULES += $(BOARD_GENERIC_RAMDISK_KERNEL_MODULES)
endif
endif
ifdef BOARD_RECOVERY_KERNEL_MODULES
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT), true)
- ifdef BOARD_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_RAMDISK_KERNEL_MODULES_LOAD),modules.load,$(TARGET_RECOVERY_ROOT_OUT)))
+ 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))
endif
ifneq ($(BOARD_USES_RECOVERY_AS_BOOT), true)
- ifdef BOARD_RAMDISK_KERNEL_MODULES
- ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(call build-image-kernel-modules,$(BOARD_RAMDISK_KERNEL_MODULES),$(TARGET_RAMDISK_OUT),,$(call intermediates-dir-for,PACKAGING,depmod_ramdisk),$(BOARD_RAMDISK_KERNEL_MODULES_LOAD),modules.load))
+ ifdef 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))
endif
endif
@@ -1195,10 +1196,10 @@
$(2) : $(3)
$(3) : $(6) $(BUILD_SYSTEM)/Makefile build/make/tools/generate-notice-files.py
build/make/tools/generate-notice-files.py --text-output $(2) \
- $(if $(filter $(1),xml_excluded_extra_partitions),-e vendor -e product -e product_services --xml-output, \
+ $(if $(filter $(1),xml_excluded_extra_partitions),-e vendor -e product -e system_ext --xml-output, \
$(if $(filter $(1),xml_vendor),-i vendor --xml-output, \
$(if $(filter $(1),xml_product),-i product --xml-output, \
- $(if $(filter $(1),xml_product_services),-i product_services --xml-output, \
+ $(if $(filter $(1),xml_system_ext),-i system_ext --xml-output, \
--html-output)))) $(3) \
-t $$(PRIVATE_MESSAGE) -s $$(PRIVATE_DIR)/src
notice_files: $(2) $(3)
@@ -1247,10 +1248,10 @@
target_product_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT.xml.gz
installed_product_notice_xml_gz := $(TARGET_OUT_PRODUCT)/etc/NOTICE.xml.gz
-target_product_services_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT_SERVICES.txt
-target_product_services_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT_SERVICES.xml
-target_product_services_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT_SERVICES.xml.gz
-installed_product_services_notice_xml_gz := $(TARGET_OUT_PRODUCT_SERVICES)/etc/NOTICE.xml.gz
+target_system_ext_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_EXT.txt
+target_system_ext_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_EXT.xml
+target_system_ext_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_EXT.xml.gz
+installed_system_ext_notice_xml_gz := $(TARGET_OUT_SYSTEM_EXT)/etc/NOTICE.xml.gz
# Notice files are copied to TARGET_OUT_NOTICE_FILES as a side-effect of their module
# being built. A notice xml file must depend on all modules that could potentially
@@ -1262,8 +1263,8 @@
license_modules := $(filter-out $(TARGET_OUT_TESTCASES)/%,$(license_modules))
license_modules_vendor := $(filter $(TARGET_OUT_VENDOR)/%,$(license_modules))
license_modules_product := $(filter $(TARGET_OUT_PRODUCT)/%,$(license_modules))
-license_modules_product_services := $(filter $(TARGET_OUT_PRODUCT_SERVICES)/%,$(license_modules))
-license_modules_agg := $(license_modules_vendor) $(license_modules_product) $(license_modules_product_services)
+license_modules_system_ext := $(filter $(TARGET_OUT_SYSTEM_EXT)/%,$(license_modules))
+license_modules_agg := $(license_modules_vendor) $(license_modules_product) $(license_modules_system_ext)
license_modules_rest := $(filter-out $(license_modules_agg),$(license_modules))
$(eval $(call combine-notice-files, xml_excluded_extra_partitions, \
@@ -1284,12 +1285,12 @@
"Notices for files contained in the product filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_product)))
-$(eval $(call combine-notice-files, xml_product_services, \
- $(target_product_services_notice_file_txt), \
- $(target_product_services_notice_file_xml), \
- "Notices for files contained in the product_services filesystem image in this directory:", \
+$(eval $(call combine-notice-files, xml_system_ext, \
+ $(target_system_ext_notice_file_txt), \
+ $(target_system_ext_notice_file_xml), \
+ "Notices for files contained in the system_ext filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
- $(license_modules_product_services)))
+ $(license_modules_system_ext)))
$(target_notice_file_xml_gz): $(target_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
@@ -1297,7 +1298,7 @@
$(hide) $(MINIGZIP) -9 < $< > $@
$(target_product_notice_file_xml_gz): $(target_product_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
-$(target_product_services_notice_file_xml_gz): $(target_product_services_notice_file_xml) | $(MINIGZIP)
+$(target_system_ext_notice_file_xml_gz): $(target_system_ext_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(installed_notice_html_or_xml_gz): $(target_notice_file_xml_gz)
$(copy-file-to-target)
@@ -1305,20 +1306,15 @@
$(copy-file-to-target)
$(installed_product_notice_xml_gz): $(target_product_notice_file_xml_gz)
$(copy-file-to-target)
-
-# No notice file for product_services if its contents are merged into /product.
-# The notices will be part of the /product notice file.
-ifndef MERGE_PRODUCT_SERVICES_INTO_PRODUCT
-$(installed_product_services_notice_xml_gz): $(target_product_services_notice_file_xml_gz)
+$(installed_system_ext_notice_xml_gz): $(target_system_ext_notice_file_xml_gz)
$(copy-file-to-target)
-endif
# if we've been run my mm, mmm, etc, don't reinstall this every time
ifeq ($(ONE_SHOT_MAKEFILE),)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_or_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_notice_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_product_notice_xml_gz)
- ALL_DEFAULT_INSTALLED_MODULES += $(installed_product_services_notice_xml_gz)
+ ALL_DEFAULT_INSTALLED_MODULES += $(installed_system_ext_notice_xml_gz)
endif
endif # PRODUCT_NOTICE_SPLIT
@@ -1387,7 +1383,7 @@
INTERNAL_USERIMAGES_DEPS += $(MKF2FSUSERIMG)
endif
-ifneq ($(filter $(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE) $(BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE) $(BOARD_ODMIMAGE_FILE_SYSTEM_TYPE) $(BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE) $(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE),squashfs),)
+ifneq ($(filter $(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE) $(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE) $(BOARD_ODMIMAGE_FILE_SYSTEM_TYPE) $(BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE) $(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE),squashfs),)
INTERNAL_USERIMAGES_DEPS += $(MKSQUASHFSUSERIMG)
endif
@@ -1420,7 +1416,7 @@
endif # PRODUCT_USE_DYNAMIC_PARTITIONS
# $(1): the path of the output dictionary file
-# $(2): a subset of "system vendor cache userdata product product_services oem odm"
+# $(2): a subset of "system vendor cache userdata product system_ext oem odm"
# $(3): additional "key=value" pairs to append to the dictionary file.
define generate-image-prop-dictionary
$(if $(filter $(2),system),\
@@ -1477,18 +1473,18 @@
$(if $(BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE),$(hide) echo "product_reserved_size=$(BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE)" >> $(1))
$(hide) echo "product_selinux_fc=$(SELINUX_FC)" >> $(1)
)
-$(if $(filter $(2),product_services),\
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "product_services_fs_type=$(BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE)" >> $(1))
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT),$(hide) echo "product_services_extfs_inode_count=$(BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT)" >> $(1))
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT),$(hide) echo "product_services_extfs_rsv_pct=$(BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT)" >> $(1))
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE),$(hide) echo "product_services_size=$(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE)" >> $(1))
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE),$(hide) echo "product_services_journal_size=$(BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE)" >> $(1))
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR),$(hide) echo "product_services_squashfs_compressor=$(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR)" >> $(1))
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT),$(hide) echo "product_services_squashfs_compressor_opt=$(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT)" >> $(1))
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE),$(hide) echo "product_services_squashfs_block_size=$(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE)" >> $(1))
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN),$(hide) echo "product_services_squashfs_disable_4k_align=$(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN)" >> $(1))
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE),$(hide) echo "product_services_reserved_size=$(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE)" >> $(1))
- $(hide) echo "product_services_selinux_fc=$(SELINUX_FC)" >> $(1)
+$(if $(filter $(2),system_ext),\
+ $(if $(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "system_ext_fs_type=$(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE)" >> $(1))
+ $(if $(BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT),$(hide) echo "system_ext_extfs_inode_count=$(BOARD_SYSTEM_EXTIMAGE_EXTFS_INODE_COUNT)" >> $(1))
+ $(if $(BOARD_SYSTEM_EXTIMAGE_EXTFS_RSV_PCT),$(hide) echo "system_ext_extfs_rsv_pct=$(BOARD_SYSTEM_EXTIMAGE_EXTFS_RSV_PCT)" >> $(1))
+ $(if $(BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE),$(hide) echo "system_ext_size=$(BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE)" >> $(1))
+ $(if $(BOARD_SYSTEM_EXTIMAGE_JOURNAL_SIZE),$(hide) echo "system_ext_journal_size=$(BOARD_SYSTEM_EXTIMAGE_JOURNAL_SIZE)" >> $(1))
+ $(if $(BOARD_SYSTEM_EXTIMAGE_SQUASHFS_COMPRESSOR),$(hide) echo "system_ext_squashfs_compressor=$(BOARD_SYSTEM_EXTIMAGE_SQUASHFS_COMPRESSOR)" >> $(1))
+ $(if $(BOARD_SYSTEM_EXTIMAGE_SQUASHFS_COMPRESSOR_OPT),$(hide) echo "system_ext_squashfs_compressor_opt=$(BOARD_SYSTEM_EXTIMAGE_SQUASHFS_COMPRESSOR_OPT)" >> $(1))
+ $(if $(BOARD_SYSTEM_EXTIMAGE_SQUASHFS_BLOCK_SIZE),$(hide) echo "system_ext_squashfs_block_size=$(BOARD_SYSTEM_EXTIMAGE_SQUASHFS_BLOCK_SIZE)" >> $(1))
+ $(if $(BOARD_SYSTEM_EXTIMAGE_SQUASHFS_DISABLE_4K_ALIGN),$(hide) echo "system_ext_squashfs_disable_4k_align=$(BOARD_SYSTEM_EXTIMAGE_SQUASHFS_DISABLE_4K_ALIGN)" >> $(1))
+ $(if $(BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE),$(hide) echo "system_ext_reserved_size=$(BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE)" >> $(1))
+ $(hide) echo "system_ext_selinux_fc=$(SELINUX_FC)" >> $(1)
)
$(if $(filter $(2),odm),\
$(if $(BOARD_ODMIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "odm_fs_type=$(BOARD_ODMIMAGE_FILE_SYSTEM_TYPE)" >> $(1))
@@ -1528,7 +1524,7 @@
$(if $(PRODUCT_SYSTEM_VERITY_PARTITION),$(hide) echo "system_verity_block_device=$(PRODUCT_SYSTEM_VERITY_PARTITION)" >> $(1))
$(if $(PRODUCT_VENDOR_VERITY_PARTITION),$(hide) echo "vendor_verity_block_device=$(PRODUCT_VENDOR_VERITY_PARTITION)" >> $(1))
$(if $(PRODUCT_PRODUCT_VERITY_PARTITION),$(hide) echo "product_verity_block_device=$(PRODUCT_PRODUCT_VERITY_PARTITION)" >> $(1))
-$(if $(PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION),$(hide) echo "product_services_verity_block_device=$(PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION)" >> $(1))
+$(if $(PRODUCT_SYSTEM_EXT_VERITY_PARTITION),$(hide) echo "system_ext_verity_block_device=$(PRODUCT_SYSTEM_EXT_VERITY_PARTITION)" >> $(1))
$(if $(PRODUCT_SUPPORTS_VBOOT),$(hide) echo "vboot=$(PRODUCT_SUPPORTS_VBOOT)" >> $(1))
$(if $(PRODUCT_SUPPORTS_VBOOT),$(hide) echo "vboot_key=$(PRODUCT_VBOOT_SIGNING_KEY)" >> $(1))
$(if $(PRODUCT_SUPPORTS_VBOOT),$(hide) echo "vboot_subkey=$(PRODUCT_VBOOT_SIGNING_SUBKEY)" >> $(1))
@@ -1562,14 +1558,14 @@
$(hide) echo "avb_product_key_path=$(BOARD_AVB_PRODUCT_KEY_PATH)" >> $(1)
$(hide) echo "avb_product_algorithm=$(BOARD_AVB_PRODUCT_ALGORITHM)" >> $(1)
$(hide) echo "avb_product_rollback_index_location=$(BOARD_AVB_PRODUCT_ROLLBACK_INDEX_LOCATION)" >> $(1)))
-$(if $(BOARD_AVB_ENABLE),$(hide) echo "avb_product_services_hashtree_enable=$(BOARD_AVB_ENABLE)" >> $(1))
+$(if $(BOARD_AVB_ENABLE),$(hide) echo "avb_system_ext_hashtree_enable=$(BOARD_AVB_ENABLE)" >> $(1))
$(if $(BOARD_AVB_ENABLE),\
- $(hide) echo "avb_product_services_add_hashtree_footer_args=$(BOARD_AVB_PRODUCT_SERVICES_ADD_HASHTREE_FOOTER_ARGS)" >> $(1))
+ $(hide) echo "avb_system_ext_add_hashtree_footer_args=$(BOARD_AVB_SYSTEM_EXT_ADD_HASHTREE_FOOTER_ARGS)" >> $(1))
$(if $(BOARD_AVB_ENABLE),\
- $(if $(BOARD_AVB_PRODUCT_SERVICES_KEY_PATH),\
- $(hide) echo "avb_product_services_key_path=$(BOARD_AVB_PRODUCT_SERVICES_KEY_PATH)" >> $(1)
- $(hide) echo "avb_product_services_algorithm=$(BOARD_AVB_PRODUCT_SERVICES_ALGORITHM)" >> $(1)
- $(hide) echo "avb_product_services_rollback_index_location=$(BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION)" >> $(1)))
+ $(if $(BOARD_AVB_SYSTEM_EXT_KEY_PATH),\
+ $(hide) echo "avb_system_ext_key_path=$(BOARD_AVB_SYSTEM_EXT_KEY_PATH)" >> $(1)
+ $(hide) echo "avb_system_ext_algorithm=$(BOARD_AVB_SYSTEM_EXT_ALGORITHM)" >> $(1)
+ $(hide) echo "avb_system_ext_rollback_index_location=$(BOARD_AVB_SYSTEM_EXT_ROLLBACK_INDEX_LOCATION)" >> $(1)))
$(if $(BOARD_AVB_ENABLE),$(hide) echo "avb_odm_hashtree_enable=$(BOARD_AVB_ENABLE)" >> $(1))
$(if $(BOARD_AVB_ENABLE),$(hide) echo "avb_odm_add_hashtree_footer_args=$(BOARD_AVB_ODM_ADD_HASHTREE_FOOTER_ARGS)" >> $(1))
$(if $(BOARD_AVB_ENABLE),\
@@ -1604,8 +1600,8 @@
ifdef BUILDING_PRODUCT_IMAGE
PROP_DICTIONARY_IMAGES += product
endif
-ifdef BUILDING_PRODUCT_SERVICES_IMAGE
- PROP_DICTIONARY_IMAGES += product_services
+ifdef BUILDING_SYSTEM_EXT_IMAGE
+ PROP_DICTIONARY_IMAGES += system_ext
endif
ifdef BUILDING_ODM_IMAGE
PROP_DICTIONARY_IMAGES += odm
@@ -1881,7 +1877,7 @@
$(INSTALLED_VENDOR_BUILD_PROP_TARGET) \
$(INSTALLED_ODM_BUILD_PROP_TARGET) \
$(INSTALLED_PRODUCT_BUILD_PROP_TARGET) \
- $(INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET)
+ $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET)
@echo "Target recovery buildinfo: $@"
$(hide) mkdir -p $(dir $@)
$(hide) rm -f $@
@@ -1891,7 +1887,7 @@
$(hide) cat $(INSTALLED_VENDOR_BUILD_PROP_TARGET) >> $@
$(hide) cat $(INSTALLED_ODM_BUILD_PROP_TARGET) >> $@
$(hide) cat $(INSTALLED_PRODUCT_BUILD_PROP_TARGET) >> $@
- $(hide) cat $(INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET) >> $@
+ $(hide) cat $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET) >> $@
$(call append-recovery-ui-properties,$(PRIVATE_RECOVERY_UI_PROPERTIES),$@)
INTERNAL_RECOVERYIMAGE_ARGS := \
@@ -2275,33 +2271,18 @@
endef
endif
-# Create symlink /system/product_services to /product_services if necessary.
-ifdef BOARD_USES_PRODUCT_SERVICESIMAGE
-define create-system-product_services-symlink
-$(hide) if [ -d $(TARGET_OUT)/product_services ] && [ ! -h $(TARGET_OUT)/product_services ]; then \
- echo 'Non-symlink $(TARGET_OUT)/product_services detected!' 1>&2; \
- echo 'You cannot install files to $(TARGET_OUT)/product_services while building a separate product_services.img!' 1>&2; \
+# Create symlink /system/system_ext to /system_ext if necessary.
+ifdef BOARD_USES_SYSTEM_EXTIMAGE
+define create-system-system_ext-symlink
+$(hide) if [ -d $(TARGET_OUT)/system_ext ] && [ ! -h $(TARGET_OUT)/system_ext ]; then \
+ echo 'Non-symlink $(TARGET_OUT)/system_ext detected!' 1>&2; \
+ echo 'You cannot install files to $(TARGET_OUT)/system_ext while building a separate system_ext.img!' 1>&2; \
exit 1; \
fi
-$(hide) ln -sf /product_services $(TARGET_OUT)/product_services
+$(hide) ln -sf /system_ext $(TARGET_OUT)/system_ext
endef
else
-define create-system-product_services-symlink
-endef
-endif
-
-# Create symlink /vendor/odm to /odm if necessary.
-ifdef BOARD_USES_ODMIMAGE
-define create-vendor-odm-symlink
-$(hide) if [ -d $(TARGET_OUT_VENDOR)/odm ] && [ ! -h $(TARGET_OUT_VENDOR)/odm ]; then \
- echo 'Non-symlink $(TARGET_OUT_VENDOR)/odm detected!' 1>&2; \
- echo 'You cannot install files to $(TARGET_OUT_VENDOR)/odm while building a separate odm.img!' 1>&2; \
- exit 1; \
-fi
-$(hide) ln -sf /odm $(TARGET_OUT_VENDOR)/odm
-endef
-else
-define create-vendor-odm-symlink
+define create-system-system_ext-symlink
endef
endif
@@ -2310,7 +2291,7 @@
@echo "Target system fs image: $(1)"
$(call create-system-vendor-symlink)
$(call create-system-product-symlink)
- $(call create-system-product_services-symlink)
+ $(call create-system-system_ext-symlink)
$(call check-apex-libs-absence-on-disk)
@mkdir -p $(dir $(1)) $(systemimage_intermediates) && rm -rf $(systemimage_intermediates)/system_image_info.txt
$(call generate-image-prop-dictionary, $(systemimage_intermediates)/system_image_info.txt,system, \
@@ -2389,36 +2370,6 @@
.PHONY: sync syncsys
sync syncsys: $(INTERNAL_SYSTEMIMAGE_FILES)
-#######
-## system tarball
-define build-systemtarball-target
- $(call pretty,"Target system fs tarball: $(INSTALLED_SYSTEMTARBALL_TARGET)")
- $(call create-system-vendor-symlink)
- $(call create-system-product-symlink)
- $(call create-system-product_services-symlink)
- $(MKTARBALL) $(FS_GET_STATS) \
- $(PRODUCT_OUT) system $(PRIVATE_SYSTEM_TAR) \
- $(INSTALLED_SYSTEMTARBALL_TARGET) $(TARGET_OUT)
-endef
-
-ifndef SYSTEM_TARBALL_FORMAT
- SYSTEM_TARBALL_FORMAT := bz2
-endif
-
-system_tar := $(PRODUCT_OUT)/system.tar
-INSTALLED_SYSTEMTARBALL_TARGET := $(system_tar).$(SYSTEM_TARBALL_FORMAT)
-$(INSTALLED_SYSTEMTARBALL_TARGET): PRIVATE_SYSTEM_TAR := $(system_tar)
-$(INSTALLED_SYSTEMTARBALL_TARGET): $(FS_GET_STATS) $(INTERNAL_SYSTEMIMAGE_FILES)
- $(build-systemtarball-target)
-
-.PHONY: systemtarball-nodeps
-systemtarball-nodeps: $(FS_GET_STATS) \
- $(filter-out systemtarball-nodeps stnod,$(MAKECMDGOALS))
- $(build-systemtarball-target)
-
-.PHONY: stnod
-stnod: systemtarball-nodeps
-
# -----------------------------------------------------------------
## platform.zip: system, plus other files to be used in PDK fusion build,
## in a zip file
@@ -2482,8 +2433,8 @@
ifdef BUILDING_PRODUCT_IMAGE
echo "-D $(TARGET_OUT_PRODUCT)" >> $@.lst
endif
-ifdef BUILDING_PRODUCT_SERVICES_IMAGE
- echo "-D $(TARGET_OUT_PRODUCT_SERVICES)" >> $@.lst
+ifdef BUILDING_SYSTEM_EXT_IMAGE
+ echo "-D $(TARGET_OUT_SYSTEM_EXT)" >> $@.lst
endif
ifdef BUILDING_ODM_IMAGE
echo "-D $(TARGET_OUT_ODM)" >> $@.lst
@@ -2521,34 +2472,6 @@
endif # BUILD_PLATFORM_ZIP
# -----------------------------------------------------------------
-## boot tarball
-define build-boottarball-target
- $(hide) echo "Target boot fs tarball: $(INSTALLED_BOOTTARBALL_TARGET)"
- $(hide) mkdir -p $(PRODUCT_OUT)/boot
- $(hide) cp -f $(INTERNAL_BOOTIMAGE_FILES) $(PRODUCT_OUT)/boot/.
- $(hide) echo $(INTERNAL_KERNEL_CMDLINE) > $(PRODUCT_OUT)/boot/cmdline
- $(hide) $(MKTARBALL) $(FS_GET_STATS) \
- $(PRODUCT_OUT) boot $(PRIVATE_BOOT_TAR) \
- $(INSTALLED_BOOTTARBALL_TARGET) $(TARGET_OUT)
-endef
-
-ifndef BOOT_TARBALL_FORMAT
- BOOT_TARBALL_FORMAT := bz2
-endif
-
-boot_tar := $(PRODUCT_OUT)/boot.tar
-INSTALLED_BOOTTARBALL_TARGET := $(boot_tar).$(BOOT_TARBALL_FORMAT)
-$(INSTALLED_BOOTTARBALL_TARGET): PRIVATE_BOOT_TAR := $(boot_tar)
-$(INSTALLED_BOOTTARBALL_TARGET): $(FS_GET_STATS) $(INTERNAL_BOOTIMAGE_FILES)
- $(build-boottarball-target)
-
-.PHONY: boottarball-nodeps btnod
-boottarball-nodeps btnod: $(FS_GET_STATS) \
- $(filter-out boottarball-nodeps btnod,$(MAKECMDGOALS))
- $(build-boottarball-target)
-
-
-# -----------------------------------------------------------------
# data partition image
INTERNAL_USERDATAIMAGE_FILES := \
$(filter $(TARGET_OUT_DATA)/%,$(ALL_DEFAULT_INSTALLED_MODULES))
@@ -2597,29 +2520,6 @@
$(ASAN_IN_SYSTEM_INSTALLED): $(INSTALLED_USERDATAIMAGE_TARGET_DEPS)
tar cfj $(ASAN_IN_SYSTEM_INSTALLED) $(ASAN_SYSTEM_INSTALL_OPTIONS) -C $(TARGET_OUT_DATA)/.. $(ASAN_OUT_DIRS_FOR_SYSTEM_INSTALL) >/dev/null
-#######
-## data partition tarball
-define build-userdatatarball-target
- $(call pretty,"Target userdata fs tarball: " \
- "$(INSTALLED_USERDATATARBALL_TARGET)")
- $(MKTARBALL) $(FS_GET_STATS) \
- $(PRODUCT_OUT) data $(PRIVATE_USERDATA_TAR) \
- $(INSTALLED_USERDATATARBALL_TARGET) $(TARGET_OUT)
-endef
-
-userdata_tar := $(PRODUCT_OUT)/userdata.tar
-INSTALLED_USERDATATARBALL_TARGET := $(userdata_tar).bz2
-$(INSTALLED_USERDATATARBALL_TARGET): PRIVATE_USERDATA_TAR := $(userdata_tar)
-$(INSTALLED_USERDATATARBALL_TARGET): $(FS_GET_STATS) $(INTERNAL_USERDATAIMAGE_FILES)
- $(build-userdatatarball-target)
-
-$(call dist-for-goals,userdatatarball,$(INSTALLED_USERDATATARBALL_TARGET))
-
-.PHONY: userdatatarball-nodeps
-userdatatarball-nodeps: $(FS_GET_STATS)
- $(build-userdatatarball-target)
-
-
# -----------------------------------------------------------------
# partition table image
ifdef BOARD_BPT_INPUT_FILES
@@ -2869,6 +2769,21 @@
$(hide) $(FILESLIST) $(TARGET_OUT_VENDOR) > $(@:.txt=.json)
$(hide) $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
+# Create symlink /vendor/odm to /odm if necessary.
+ifdef BOARD_USES_ODMIMAGE
+define create-vendor-odm-symlink
+$(hide) if [ -d $(TARGET_OUT_VENDOR)/odm ] && [ ! -h $(TARGET_OUT_VENDOR)/odm ]; then \
+ echo 'Non-symlink $(TARGET_OUT_VENDOR)/odm detected!' 1>&2; \
+ echo 'You cannot install files to $(TARGET_OUT_VENDOR)/odm while building a separate odm.img!' 1>&2; \
+ exit 1; \
+fi
+$(hide) ln -sf /odm $(TARGET_OUT_VENDOR)/odm
+endef
+else
+define create-vendor-odm-symlink
+endef
+endif
+
vendorimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,vendor)
BUILT_VENDORIMAGE_TARGET := $(PRODUCT_OUT)/vendor.img
@@ -3002,55 +2917,55 @@
endif # BUILDING_SYSTEM_IMAGE
# -----------------------------------------------------------------
-# product_services partition image
-ifdef BUILDING_PRODUCT_SERVICES_IMAGE
-INTERNAL_PRODUCT_SERVICESIMAGE_FILES := \
- $(filter $(TARGET_OUT_PRODUCT_SERVICES)/%,\
+# system_ext partition image
+ifdef BUILDING_SYSTEM_EXT_IMAGE
+INTERNAL_SYSTEM_EXTIMAGE_FILES := \
+ $(filter $(TARGET_OUT_SYSTEM_EXT)/%,\
$(ALL_DEFAULT_INSTALLED_MODULES)\
$(ALL_PDK_FUSION_FILES)) \
$(PDK_FUSION_SYMLINK_STAMP)
-# platform.zip depends on $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES).
-$(INSTALLED_PLATFORM_ZIP) : $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES)
+# platform.zip depends on $(INTERNAL_SYSTEM_EXTIMAGE_FILES).
+$(INSTALLED_PLATFORM_ZIP) : $(INTERNAL_SYSTEM_EXTIMAGE_FILES)
-INSTALLED_FILES_FILE_PRODUCT_SERVICES := $(PRODUCT_OUT)/installed-files-product_services.txt
-INSTALLED_FILES_JSON_PRODUCT_SERVICES := $(INSTALLED_FILES_FILE_PRODUCT_SERVICES:.txt=.json)
-$(INSTALLED_FILES_FILE_PRODUCT_SERVICES): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_PRODUCT_SERVICES)
-$(INSTALLED_FILES_FILE_PRODUCT_SERVICES) : $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES) $(FILESLIST) $(FILESLIST_UTIL)
+INSTALLED_FILES_FILE_SYSTEM_EXT := $(PRODUCT_OUT)/installed-files-system_ext.txt
+INSTALLED_FILES_JSON_SYSTEM_EXT := $(INSTALLED_FILES_FILE_SYSTEM_EXT:.txt=.json)
+$(INSTALLED_FILES_FILE_SYSTEM_EXT): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_SYSTEM_EXT)
+$(INSTALLED_FILES_FILE_SYSTEM_EXT) : $(INTERNAL_SYSTEM_EXTIMAGE_FILES) $(FILESLIST) $(FILESLIST_UTIL)
@echo Installed file list: $@
@mkdir -p $(dir $@)
@rm -f $@
- $(hide) $(FILESLIST) $(TARGET_OUT_PRODUCT_SERVICES) > $(@:.txt=.json)
+ $(hide) $(FILESLIST) $(TARGET_OUT_SYSTEM_EXT) > $(@:.txt=.json)
$(hide) $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
-product_servicesimage_intermediates := \
- $(call intermediates-dir-for,PACKAGING,product_services)
-BUILT_PRODUCT_SERVICESIMAGE_TARGET := $(PRODUCT_OUT)/product_services.img
-define build-product_servicesimage-target
- $(call pretty,"Target product_services fs image: $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET)")
- @mkdir -p $(TARGET_OUT_PRODUCT_SERVICES)
- @mkdir -p $(product_servicesimage_intermediates) && rm -rf $(product_servicesimage_intermediates)/product_services_image_info.txt
- $(call generate-image-prop-dictionary, $(product_servicesimage_intermediates)/product_services_image_info.txt,product_services, skip_fsck=true)
+system_extimage_intermediates := \
+ $(call intermediates-dir-for,PACKAGING,system_ext)
+BUILT_SYSTEM_EXTIMAGE_TARGET := $(PRODUCT_OUT)/system_ext.img
+define build-system_extimage-target
+ $(call pretty,"Target system_ext fs image: $(INSTALLED_SYSTEM_EXTIMAGE_TARGET)")
+ @mkdir -p $(TARGET_OUT_SYSTEM_EXT)
+ @mkdir -p $(system_extimage_intermediates) && rm -rf $(system_extimage_intermediates)/system_ext_image_info.txt
+ $(call generate-image-prop-dictionary, $(system_extimage_intermediates)/system_ext_image_info.txt,system_ext, skip_fsck=true)
PATH=$(INTERNAL_USERIMAGES_BINARY_PATHS):$$PATH \
./build/tools/releasetools/build_image.py \
- $(TARGET_OUT_PRODUCT_SERVICES) $(product_servicesimage_intermediates)/product_services_image_info.txt $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) $(TARGET_OUT)
- $(hide) $(call assert-max-image-size,$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET),$(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE))
+ $(TARGET_OUT_SYSTEM_EXT) $(system_extimage_intermediates)/system_ext_image_info.txt $(INSTALLED_SYSTEM_EXTIMAGE_TARGET) $(TARGET_OUT)
+ $(hide) $(call assert-max-image-size,$(INSTALLED_SYSTEM_EXTIMAGE_TARGET),$(BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE))
endef
# We just build this directly to the install location.
-INSTALLED_PRODUCT_SERVICESIMAGE_TARGET := $(BUILT_PRODUCT_SERVICESIMAGE_TARGET)
-$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES) $(INSTALLED_FILES_FILE_PRODUCT_SERVICES) $(BUILD_IMAGE_SRCS)
- $(build-product_servicesimage-target)
+INSTALLED_SYSTEM_EXTIMAGE_TARGET := $(BUILT_SYSTEM_EXTIMAGE_TARGET)
+$(INSTALLED_SYSTEM_EXTIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_SYSTEM_EXTIMAGE_FILES) $(INSTALLED_FILES_FILE_SYSTEM_EXT) $(BUILD_IMAGE_SRCS)
+ $(build-system_extimage-target)
-.PHONY: productservicesimage-nodeps psnod
-productservicesimage-nodeps psnod: | $(INTERNAL_USERIMAGES_DEPS)
- $(build-product_servicesimage-target)
+.PHONY: systemextimage-nodeps senod
+systemextimage-nodeps senod: | $(INTERNAL_USERIMAGES_DEPS)
+ $(build-system_extimage-target)
-sync: $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES)
+sync: $(INTERNAL_SYSTEM_EXTIMAGE_FILES)
-else ifdef BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
-INSTALLED_PRODUCT_SERVICESIMAGE_TARGET := $(PRODUCT_OUT)/product_services.img
-$(eval $(call copy-one-file,$(BOARD_PREBUILT_PRODUCT_SERVICESIMAGE),$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET)))
+else ifdef BOARD_PREBUILT_SYSTEM_EXTIMAGE
+INSTALLED_SYSTEM_EXTIMAGE_TARGET := $(PRODUCT_OUT)/system_ext.img
+$(eval $(call copy-one-file,$(BOARD_PREBUILT_SYSTEM_EXTIMAGE),$(INSTALLED_SYSTEM_EXTIMAGE_TARGET)))
endif
# -----------------------------------------------------------------
@@ -3127,7 +3042,7 @@
# Returns a list of image targets corresponding to the given list of partitions. For example, it
# returns "$(INSTALLED_PRODUCTIMAGE_TARGET)" for "product", or "$(INSTALLED_SYSTEMIMAGE_TARGET)
# $(INSTALLED_VENDORIMAGE_TARGET)" for "system vendor".
-# (1): list of partitions like "system", "vendor" or "system product product_services".
+# (1): list of partitions like "system", "vendor" or "system product system_ext".
define images-for-partitions
$(strip $(foreach item,$(1),$(INSTALLED_$(call to-upper,$(item))IMAGE_TARGET)))
endef
@@ -3189,9 +3104,9 @@
--prop com.android.build.product.os_version:$(PLATFORM_VERSION) \
--prop com.android.build.product.security_patch:$(PLATFORM_SECURITY_PATCH)
-BOARD_AVB_PRODUCT_SERVICES_ADD_HASHTREE_FOOTER_ARGS += \
- --prop com.android.build.product_services.os_version:$(PLATFORM_VERSION) \
- --prop com.android.build.product_services.security_patch:$(PLATFORM_SECURITY_PATCH)
+BOARD_AVB_SYSTEM_EXT_ADD_HASHTREE_FOOTER_ARGS += \
+ --prop com.android.build.system_ext.os_version:$(PLATFORM_VERSION) \
+ --prop com.android.build.system_ext.security_patch:$(PLATFORM_SECURITY_PATCH)
BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \
--prop com.android.build.boot.os_version:$(PLATFORM_VERSION)
@@ -3224,7 +3139,7 @@
VENDOR_FOOTER_ARGS := BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS
RECOVERY_FOOTER_ARGS := BOARD_AVB_RECOVERY_ADD_HASH_FOOTER_ARGS
PRODUCT_FOOTER_ARGS := BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS
-PRODUCT_SERVICES_FOOTER_ARGS := BOARD_AVB_PRODUCT_SERVICES_ADD_HASHTREE_FOOTER_ARGS
+SYSTEM_EXT_FOOTER_ARGS := BOARD_AVB_SYSTEM_EXT_ADD_HASHTREE_FOOTER_ARGS
ODM_FOOTER_ARGS := BOARD_AVB_ODM_ADD_HASHTREE_FOOTER_ARGS
# Helper function that checks and sets required build variables for an AVB chained partition.
@@ -3287,8 +3202,8 @@
$(eval $(call check-and-set-avb-args,product))
endif
-ifdef INSTALLED_PRODUCT_SERVICESIMAGE_TARGET
-$(eval $(call check-and-set-avb-args,product_services))
+ifdef INSTALLED_SYSTEM_EXTIMAGE_TARGET
+$(eval $(call check-and-set-avb-args,system_ext))
endif
ifdef INSTALLED_ODMIMAGE_TARGET
@@ -3361,9 +3276,9 @@
$(if $(BOARD_AVB_PRODUCT_KEY_PATH),\
$(hide) $(AVBTOOL) extract_public_key --key $(BOARD_AVB_PRODUCT_KEY_PATH) \
--output $(1)/product.avbpubkey)
- $(if $(BOARD_AVB_PRODUCT_SERVICES_KEY_PATH),\
- $(hide) $(AVBTOOL) extract_public_key --key $(BOARD_AVB_PRODUCT_SERVICES_KEY_PATH) \
- --output $(1)/product_services.avbpubkey)
+ $(if $(BOARD_AVB_SYSTEM_EXT_KEY_PATH),\
+ $(hide) $(AVBTOOL) extract_public_key --key $(BOARD_AVB_SYSTEM_EXT_KEY_PATH) \
+ --output $(1)/system_ext.avbpubkey)
$(if $(BOARD_AVB_ODM_KEY_PATH),\
$(hide) $(AVBTOOL) extract_public_key --key $(BOARD_AVB_ODM_KEY_PATH) \
--output $(1)/odm.avbpubkey)
@@ -3384,8 +3299,8 @@
# Builds a chained VBMeta image. This VBMeta image will contain the descriptors for the partitions
# specified in BOARD_AVB_VBMETA_<NAME>. The built VBMeta image will be included into the top-level
# vbmeta image as a chained partition. For example, if a target defines `BOARD_AVB_VBMETA_SYSTEM
-# := system product_services`, `vbmeta_system.img` will be created that includes the descriptors
-# for `system.img` and `product_services.img`. `vbmeta_system.img` itself will be included into
+# := system system_ext`, `vbmeta_system.img` will be created that includes the descriptors for
+# `system.img` and `system_ext.img`. `vbmeta_system.img` itself will be included into
# `vbmeta.img` as a chained partition.
# $(1): VBMeta image name, such as "vbmeta_system", "vbmeta_vendor" etc.
# $(2): Output filename.
@@ -3441,7 +3356,7 @@
$(INSTALLED_SYSTEMIMAGE_TARGET) \
$(INSTALLED_VENDORIMAGE_TARGET) \
$(INSTALLED_PRODUCTIMAGE_TARGET) \
- $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) \
+ $(INSTALLED_SYSTEM_EXTIMAGE_TARGET) \
$(INSTALLED_ODMIMAGE_TARGET) \
$(INSTALLED_DTBOIMAGE_TARGET) \
$(INSTALLED_RECOVERYIMAGE_TARGET) \
@@ -3466,7 +3381,7 @@
ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
-# (1): list of items like "system", "vendor", "product", "product_services"
+# (1): list of items like "system", "vendor", "product", "system_ext"
# return: map each item into a command ( wrapped in $$() ) that reads the size
define read-size-of-partitions
$(foreach image,$(call images-for-partitions,$(1)),$$( \
@@ -3895,7 +3810,7 @@
$(INSTALLED_CACHEIMAGE_TARGET) \
$(INSTALLED_VENDORIMAGE_TARGET) \
$(INSTALLED_PRODUCTIMAGE_TARGET) \
- $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) \
+ $(INSTALLED_SYSTEM_EXTIMAGE_TARGET) \
$(INSTALLED_VBMETAIMAGE_TARGET) \
$(INSTALLED_ODMIMAGE_TARGET) \
$(INSTALLED_DTBOIMAGE_TARGET) \
@@ -3910,7 +3825,7 @@
$(PRODUCT_SYSTEM_BASE_FS_PATH) \
$(PRODUCT_VENDOR_BASE_FS_PATH) \
$(PRODUCT_PRODUCT_BASE_FS_PATH) \
- $(PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH) \
+ $(PRODUCT_SYSTEM_EXT_BASE_FS_PATH) \
$(PRODUCT_ODM_BASE_FS_PATH) \
$(LPMAKE) \
$(SELINUX_FC) \
@@ -3930,7 +3845,7 @@
@echo "Package target files: $@"
$(call create-system-vendor-symlink)
$(call create-system-product-symlink)
- $(call create-system-product_services-symlink)
+ $(call create-system-system_ext-symlink)
$(call create-vendor-odm-symlink)
$(hide) rm -rf $@ $@.list $(zip_root)
$(hide) mkdir -p $(dir $@) $(zip_root)
@@ -4021,10 +3936,10 @@
$(hide) $(call package_files-copy-root, \
$(TARGET_OUT_PRODUCT),$(zip_root)/PRODUCT)
endif
-ifdef BUILDING_PRODUCT_SERVICES_IMAGE
- @# Contents of the product_services image
+ifdef BUILDING_SYSTEM_EXT_IMAGE
+ @# Contents of the system_ext image
$(hide) $(call package_files-copy-root, \
- $(TARGET_OUT_PRODUCT_SERVICES),$(zip_root)/PRODUCT_SERVICES)
+ $(TARGET_OUT_SYSTEM_EXT),$(zip_root)/SYSTEM_EXT)
endif
ifdef BUILDING_ODM_IMAGE
@# Contents of the odm image
@@ -4112,9 +4027,9 @@
$(hide) cp $(PRODUCT_PRODUCT_BASE_FS_PATH) \
$(zip_root)/META/$(notdir $(PRODUCT_PRODUCT_BASE_FS_PATH))
endif
-ifneq ($(PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH),)
- $(hide) cp $(PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH) \
- $(zip_root)/META/$(notdir $(PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH))
+ifneq ($(PRODUCT_SYSTEM_EXT_BASE_FS_PATH),)
+ $(hide) cp $(PRODUCT_SYSTEM_EXT_BASE_FS_PATH) \
+ $(zip_root)/META/$(notdir $(PRODUCT_SYSTEM_EXT_BASE_FS_PATH))
endif
ifneq ($(PRODUCT_ODM_BASE_FS_PATH),)
$(hide) cp $(PRODUCT_ODM_BASE_FS_PATH) \
@@ -4204,9 +4119,9 @@
$(hide) mkdir -p $(zip_root)/IMAGES
$(hide) cp $(INSTALLED_PRODUCTIMAGE_TARGET) $(zip_root)/IMAGES/
endif
-ifdef BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
+ifdef BOARD_PREBUILT_SYSTEM_EXTIMAGE
$(hide) mkdir -p $(zip_root)/IMAGES
- $(hide) cp $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) $(zip_root)/IMAGES/
+ $(hide) cp $(INSTALLED_SYSTEM_EXTIMAGE_TARGET) $(zip_root)/IMAGES/
endif
ifdef BOARD_PREBUILT_BOOTIMAGE
$(hide) mkdir -p $(zip_root)/IMAGES
@@ -4248,8 +4163,8 @@
ifdef BUILDING_PRODUCT_IMAGE
$(hide) $(call fs_config,$(zip_root)/PRODUCT,product/) > $(zip_root)/META/product_filesystem_config.txt
endif
-ifdef BUILDING_PRODUCT_SERVICES_IMAGE
- $(hide) $(call fs_config,$(zip_root)/PRODUCT_SERVICES,product_services/) > $(zip_root)/META/product_services_filesystem_config.txt
+ifdef BUILDING_SYSTEM_EXT_IMAGE
+ $(hide) $(call fs_config,$(zip_root)/SYSTEM_EXT,system_ext/) > $(zip_root)/META/system_ext_filesystem_config.txt
endif
ifdef BUILDING_ODM_IMAGE
$(hide) $(call fs_config,$(zip_root)/ODM,odm/) > $(zip_root)/META/odm_filesystem_config.txt
@@ -4404,7 +4319,7 @@
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_VENDORIMAGE_TARGET) \
$(INSTALLED_PRODUCTIMAGE_TARGET) \
- $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET)
+ $(INSTALLED_SYSTEM_EXTIMAGE_TARGET)
endif
$(APPCOMPAT_ZIP): PRIVATE_LIST_FILE := $(call intermediates-dir-for,PACKAGING,appcompat)/filelist
$(APPCOMPAT_ZIP): $(SOONG_ZIP)
@@ -4433,7 +4348,7 @@
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_VENDORIMAGE_TARGET) \
$(INSTALLED_PRODUCTIMAGE_TARGET) \
- $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) \
+ $(INSTALLED_SYSTEM_EXTIMAGE_TARGET) \
$(INSTALLED_ODMIMAGE_TARGET) \
$(updater_dep)
endif
@@ -4459,7 +4374,7 @@
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_VENDORIMAGE_TARGET) \
$(INSTALLED_PRODUCTIMAGE_TARGET) \
- $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) \
+ $(INSTALLED_SYSTEM_EXTIMAGE_TARGET) \
$(INSTALLED_ODMIMAGE_TARGET)
endif
$(COVERAGE_ZIP): PRIVATE_LIST_FILE := $(call intermediates-dir-for,PACKAGING,coverage)/filelist
@@ -4743,14 +4658,14 @@
productimage: $(INSTALLED_QEMU_PRODUCTIMAGE)
droidcore: $(INSTALLED_QEMU_PRODUCTIMAGE)
endif
-ifdef INSTALLED_PRODUCT_SERVICESIMAGE_TARGET
-INSTALLED_QEMU_PRODUCT_SERVICESIMAGE := $(PRODUCT_OUT)/product_services-qemu.img
-$(INSTALLED_QEMU_PRODUCT_SERVICESIMAGE): $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) $(MK_QEMU_IMAGE_SH) $(SGDISK_HOST) $(SIMG2IMG)
- @echo Create product_services-qemu.img
- (export SGDISK=$(SGDISK_HOST) SIMG2IMG=$(SIMG2IMG); $(MK_QEMU_IMAGE_SH) $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET))
+ifdef INSTALLED_SYSTEM_EXTIMAGE_TARGET
+INSTALLED_QEMU_SYSTEM_EXTIMAGE := $(PRODUCT_OUT)/system_ext-qemu.img
+$(INSTALLED_QEMU_SYSTEM_EXTIMAGE): $(INSTALLED_SYSTEM_EXTIMAGE_TARGET) $(MK_QEMU_IMAGE_SH) $(SGDISK_HOST) $(SIMG2IMG)
+ @echo Create system_ext-qemu.img
+ (export SGDISK=$(SGDISK_HOST) SIMG2IMG=$(SIMG2IMG); $(MK_QEMU_IMAGE_SH) $(INSTALLED_SYSTEM_EXTIMAGE_TARGET))
-productservicesimage: $(INSTALLED_QEMU_PRODUCT_SERVICESIMAGE)
-droidcore: $(INSTALLED_QEMU_PRODUCT_SERVICESIMAGE)
+systemextimage: $(INSTALLED_QEMU_SYSTEM_EXTIMAGE)
+droidcore: $(INSTALLED_QEMU_SYSTEM_EXTIMAGE)
endif
ifdef INSTALLED_ODMIMAGE_TARGET
INSTALLED_QEMU_ODMIMAGE := $(PRODUCT_OUT)/odm-qemu.img
diff --git a/core/app_prebuilt_internal.mk b/core/app_prebuilt_internal.mk
index 69f411c..399d173 100644
--- a/core/app_prebuilt_internal.mk
+++ b/core/app_prebuilt_internal.mk
@@ -41,7 +41,7 @@
include $(BUILD_SYSTEM)/base_rules.mk
built_module := $(LOCAL_BUILT_MODULE)
-# Run veridex on product, product_services and vendor modules.
+# Run veridex on product, system_ext and vendor modules.
# We skip it for unbundled app builds where we cannot build veridex.
module_run_appcompat :=
ifeq (true,$(non_system_module))
diff --git a/core/base_rules.mk b/core/base_rules.mk
index b0e0577..4a0c15b 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -81,11 +81,17 @@
LOCAL_ODM_MODULE := true
else ifneq ($(filter $(TARGET_OUT_PRODUCT)/%,$(_path)),)
LOCAL_PRODUCT_MODULE := true
-else ifneq ($(filter $(TARGET_OUT_PRODUCT_SERVICES)/%,$(_path)),)
-LOCAL_PRODUCT_SERVICES_MODULE := true
+else ifneq ($(filter $(TARGET_OUT_SYSTEM_EXT)/%,$(_path)),)
+LOCAL_SYSTEM_EXT_MODULE := true
endif
_path :=
+# TODO(b/135957588) Remove following workaround
+# LOCAL_PRODUCT_SERVICES_MODULE to LOCAL_PRODUCT_MODULE for all Android.mk
+ifndef LOCAL_PRODUCT_MODULE
+LOCAL_PRODUCT_MODULE := $(LOCAL_PRODUCT_SERVICES_MODULE)
+endif
+
ifndef LOCAL_PROPRIETARY_MODULE
LOCAL_PROPRIETARY_MODULE := $(LOCAL_VENDOR_MODULE)
endif
@@ -98,7 +104,7 @@
non_system_module := $(filter true, \
$(LOCAL_PRODUCT_MODULE) \
- $(LOCAL_PRODUCT_SERVICES_MODULE) \
+ $(LOCAL_SYSTEM_EXT_MODULE) \
$(LOCAL_VENDOR_MODULE) \
$(LOCAL_PROPRIETARY_MODULE))
@@ -227,8 +233,8 @@
partition_tag := _ODM
else ifeq (true,$(strip $(LOCAL_PRODUCT_MODULE)))
partition_tag := _PRODUCT
-else ifeq (true,$(strip $(LOCAL_PRODUCT_SERVICES_MODULE)))
- partition_tag := _PRODUCT_SERVICES
+else ifeq (true,$(strip $(LOCAL_SYSTEM_EXT_MODULE)))
+ partition_tag := _SYSTEM_EXT
else ifeq (NATIVE_TESTS,$(LOCAL_MODULE_CLASS))
partition_tag := _DATA
else
@@ -710,18 +716,6 @@
endif
endif
-
-ifeq ($(use_testcase_folder),true)
-ifneq ($(my_test_data_file_pairs),)
-$(foreach pair, $(my_test_data_file_pairs), \
- $(eval parts := $(subst :,$(space),$(pair))) \
- $(eval src_path := $(word 1,$(parts))) \
- $(eval file := $(word 2,$(parts))) \
- $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
- $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \
- $(call filter-copy-pair,$(src_path),$(call append-path,$(dir),$(file)),$(my_installed_test_data))))))
-endif
-else
ifneq ($(my_test_data_file_pairs),)
$(foreach pair, $(my_test_data_file_pairs), \
$(eval parts := $(subst :,$(space),$(pair))) \
@@ -731,7 +725,6 @@
$(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \
$(src_path):$(call append-path,$(dir),$(file))))))
endif
-endif
diff --git a/core/binary.mk b/core/binary.mk
index f63e4cd..e76942c 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -267,6 +267,20 @@
endif
endif
+ifeq ($(NATIVE_COVERAGE),true)
+ ifndef LOCAL_IS_HOST_MODULE
+ my_ldflags += -Wl,--wrap,getenv
+
+ ifneq ($(LOCAL_MODULE_CLASS),STATIC_LIBRARIES)
+ ifeq ($(LOCAL_SDK_VERSION),)
+ my_whole_static_libraries += libprofile-extras
+ else
+ my_whole_static_libraries += libprofile-extras_ndk
+ endif
+ endif
+ endif
+endif
+
ifneq ($(LOCAL_USE_VNDK),)
# Required VNDK version for vendor modules is BOARD_VNDK_VERSION.
my_vndk_version := $(BOARD_VNDK_VERSION)
diff --git a/core/board_config.mk b/core/board_config.mk
index 9c9e8b1..f7dc557 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -67,8 +67,8 @@
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE \
BOARD_PRODUCTIMAGE_PARTITION_SIZE \
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE \
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE \
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE \
+ BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE \
+ BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE \
BOARD_ODMIMAGE_PARTITION_SIZE \
BOARD_ODMIMAGE_FILE_SYSTEM_TYPE \
@@ -78,7 +78,7 @@
BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE \
BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE \
BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE \
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE \
+ BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE \
BOARD_SUPER_PARTITION_SIZE \
BOARD_SUPER_PARTITION_GROUPS \
@@ -413,48 +413,48 @@
.KATI_READONLY := BUILDING_PRODUCT_IMAGE
###########################################
-# Now we can substitute with the real value of TARGET_COPY_OUT_PRODUCT_SERVICES
-MERGE_PRODUCT_SERVICES_INTO_PRODUCT :=
-ifeq ($(TARGET_COPY_OUT_PRODUCT_SERVICES),$(_product_services_path_placeholder))
- TARGET_COPY_OUT_PRODUCT_SERVICES := $(TARGET_COPY_OUT_PRODUCT)
- MERGE_PRODUCT_SERVICES_INTO_PRODUCT := true
-else ifeq ($(TARGET_COPY_OUT_PRODUCT),$(TARGET_COPY_OUT_PRODUCT_SERVICES))
- MERGE_PRODUCT_SERVICES_INTO_PRODUCT := true
-else ifeq ($(filter product_services system/product_services,$(TARGET_COPY_OUT_PRODUCT_SERVICES)),)
- $(error TARGET_COPY_OUT_PRODUCT_SERVICES must be either 'product_services',\
- '$(TARGET_COPY_OUT_PRODUCT)' or 'system/product_services', seeing '$(TARGET_COPY_OUT_PRODUCT_SERVICES)'.)
-endif
-.KATI_READONLY := MERGE_PRODUCT_SERVICES_INTO_PRODUCT
-PRODUCT_COPY_FILES := $(subst $(_product_services_path_placeholder),$(TARGET_COPY_OUT_PRODUCT_SERVICES),$(PRODUCT_COPY_FILES))
+# TODO(b/135957588) TARGET_COPY_OUT_PRODUCT_SERVICES will be set to
+# TARGET_COPY_OUT_PRODUCT as a workaround.
+TARGET_COPY_OUT_PRODUCT_SERVICES := $(TARGET_COPY_OUT_PRODUCT)
-BOARD_USES_PRODUCT_SERVICESIMAGE :=
-ifdef BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE := true
+###########################################
+# Now we can substitute with the real value of TARGET_COPY_OUT_SYSTEM_EXT
+ifeq ($(TARGET_COPY_OUT_SYSTEM_EXT),$(_system_ext_path_placeholder))
+TARGET_COPY_OUT_SYSTEM_EXT := system/system_ext
+else ifeq ($(filter system_ext system/system_ext,$(TARGET_COPY_OUT_SYSTEM_EXT)),)
+$(error TARGET_COPY_OUT_SYSTEM_EXT must be either 'system_ext' or 'system/system_ext', seeing '$(TARGET_COPY_OUT_SYSTEM_EXT)'.)
endif
-ifdef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_USES_PRODUCT_SERVICESIMAGE := true
-endif
-ifeq ($(TARGET_COPY_OUT_PRODUCT_SERVICES),product_services)
- BOARD_USES_PRODUCT_SERVICESIMAGE := true
-else ifdef BOARD_USES_PRODUCT_SERVICESIMAGE
- $(error TARGET_COPY_OUT_PRODUCT_SERVICES must be set to 'product_services' to use a product_services image)
-endif
+PRODUCT_COPY_FILES := $(subst $(_system_ext_path_placeholder),$(TARGET_COPY_OUT_SYSTEM_EXT),$(PRODUCT_COPY_FILES))
-BUILDING_PRODUCT_SERVICES_IMAGE :=
-ifeq ($(PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE),)
- ifdef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BUILDING_PRODUCT_SERVICES_IMAGE := true
+BOARD_USES_SYSTEM_EXTIMAGE :=
+ifdef BOARD_PREBUILT_SYSTEM_EXTIMAGE
+ BOARD_USES_SYSTEM_EXTIMAGE := true
+endif
+ifdef BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE
+ BOARD_USES_SYSTEM_EXTIMAGE := true
+endif
+ifeq ($(TARGET_COPY_OUT_SYSTEM_EXT),system_ext)
+ BOARD_USES_SYSTEM_EXTIMAGE := true
+else ifdef BOARD_USES_SYSTEM_EXTIMAGE
+ $(error TARGET_COPY_OUT_SYSTEM_EXT must be set to 'system_ext' to use a system_ext image)
+endif
+.KATI_READONLY := BOARD_USES_SYSTEM_EXTIMAGE
+
+BUILDING_SYSTEM_EXT_IMAGE :=
+ifeq ($(PRODUCT_BUILD_SYSTEM_EXT_IMAGE),)
+ ifdef BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE
+ BUILDING_SYSTEM_EXT_IMAGE := true
endif
-else ifeq ($(PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE),true)
- BUILDING_PRODUCT_SERVICES_IMAGE := true
- ifndef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- $(error PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE set to true, but BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE not defined)
+else ifeq ($(PRODUCT_BUILD_SYSTEM_EXT_IMAGE),true)
+ BUILDING_SYSTEM_EXT_IMAGE := true
+ ifndef BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE
+ $(error PRODUCT_BUILD_SYSTEM_EXT_IMAGE set to true, but BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE not defined)
endif
endif
-ifdef BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BUILDING_PRODUCT_SERVICES_IMAGE :=
+ifdef BOARD_PREBUILT_SYSTEM_EXTIMAGE
+ BUILDING_SYSTEM_EXT_IMAGE :=
endif
-.KATI_READONLY := BUILDING_PRODUCT_SERVICES_IMAGE
+.KATI_READONLY := BUILDING_SYSTEM_EXT_IMAGE
###########################################
# Now we can substitute with the real value of TARGET_COPY_OUT_ODM
diff --git a/core/build_rro_package.mk b/core/build_rro_package.mk
index a6921d5..e5d7685 100644
--- a/core/build_rro_package.mk
+++ b/core/build_rro_package.mk
@@ -20,8 +20,8 @@
partition := $(TARGET_OUT_ODM)
else ifeq ($(strip $(LOCAL_VENDOR_MODULE)),true)
partition := $(TARGET_OUT_VENDOR)
-else ifeq ($(strip $(LOCAL_PRODUCT_SERVICES_MODULE)),true)
- partition := $(TARGET_OUT_PRODUCT_SERVICES)
+else ifeq ($(strip $(LOCAL_SYSTEM_EXT_MODULE)),true)
+ partition := $(TARGET_OUT_SYSTEM_EXT)
else
partition := $(TARGET_OUT_PRODUCT)
endif
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 5973e0e..3cc8594 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -216,7 +216,8 @@
LOCAL_PRIVILEGED_MODULE:=
# '',full,custom,disabled,obfuscation,optimization
LOCAL_PRODUCT_MODULE:=
-LOCAL_PRODUCT_SERVICES_MODULE:=
+# TODO(b/135957588) Remove LOCAL_PRODUCT_SERVICES_MODULE
+LOCAL_PRODUCT_SERVICES_MODULE :=
LOCAL_PROGUARD_ENABLED:=
LOCAL_PROGUARD_FLAG_FILES:=
LOCAL_PROGUARD_FLAGS:=
@@ -279,6 +280,7 @@
LOCAL_STATIC_JAVA_AAR_LIBRARIES:=
LOCAL_STATIC_JAVA_LIBRARIES:=
LOCAL_STATIC_LIBRARIES:=
+LOCAL_SYSTEM_EXT_MODULE:=
LOCAL_STRIP_MODULE:=
LOCAL_SYSTEM_SHARED_LIBRARIES:=none
LOCAL_TARGET_REQUIRED_MODULES:=
diff --git a/core/config.mk b/core/config.mk
index 537dc92..5016ff2 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -584,7 +584,6 @@
MKF2FSUSERIMG := $(HOST_OUT_EXECUTABLES)/mkf2fsuserimg.sh
SIMG2IMG := $(HOST_OUT_EXECUTABLES)/simg2img$(HOST_EXECUTABLE_SUFFIX)
E2FSCK := $(HOST_OUT_EXECUTABLES)/e2fsck$(HOST_EXECUTABLE_SUFFIX)
-MKTARBALL := build/make/tools/mktarball.sh
TUNE2FS := $(HOST_OUT_EXECUTABLES)/tune2fs$(HOST_EXECUTABLE_SUFFIX)
JARJAR := $(HOST_OUT_JAVA_LIBRARIES)/jarjar.jar
DATA_BINDING_COMPILER := $(HOST_OUT_JAVA_LIBRARIES)/databinding-compiler.jar
@@ -871,10 +870,10 @@
endif
endif
-ifneq ($(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE),)
-ifneq ($(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE),)
-$(error Should not define BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE and \
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE together)
+ifneq ($(BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE),)
+ifneq ($(BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE),)
+$(error Should not define BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE and \
+ BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE together)
endif
endif
@@ -899,7 +898,7 @@
)
# BOARD_*_PARTITION_LIST: a list of the following tokens
-valid_super_partition_list := system vendor product product_services odm
+valid_super_partition_list := system vendor product system_ext odm
$(foreach group,$(call to-upper,$(BOARD_SUPER_PARTITION_GROUPS)), \
$(if $(filter-out $(valid_super_partition_list),$(BOARD_$(group)_PARTITION_LIST)), \
$(error BOARD_$(group)_PARTITION_LIST contains invalid partition name \
@@ -1154,13 +1153,12 @@
# in the source tree.
dont_bother_goals := out \
snod systemimage-nodeps \
- stnod systemtarball-nodeps \
- userdataimage-nodeps userdatatarball-nodeps \
+ userdataimage-nodeps \
cacheimage-nodeps \
bptimage-nodeps \
vnod vendorimage-nodeps \
pnod productimage-nodeps \
- psnod productservicesimage-nodeps \
+ senod systemextimage-nodeps \
onod odmimage-nodeps \
systemotherimage-nodeps \
ramdisk-nodeps \
diff --git a/core/definitions.mk b/core/definitions.mk
index b8e83ec..d26c445 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2315,13 +2315,14 @@
echo "Install path on $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT): $(PRIVATE_INSTALLED_MODULE)" >> $(PRODUCT_OUT)/appcompat/$(PRIVATE_MODULE).log && \
echo >> $(PRODUCT_OUT)/appcompat/$(PRIVATE_MODULE).log
endef
+ART_VERIDEX_APPCOMPAT_SCRIPT:=$(HOST_OUT)/bin/appcompat.sh
define run-appcompat
$(hide) \
echo "appcompat.sh output:" >> $(PRODUCT_OUT)/appcompat/$(PRIVATE_MODULE).log && \
- PACKAGING=$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING ANDROID_LOG_TAGS="*:e" art/tools/veridex/appcompat.sh --dex-file=$@ --api-flags=$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS) 2>&1 >> $(PRODUCT_OUT)/appcompat/$(PRIVATE_MODULE).log
+ PACKAGING=$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING ANDROID_LOG_TAGS="*:e" $(ART_VERIDEX_APPCOMPAT_SCRIPT) --dex-file=$@ --api-flags=$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS) 2>&1 >> $(PRODUCT_OUT)/appcompat/$(PRIVATE_MODULE).log
endef
appcompat-files = \
- art/tools/veridex/appcompat.sh \
+ $(ART_VERIDEX_APPCOMPAT_SCRIPT) \
$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS) \
$(HOST_OUT_EXECUTABLES)/veridex \
$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/core_dex_intermediates/classes.dex \
@@ -2417,16 +2418,6 @@
$(if $(filter-out $(2), $(LOCAL_INSTALLED_MODULE)), $(1):$(2))
endef
-# Create copy pair for $(1) $(2)
-# If $(2) is substring of $(3) do nothing.
-# $(1): source path
-# $(2): destination path
-# $(3): filter-out target
-# The format of copy pair is src:dst
-define filter-copy-pair
-$(if $(findstring $(2), $(3)),,$(1):$(2))
-endef
-
# Copies many files.
# $(1): The files to copy. Each entry is a ':' separated src:dst pair
# $(2): An optional directory to prepend to the destination
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk
index 570dbd8..b856bf4 100644
--- a/core/dex_preopt_config.mk
+++ b/core/dex_preopt_config.mk
@@ -8,8 +8,8 @@
SYSTEM_OTHER_ODEX_FILTER ?= \
app/% \
priv-app/% \
- product_services/app/% \
- product_services/priv-app/% \
+ system_ext/app/% \
+ system_ext/priv-app/% \
product/app/% \
product/priv-app/% \
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 46edc0e..05957cd 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -233,11 +233,14 @@
# BoardConfig, to be either the partition dir, or a subdir within 'system'.
_vendor_path_placeholder := ||VENDOR-PATH-PH||
_product_path_placeholder := ||PRODUCT-PATH-PH||
-_product_services_path_placeholder := ||PRODUCT_SERVICES-PATH-PH||
+_system_ext_path_placeholder := ||SYSTEM_EXT-PATH-PH||
_odm_path_placeholder := ||ODM-PATH-PH||
TARGET_COPY_OUT_VENDOR := $(_vendor_path_placeholder)
TARGET_COPY_OUT_PRODUCT := $(_product_path_placeholder)
-TARGET_COPY_OUT_PRODUCT_SERVICES := $(_product_services_path_placeholder)
+# TODO(b/135957588) TARGET_COPY_OUT_PRODUCT_SERVICES will copy the target to
+# product
+TARGET_COPY_OUT_PRODUCT_SERVICES := $(_product_path_placeholder)
+TARGET_COPY_OUT_SYSTEM_EXT := $(_system_ext_path_placeholder)
TARGET_COPY_OUT_ODM := $(_odm_path_placeholder)
# Returns the non-sanitized version of the path provided in $1.
@@ -785,38 +788,38 @@
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS \
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS_PRIVILEGED
-TARGET_OUT_PRODUCT_SERVICES := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_PRODUCT_SERVICES)
+TARGET_OUT_SYSTEM_EXT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_SYSTEM_EXT)
ifneq ($(filter address,$(SANITIZE_TARGET)),)
-target_out_product_services_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_PRODUCT_SERVICES)
+target_out_system_ext_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_SYSTEM_EXT)
ifeq ($(SANITIZE_LITE),true)
# When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not
# work with unsanitized app_process. For simplicity, generate APKs into /data/asan/.
-target_out_product_services_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_PRODUCT_SERVICES)
+target_out_system_ext_app_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/$(TARGET_COPY_OUT_SYSTEM_EXT)
else
-target_out_product_services_app_base := $(TARGET_OUT_PRODUCT_SERVICES)
+target_out_system_ext_app_base := $(TARGET_OUT_SYSTEM_EXT)
endif
else
-target_out_product_services_shared_libraries_base := $(TARGET_OUT_PRODUCT_SERVICES)
-target_out_product_services_app_base := $(TARGET_OUT_PRODUCT_SERVICES)
+target_out_system_ext_shared_libraries_base := $(TARGET_OUT_SYSTEM_EXT)
+target_out_system_ext_app_base := $(TARGET_OUT_SYSTEM_EXT)
endif
ifeq ($(TARGET_IS_64_BIT),true)
-TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_product_services_shared_libraries_base)/lib64
+TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES := $(target_out_system_ext_shared_libraries_base)/lib64
else
-TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_product_services_shared_libraries_base)/lib
+TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES := $(target_out_system_ext_shared_libraries_base)/lib
endif
-TARGET_OUT_PRODUCT_SERVICES_JAVA_LIBRARIES:= $(TARGET_OUT_PRODUCT_SERVICES)/framework
-TARGET_OUT_PRODUCT_SERVICES_APPS := $(target_out_product_services_app_base)/app
-TARGET_OUT_PRODUCT_SERVICES_APPS_PRIVILEGED := $(target_out_product_services_app_base)/priv-app
-TARGET_OUT_PRODUCT_SERVICES_ETC := $(TARGET_OUT_PRODUCT_SERVICES)/etc
+TARGET_OUT_SYSTEM_EXT_JAVA_LIBRARIES:= $(TARGET_OUT_SYSTEM_EXT)/framework
+TARGET_OUT_SYSTEM_EXT_APPS := $(target_out_system_ext_app_base)/app
+TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED := $(target_out_system_ext_app_base)/priv-app
+TARGET_OUT_SYSTEM_EXT_ETC := $(TARGET_OUT_SYSTEM_EXT)/etc
ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true)
-$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_product_services_shared_libraries_base)/lib/$(TARGET_2ND_ARCH)
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES := $(target_out_system_ext_shared_libraries_base)/lib/$(TARGET_2ND_ARCH)
else
-$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_product_services_shared_libraries_base)/lib
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES := $(target_out_system_ext_shared_libraries_base)/lib
endif
-$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_APPS := $(TARGET_OUT_PRODUCT_SERVICES_APPS)
-$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_APPS_PRIVILEGED := $(TARGET_OUT_PRODUCT_SERVICES_APPS_PRIVILEGED)
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_APPS := $(TARGET_OUT_SYSTEM_EXT_APPS)
+$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED := $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)
TARGET_OUT_BREAKPAD := $(PRODUCT_OUT)/breakpad
.KATI_READONLY := TARGET_OUT_BREAKPAD
diff --git a/core/install_jni_libs.mk b/core/install_jni_libs.mk
index 515d34f..0fec9ca 100644
--- a/core/install_jni_libs.mk
+++ b/core/install_jni_libs.mk
@@ -26,7 +26,7 @@
$(TARGET_OUT_VENDOR)/% \
$(TARGET_OUT_OEM)/% \
$(TARGET_OUT_PRODUCT)/% \
- $(TARGET_OUT_PRODUCT_SERVICES)/% \
+ $(TARGET_OUT_SYSTEM_EXT)/% \
ifeq ($(filter $(supported_partition_patterns),$(my_module_path)),)
my_embed_jni := true
diff --git a/core/main.mk b/core/main.mk
index 7ee63c6..93fd90c 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1111,7 +1111,7 @@
define resolve-product-relative-paths
$(subst $(_vendor_path_placeholder),$(TARGET_COPY_OUT_VENDOR),\
$(subst $(_product_path_placeholder),$(TARGET_COPY_OUT_PRODUCT),\
- $(subst $(_product_services_path_placeholder),$(TARGET_COPY_OUT_PRODUCT_SERVICES),\
+ $(subst $(_system_ext_path_placeholder),$(TARGET_COPY_OUT_SYSTEM_EXT),\
$(subst $(_odm_path_placeholder),$(TARGET_COPY_OUT_ODM),\
$(foreach p,$(1),$(call append-path,$(PRODUCT_OUT),$(p)$(2)))))))
endef
@@ -1573,12 +1573,6 @@
.PHONY: ramdisk_debug
ramdisk_debug: $(INSTALLED_DEBUG_RAMDISK_TARGET)
-.PHONY: systemtarball
-systemtarball: $(INSTALLED_SYSTEMTARBALL_TARGET)
-
-.PHONY: boottarball
-boottarball: $(INSTALLED_BOOTTARBALL_TARGET)
-
.PHONY: userdataimage
userdataimage: $(INSTALLED_USERDATAIMAGE_TARGET)
@@ -1586,9 +1580,6 @@
$(call dist-for-goals, userdataimage, $(BUILT_USERDATAIMAGE_TARGET))
endif
-.PHONY: userdatatarball
-userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET)
-
.PHONY: cacheimage
cacheimage: $(INSTALLED_CACHEIMAGE_TARGET)
@@ -1601,8 +1592,8 @@
.PHONY: productimage
productimage: $(INSTALLED_PRODUCTIMAGE_TARGET)
-.PHONY: productservicesimage
-productservicesimage: $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET)
+.PHONY: systemextimage
+systemextimage: $(INSTALLED_SYSTEM_EXTIMAGE_TARGET)
.PHONY: odmimage
odmimage: $(INSTALLED_ODMIMAGE_TARGET)
@@ -1652,8 +1643,8 @@
$(INSTALLED_FILES_JSON_ODM) \
$(INSTALLED_FILES_FILE_PRODUCT) \
$(INSTALLED_FILES_JSON_PRODUCT) \
- $(INSTALLED_FILES_FILE_PRODUCT_SERVICES) \
- $(INSTALLED_FILES_JSON_PRODUCT_SERVICES) \
+ $(INSTALLED_FILES_FILE_SYSTEM_EXT) \
+ $(INSTALLED_FILES_JSON_SYSTEM_EXT) \
$(INSTALLED_FILES_FILE_SYSTEMOTHER) \
$(INSTALLED_FILES_JSON_SYSTEMOTHER) \
$(INSTALLED_FILES_FILE_RAMDISK) \
@@ -1745,8 +1736,8 @@
$(INSTALLED_FILES_JSON_ODM) \
$(INSTALLED_FILES_FILE_PRODUCT) \
$(INSTALLED_FILES_JSON_PRODUCT) \
- $(INSTALLED_FILES_FILE_PRODUCT_SERVICES) \
- $(INSTALLED_FILES_JSON_PRODUCT_SERVICES) \
+ $(INSTALLED_FILES_FILE_SYSTEM_EXT) \
+ $(INSTALLED_FILES_JSON_SYSTEM_EXT) \
$(INSTALLED_FILES_FILE_SYSTEMOTHER) \
$(INSTALLED_FILES_JSON_SYSTEMOTHER) \
$(INSTALLED_FILES_FILE_RECOVERY) \
diff --git a/core/ninja_config.mk b/core/ninja_config.mk
index e9e89c3..694c696 100644
--- a/core/ninja_config.mk
+++ b/core/ninja_config.mk
@@ -16,7 +16,6 @@
all \
ECLIPSE-% \
AUX-% \
- boottarball-nodeps \
brillo_tests \
btnod \
build-art% \
@@ -44,7 +43,6 @@
snod \
stnod \
systemimage-nodeps \
- systemtarball-nodeps \
target-files-package \
test-art% \
user \
diff --git a/core/package_internal.mk b/core/package_internal.mk
index c414295..2130058 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -109,7 +109,7 @@
$(LOCAL_ODM_MODULE) \
$(LOCAL_OEM_MODULE) \
$(LOCAL_PRODUCT_MODULE) \
- $(LOCAL_PRODUCT_SERVICES_MODULE) \
+ $(LOCAL_SYSTEM_EXT_MODULE) \
$(LOCAL_PROPRIETARY_MODULE) \
$(LOCAL_VENDOR_MODULE))
enforce_rro_enabled := $(if $(non_system_module),,true)
@@ -508,7 +508,7 @@
endif
endif
-# Run veridex on product, product_services and vendor modules.
+# Run veridex on product, system_ext and vendor modules.
# We skip it for unbundled app builds where we cannot build veridex.
module_run_appcompat :=
ifeq (true,$(non_system_module))
diff --git a/core/product-graph.mk b/core/product-graph.mk
index 9db277c..9fc8e57 100644
--- a/core/product-graph.mk
+++ b/core/product-graph.mk
@@ -117,7 +117,7 @@
$(hide) echo 'PRODUCT_DEFAULT_PROPERTY_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_PROPERTY_OVERRIDES)' >> $$@
$(hide) echo 'PRODUCT_SYSTEM_DEFAULT_PROPERTIES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SYSTEM_DEFAULT_PROPERTIES)' >> $$@
$(hide) echo 'PRODUCT_PRODUCT_PROPERTIES=$$(PRODUCTS.$(strip $(1)).PRODUCT_PRODUCT_PROPERTIES)' >> $$@
- $(hide) echo 'PRODUCT_PRODUCT_SERVICES_PROPERTIES=$$(PRODUCTS.$(strip $(1)).PRODUCT_PRODUCT_SERVICES_PROPERTIES)' >> $$@
+ $(hide) echo 'PRODUCT_SYSTEM_EXT_PROPERTIES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SYSTEM_EXT_PROPERTIES)' >> $$@
$(hide) echo 'PRODUCT_ODM_PROPERTIES=$$(PRODUCTS.$(strip $(1)).PRODUCT_ODM_PROPERTIES)' >> $$@
$(hide) echo 'PRODUCT_CHARACTERISTICS=$$(PRODUCTS.$(strip $(1)).PRODUCT_CHARACTERISTICS)' >> $$@
$(hide) echo 'PRODUCT_COPY_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_COPY_FILES)' >> $$@
diff --git a/core/product.mk b/core/product.mk
index 77b129d..1afd26b 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -161,8 +161,8 @@
# A list of property assignments, like "key = value", with zero or more
# whitespace characters on either side of the '='.
-# used for adding properties to build.prop of product partition
-_product_list_vars += PRODUCT_PRODUCT_SERVICES_PROPERTIES
+# used for adding properties to build.prop of system_ext and odm partitions
+_product_list_vars += PRODUCT_SYSTEM_EXT_PROPERTIES
_product_list_vars += PRODUCT_ODM_PROPERTIES
# The characteristics of the product, which among other things is passed to aapt
@@ -238,7 +238,7 @@
_product_single_value_vars += PRODUCT_SYSTEM_VERITY_PARTITION
_product_single_value_vars += PRODUCT_VENDOR_VERITY_PARTITION
_product_single_value_vars += PRODUCT_PRODUCT_VERITY_PARTITION
-_product_single_value_vars += PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
+_product_single_value_vars += PRODUCT_SYSTEM_EXT_VERITY_PARTITION
_product_single_value_vars += PRODUCT_ODM_VERITY_PARTITION
_product_single_value_vars += PRODUCT_SYSTEM_SERVER_DEBUG_INFO
_product_single_value_vars += PRODUCT_OTHER_JAVA_DEBUG_INFO
@@ -265,7 +265,7 @@
_product_single_value_vars += PRODUCT_SYSTEM_BASE_FS_PATH
_product_single_value_vars += PRODUCT_VENDOR_BASE_FS_PATH
_product_single_value_vars += PRODUCT_PRODUCT_BASE_FS_PATH
-_product_single_value_vars += PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
+_product_single_value_vars += PRODUCT_SYSTEM_EXT_BASE_FS_PATH
_product_single_value_vars += PRODUCT_ODM_BASE_FS_PATH
# The first API level this product shipped with
@@ -357,7 +357,7 @@
_product_single_value_vars += PRODUCT_BUILD_SYSTEM_OTHER_IMAGE
_product_single_value_vars += PRODUCT_BUILD_VENDOR_IMAGE
_product_single_value_vars += PRODUCT_BUILD_PRODUCT_IMAGE
-_product_single_value_vars += PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE
+_product_single_value_vars += PRODUCT_BUILD_SYSTEM_EXT_IMAGE
_product_single_value_vars += PRODUCT_BUILD_ODM_IMAGE
_product_single_value_vars += PRODUCT_BUILD_CACHE_IMAGE
_product_single_value_vars += PRODUCT_BUILD_RAMDISK_IMAGE
diff --git a/core/product_config.mk b/core/product_config.mk
index cb58cf4..360c79d 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -418,7 +418,7 @@
SYSTEM_OTHER \
VENDOR \
PRODUCT \
- PRODUCT_SERVICES \
+ SYSTEM_EXT \
ODM \
CACHE \
RAMDISK \
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index d873cc4..8fc2e4c 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -43,7 +43,7 @@
endif # TURBINE_ENABLED != false
endif
-# Run veridex on product, product_services and vendor modules.
+# Run veridex on product, system_ext and vendor modules.
# We skip it for unbundled app builds where we cannot build veridex.
module_run_appcompat :=
ifeq (true,$(non_system_module))
diff --git a/core/soong_config.mk b/core/soong_config.mk
index ac3cfb3..c32049d 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -146,7 +146,7 @@
$(call add_json_str, VendorPath, $(TARGET_COPY_OUT_VENDOR))
$(call add_json_str, OdmPath, $(TARGET_COPY_OUT_ODM))
$(call add_json_str, ProductPath, $(TARGET_COPY_OUT_PRODUCT))
-$(call add_json_str, ProductServicesPath, $(TARGET_COPY_OUT_PRODUCT_SERVICES))
+$(call add_json_str, SystemExtPath, $(TARGET_COPY_OUT_SYSTEM_EXT))
$(call add_json_bool, MinimizeJavaDebugInfo, $(filter true,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO)))
$(call add_json_bool, UseGoma, $(filter-out false,$(USE_GOMA)))
diff --git a/core/tasks/find-shareduid-violation.mk b/core/tasks/find-shareduid-violation.mk
index 45fd937..86052f2 100644
--- a/core/tasks/find-shareduid-violation.mk
+++ b/core/tasks/find-shareduid-violation.mk
@@ -24,7 +24,7 @@
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_VENDORIMAGE_TARGET) \
$(INSTALLED_PRODUCTIMAGE_TARGET) \
- $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET)
+ $(INSTALLED_SYSTEM_EXTIMAGE_TARGET)
$(shareduid_violation_modules_filename): $(find_shareduid_script)
$(shareduid_violation_modules_filename): $(AAPT2)
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 0a798d5..efaacf5 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -252,7 +252,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-06-05
+ PLATFORM_SECURITY_PATCH := 2019-07-05
endif
.KATI_READONLY := PLATFORM_SECURITY_PATCH
diff --git a/help.sh b/help.sh
index be07344..b02b14c 100755
--- a/help.sh
+++ b/help.sh
@@ -40,8 +40,8 @@
Stands for "Vendor, NO Dependencies"
pnod Quickly rebuild the product image from built packages
Stands for "Product, NO Dependencies"
- psnod Quickly rebuild the product_services image from built packages
- Stands for "ProductServices, NO Dependencies"
+ senod Quickly rebuild the system_ext image from built packages
+ Stands for "SystemExt, NO Dependencies"
onod Quickly rebuild the odm image from built packages
Stands for "ODM, NO Dependencies"
diff --git a/target/board/BoardConfigGsiCommon.mk b/target/board/BoardConfigGsiCommon.mk
index 702ef3c..e4dd032 100644
--- a/target/board/BoardConfigGsiCommon.mk
+++ b/target/board/BoardConfigGsiCommon.mk
@@ -19,8 +19,9 @@
# Enable dynamic system image size and reserved 64MB in it.
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864
-# GSI forces product packages to /system for now.
+# GSI forces product and system_ext packages to /system for now.
TARGET_COPY_OUT_PRODUCT := system/product
+TARGET_COPY_OUT_SYSTEM_EXT := system/system_ext
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE :=
# Creates metadata partition mount point under root for
diff --git a/target/board/BoardConfigMainlineCommon.mk b/target/board/BoardConfigMainlineCommon.mk
index 9bc7e0c..70cfe39 100644
--- a/target/board/BoardConfigMainlineCommon.mk
+++ b/target/board/BoardConfigMainlineCommon.mk
@@ -8,7 +8,8 @@
TARGET_USERIMAGES_USE_EXT4 := true
-# Mainline devices must have /vendor and /product partitions.
+# Mainline devices must have /system_ext, /vendor and /product partitions.
+TARGET_COPY_OUT_SYSTEM_EXT := system_ext
TARGET_COPY_OUT_VENDOR := vendor
TARGET_COPY_OUT_PRODUCT := product
diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk
index 0fdd313..2ff2b20 100644
--- a/target/product/aosp_arm.mk
+++ b/target/product/aosp_arm.mk
@@ -23,19 +23,38 @@
# - VNDK enforcement
# - compatible property override enabled
-# GSI for system/product
-$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_common.mk)
+#
+# All components inherited here go to system image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
# Enable mainline checking for excat this product name
ifeq (aosp_arm,$(TARGET_PRODUCT))
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
endif
-# Emulator for vendor
+PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
+
+#
+# All components inherited here go to product image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# All components inherited here go to vendor image
+#
$(call inherit-product-if-exists, device/generic/goldfish/arm32-vendor.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86/device.mk)
+#
+# Special settings for GSI releasing
+#
+ifeq (aosp_arm,$(TARGET_PRODUCT))
+$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
+endif
+
+
PRODUCT_NAME := aosp_arm
PRODUCT_DEVICE := generic
PRODUCT_BRAND := Android
diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk
index 8ef2023..297f350 100644
--- a/target/product/aosp_arm64.mk
+++ b/target/product/aosp_arm64.mk
@@ -28,14 +28,11 @@
# build quite specifically for the emulator, and might not be
# entirely appropriate to inherit from for on-device configurations.
-# GSI for system/product
+#
+# All components inherited here go to system image
+#
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_common.mk)
-
-# Emulator for vendor
-$(call inherit-product-if-exists, device/generic/goldfish/arm64-vendor.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
# Enable mainline checking for excat this product name
ifeq (aosp_arm64,$(TARGET_PRODUCT))
@@ -46,6 +43,24 @@
root/init.zygote32_64.rc \
root/init.zygote64_32.rc \
+#
+# All components inherited here go to product image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# All components inherited here go to vendor image
+#
+$(call inherit-product-if-exists, device/generic/goldfish/arm64-vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk)
+
+#
+# Special settings for GSI releasing
+#
+ifeq (aosp_arm64,$(TARGET_PRODUCT))
+$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
+
# Copy different zygote settings for vendor.img to select by setting property
# ro.zygote=zygote64_32 or ro.zygote=zygote32_64:
# 1. 64-bit primary, 32-bit secondary OR
@@ -53,6 +68,8 @@
# init.zygote64_32.rc is in the core_64_bit.mk below
PRODUCT_COPY_FILES += \
system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
+endif
+
PRODUCT_NAME := aosp_arm64
PRODUCT_DEVICE := generic_arm64
diff --git a/target/product/aosp_product.mk b/target/product/aosp_product.mk
new file mode 100644
index 0000000..fa56779
--- /dev/null
+++ b/target/product/aosp_product.mk
@@ -0,0 +1,61 @@
+#
+# 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.
+#
+
+# Includes all AOSP product packages
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_product.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_product.mk)
+
+# Default AOSP sounds
+$(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk)
+
+# TODO(b/133643923): Clean up the mainline whitelist
+PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
+ system/app/messaging/messaging.apk \
+ system/app/messaging/oat/% \
+ system/app/WAPPushManager/WAPPushManager.apk \
+ system/app/WAPPushManager/oat/% \
+ system/bin/healthd \
+ system/etc/init/healthd.rc \
+ system/etc/seccomp_policy/crash_dump.%.policy \
+ system/etc/seccomp_policy/mediacodec.policy \
+ system/etc/vintf/manifest/manifest_healthd.xml \
+ system/lib/libframesequence.so \
+ system/lib/libgiftranscode.so \
+ system/lib64/libframesequence.so \
+ system/lib64/libgiftranscode.so \
+
+
+# Additional settings used in all AOSP builds
+PRODUCT_PRODUCT_PROPERTIES += \
+ ro.config.ringtone=Ring_Synth_04.ogg \
+ ro.config.notification_sound=pixiedust.ogg \
+
+# More AOSP packages
+PRODUCT_PACKAGES += \
+ messaging \
+ PhotoTable \
+ WAPPushManager \
+ WallpaperPicker \
+
+# Telephony:
+# Provide a APN configuration to GSI product
+PRODUCT_COPY_FILES += \
+ device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml
+
+# NFC:
+# Provide a libnfc-nci.conf to GSI product
+PRODUCT_COPY_FILES += \
+ device/generic/common/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk
index 1c71948..e557aa8 100644
--- a/target/product/aosp_x86.mk
+++ b/target/product/aosp_x86.mk
@@ -23,19 +23,37 @@
# - VNDK enforcement
# - compatible property override enabled
-# GSI for system/product
-$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_common.mk)
-
-# Emulator for vendor
-$(call inherit-product-if-exists, device/generic/goldfish/x86-vendor.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86/device.mk)
+#
+# All components inherited here go to system image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
# Enable mainline checking for excat this product name
ifeq (aosp_x86,$(TARGET_PRODUCT))
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
endif
+#
+# All components inherited here go to product image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# All components inherited here go to vendor image
+#
+$(call inherit-product-if-exists, device/generic/goldfish/x86-vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86/device.mk)
+
+
+#
+# Special settings for GSI releasing
+#
+ifeq (aosp_x86,$(TARGET_PRODUCT))
+$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
+endif
+
+
PRODUCT_NAME := aosp_x86
PRODUCT_DEVICE := generic_x86
PRODUCT_BRAND := Android
diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk
index 9dfa2f4..74f9394 100644
--- a/target/product/aosp_x86_64.mk
+++ b/target/product/aosp_x86_64.mk
@@ -28,14 +28,11 @@
# build quite specifically for the emulator, and might not be
# entirely appropriate to inherit from for on-device configurations.
-# GSI for system/product
+#
+# All components inherited here go to system image
+#
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_common.mk)
-
-# Emulator for vendor
-$(call inherit-product-if-exists, device/generic/goldfish/x86_64-vendor.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
# Enable mainline checking for excat this product name
ifeq (aosp_x86_64,$(TARGET_PRODUCT))
@@ -46,6 +43,24 @@
root/init.zygote32_64.rc \
root/init.zygote64_32.rc \
+#
+# All components inherited here go to product image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# All components inherited here go to vendor image
+#
+$(call inherit-product-if-exists, device/generic/goldfish/x86_64-vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk)
+
+#
+# Special settings for GSI releasing
+#
+ifeq (aosp_x86_64,$(TARGET_PRODUCT))
+$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
+
# Copy different zygote settings for vendor.img to select by setting property
# ro.zygote=zygote64_32 or ro.zygote=zygote32_64:
# 1. 64-bit primary, 32-bit secondary OR
@@ -53,6 +68,8 @@
# init.zygote64_32.rc is in the core_64_bit.mk below
PRODUCT_COPY_FILES += \
system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
+endif
+
PRODUCT_NAME := aosp_x86_64
PRODUCT_DEVICE := generic_x86_64
diff --git a/target/product/emulator_vendor.mk b/target/product/emulator_vendor.mk
index f0a5354..727987c 100644
--- a/target/product/emulator_vendor.mk
+++ b/target/product/emulator_vendor.mk
@@ -29,6 +29,7 @@
system/lib/egl/libGLES_android.so \
system/lib64/egl/libGLES_android.so \
system/priv-app/SdkSetup/SdkSetup.apk \
+ system/priv-app/SdkSetup/oat/% \
# Device modules
PRODUCT_PACKAGES += \
diff --git a/target/product/gsi/skip_mount.cfg b/target/product/gsi/skip_mount.cfg
index 549767e..3f812cb 100644
--- a/target/product/gsi/skip_mount.cfg
+++ b/target/product/gsi/skip_mount.cfg
@@ -1,2 +1,2 @@
/product
-/product_services
+/system_ext
diff --git a/target/product/gsi_arm64.mk b/target/product/gsi_arm64.mk
index b711d88..b0225a3 100644
--- a/target/product/gsi_arm64.mk
+++ b/target/product/gsi_arm64.mk
@@ -14,15 +14,29 @@
# limitations under the License.
#
+#
+# All components inherited here go to system image
+#
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_common.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
# Enable mainline checking
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
+
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
root/init.zygote32_64.rc \
root/init.zygote64_32.rc \
+#
+# All components inherited here go to product image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# Special settings for GSI releasing
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
+
# Copy different zygote settings for vendor.img to select by setting property
# ro.zygote=zygote64_32 or ro.zygote=zygote32_64:
# 1. 64-bit primary, 32-bit secondary OR
@@ -31,6 +45,7 @@
PRODUCT_COPY_FILES += \
system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
+
PRODUCT_NAME := gsi_arm64
PRODUCT_DEVICE := gsi_arm64
PRODUCT_BRAND := generic
diff --git a/target/product/gsi_common.mk b/target/product/gsi_common.mk
index 7578f92..1b5cd55 100644
--- a/target/product/gsi_common.mk
+++ b/target/product/gsi_common.mk
@@ -55,10 +55,10 @@
system/etc/init/config/skip_mount.cfg \
system/etc/init/init.gsi.rc \
-# Exclude all files under system/product and system/product_services
+# Exclude all files under system/product and system/system_ext
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
system/product/% \
- system/product_services/%
+ system/system_ext/%
# Split selinux policy
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
new file mode 100644
index 0000000..d88ad35
--- /dev/null
+++ b/target/product/gsi_release.mk
@@ -0,0 +1,58 @@
+#
+# 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.
+#
+
+#
+# The makefile contains the special settings for GSI releasing.
+# This makefile is used for the build targets which used for releasing GSI.
+#
+# For example:
+# - Released GSI contains skip_mount.cfg to skip mounting prodcut paritition
+# - Released GSI contains more VNDK packages to support old version vendors
+# - etc.
+#
+
+# Exclude GSI specific files
+PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
+ system/etc/init/config/skip_mount.cfg \
+ system/etc/init/init.gsi.rc \
+
+# Exclude all files under system/product and system/system_ext
+PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
+ 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
+
+# Enable dynamic partition size
+PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
+
+# Needed by Pi newly launched device to pass VtsTrebleSysProp on GSI
+PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true
+
+# GSI specific tasks on boot
+PRODUCT_COPY_FILES += \
+ build/make/target/product/gsi/skip_mount.cfg:system/etc/init/config/skip_mount.cfg \
+ build/make/target/product/gsi/init.gsi.rc:system/etc/init/init.gsi.rc \
+
+# Support addtional P VNDK packages
+PRODUCT_EXTRA_VNDK_VERSIONS := 28
diff --git a/target/product/mainline_system_arm64.mk b/target/product/mainline_system_arm64.mk
index f01cc54..b9ac1e3 100644
--- a/target/product/mainline_system_arm64.mk
+++ b/target/product/mainline_system_arm64.mk
@@ -21,7 +21,7 @@
PRODUCT_BUILD_CACHE_IMAGE := false
PRODUCT_BUILD_ODM_IMAGE := false
PRODUCT_BUILD_PRODUCT_IMAGE := false
-PRODUCT_BUILD_PRODUCT_SERVICES_IMAGE := false
+PRODUCT_BUILD_SYSTEM_EXT_IMAGE := false
PRODUCT_BUILD_RAMDISK_IMAGE := false
PRODUCT_BUILD_SYSTEM_IMAGE := true
PRODUCT_BUILD_SYSTEM_OTHER_IMAGE := false
diff --git a/tools/fs_config/Android.mk b/tools/fs_config/Android.mk
index af0da46..64fabe6 100644
--- a/tools/fs_config/Android.mk
+++ b/tools/fs_config/Android.mk
@@ -27,13 +27,13 @@
system_android_filesystem_config := system/core/include/private/android_filesystem_config.h
system_capability_header := bionic/libc/kernel/uapi/linux/capability.h
-# List of supported vendor, oem, odm, product and product_services Partitions
+# List of supported vendor, oem, odm, product and system_ext Partitions
fs_config_generate_extra_partition_list := $(strip \
$(if $(BOARD_USES_VENDORIMAGE)$(BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE),vendor) \
$(if $(BOARD_USES_OEMIMAGE)$(BOARD_OEMIMAGE_FILE_SYSTEM_TYPE),oem) \
$(if $(BOARD_USES_ODMIMAGE)$(BOARD_ODMIMAGE_FILE_SYSTEM_TYPE),odm) \
$(if $(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE),product) \
- $(if $(BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE),product_services) \
+ $(if $(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE),system_ext) \
)
##################################
@@ -332,17 +332,17 @@
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
endif
-ifneq ($(filter product_services,$(fs_config_generate_extra_partition_list)),)
+ifneq ($(filter system_ext,$(fs_config_generate_extra_partition_list)),)
##################################
-# Generate the product_services/etc/fs_config_dirs binary file for the target
-# Add fs_config_dirs or fs_config_dirs_product_services to PRODUCT_PACKAGES in
+# Generate the system_ext/etc/fs_config_dirs binary file for the target
+# Add fs_config_dirs or fs_config_dirs_system_ext to PRODUCT_PACKAGES in
# the device make file to enable
include $(CLEAR_VARS)
-LOCAL_MODULE := fs_config_dirs_product_services
+LOCAL_MODULE := fs_config_dirs_system_ext
LOCAL_MODULE_CLASS := ETC
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
-LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_SERVICES)/etc
+LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT)/etc
include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
@@ -352,21 +352,21 @@
$< fsconfig \
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
- --partition product_services \
+ --partition system_ext \
--dirs \
--out_file $@ \
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
##################################
-# Generate the product_services/etc/fs_config_files binary file for the target
-# Add fs_config_files of fs_config_files_product_services to PRODUCT_PACKAGES in
+# Generate the system_ext/etc/fs_config_files binary file for the target
+# Add fs_config_files of fs_config_files_system_ext to PRODUCT_PACKAGES in
# the device make file to enable
include $(CLEAR_VARS)
-LOCAL_MODULE := fs_config_files_product_services
+LOCAL_MODULE := fs_config_files_system_ext
LOCAL_MODULE_CLASS := ETC
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
-LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_SERVICES)/etc
+LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT)/etc
include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
@@ -376,7 +376,7 @@
$< fsconfig \
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
- --partition product_services \
+ --partition system_ext \
--files \
--out_file $@ \
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
diff --git a/tools/mktarball.sh b/tools/mktarball.sh
deleted file mode 100755
index ced7e17..0000000
--- a/tools/mktarball.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/bash
-
-# $1: path to fs_get_stats program
-# $2: start dir
-# $3: subdir to tar up (from $2)
-# $4: target tar name
-# $5: target tarball name (usually $(3).bz2)
-# $6: TARGET_OUT path to query device specific FS configs
-
-if [ $# -ne 6 ]; then
- echo "Error: wrong number of arguments in cmd: $0 $* "
- exit 1
-fi
-
-fs_get_stats=`readlink -f $1`
-start_dir=`readlink -f $2`
-dir_to_tar=$3
-target_tar=`readlink -f $4`
-target_tarball=`readlink -f $5`
-target_out=`readlink -f $6`
-
-cd $2
-
-#tar --no-recursion -cvf ${target_tar} ${dir_to_tar}
-rm ${target_tar} > /dev/null 2>&1
-
-# do dirs first
-subdirs=`find ${dir_to_tar} -type d -print`
-files=`find ${dir_to_tar} \! -type d -print`
-for f in ${subdirs} ${files} ; do
- curr_perms=`stat -c 0%a $f`
- [ -d "$f" ] && is_dir=1 || is_dir=0
- new_info=`${fs_get_stats} ${curr_perms} ${is_dir} ${f} ${target_out}`
- new_uid=`echo ${new_info} | awk '{print $1;}'`
- new_gid=`echo ${new_info} | awk '{print $2;}'`
- new_perms=`echo ${new_info} | awk '{print $3;}'`
-# echo "$f: dir: $is_dir curr: $curr_perms uid: $new_uid gid: $new_gid "\
-# "perms: $new_perms"
- tar --no-recursion --numeric-owner --owner $new_uid \
- --group $new_gid --mode $new_perms -rf ${target_tar} ${f}
-done
-
-if [ $? -eq 0 ] ; then
- case "${target_tarball}" in
- *.bz2 )
- bzip2 -c ${target_tar} > ${target_tarball}
- ;;
- *.gz )
- gzip -c ${target_tar} > ${target_tarball}
- ;;
- esac
- success=$?
- [ $success -eq 0 ] || rm -f ${target_tarball}
- rm -f ${target_tar}
- exit $success
-fi
-
-rm -f ${target_tar}
-exit 1
diff --git a/tools/releasetools/Android.bp b/tools/releasetools/Android.bp
index 8cf3fab..6b4e4f5 100644
--- a/tools/releasetools/Android.bp
+++ b/tools/releasetools/Android.bp
@@ -13,21 +13,22 @@
// limitations under the License.
python_defaults {
- name: "releasetools_test_defaults",
+ name: "releasetools_defaults",
version: {
py2: {
enabled: true,
embedded_launcher: false,
},
py3: {
- enabled: false,
+ enabled: true,
+ embedded_launcher: false,
},
},
}
python_library_host {
name: "releasetools_lib",
- defaults: ["releasetools_test_defaults"],
+ defaults: ["releasetools_defaults"],
srcs: [
"add_img_to_target_files.py",
"apex_utils.py",
@@ -53,10 +54,9 @@
],
}
-python_test_host {
- name: "releasetools_test",
- defaults: ["releasetools_test_defaults"],
- main: "test_utils.py",
+python_defaults {
+ name: "releasetools_test_defaults",
+ defaults: ["releasetools_defaults"],
srcs: [
"test_*.py",
],
@@ -69,5 +69,38 @@
required: [
"otatools",
],
+}
+
+python_test_host {
+ name: "releasetools_test",
+ defaults: ["releasetools_test_defaults"],
+ main: "test_utils.py",
+ version: {
+ py2: {
+ enabled: true,
+ embedded_launcher: false,
+ },
+ py3: {
+ enabled: false,
+ embedded_launcher: false,
+ },
+ },
+ test_suites: ["general-tests"],
+}
+
+python_test_host {
+ name: "releasetools_py3_test",
+ defaults: ["releasetools_test_defaults"],
+ main: "test_utils.py",
+ version: {
+ py2: {
+ enabled: false,
+ embedded_launcher: false,
+ },
+ py3: {
+ enabled: true,
+ embedded_launcher: false,
+ },
+ },
test_suites: ["general-tests"],
}
diff --git a/tools/releasetools/TEST_MAPPING b/tools/releasetools/TEST_MAPPING
index 77cef07..0af0f04 100644
--- a/tools/releasetools/TEST_MAPPING
+++ b/tools/releasetools/TEST_MAPPING
@@ -3,6 +3,10 @@
{
"name": "releasetools_test",
"host": true
+ },
+ {
+ "name": "releasetools_py3_test",
+ "host": true
}
]
}
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py
index 98386a6..e177828 100755
--- a/tools/releasetools/add_img_to_target_files.py
+++ b/tools/releasetools/add_img_to_target_files.py
@@ -222,20 +222,20 @@
return img.name
-def AddProductServices(output_zip):
- """Turn the contents of PRODUCT_SERVICES into a product_services image and
- store it in output_zip."""
+def AddSystemExt(output_zip):
+ """Turn the contents of SYSTEM_EXT into a system_ext image and store it in
+ output_zip."""
img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES",
- "product_services.img")
+ "system_ext.img")
if os.path.exists(img.name):
- logger.info("product_services.img already exists; no need to rebuild...")
+ logger.info("system_ext.img already exists; no need to rebuild...")
return img.name
block_list = OutputFile(
- output_zip, OPTIONS.input_tmp, "IMAGES", "product_services.map")
+ output_zip, OPTIONS.input_tmp, "IMAGES", "system_ext.map")
CreateImage(
- OPTIONS.input_tmp, OPTIONS.info_dict, "product_services", img,
+ OPTIONS.input_tmp, OPTIONS.info_dict, "system_ext", img,
block_list=block_list)
return img.name
@@ -734,10 +734,10 @@
has_recovery = OPTIONS.info_dict.get("no_recovery") != "true"
has_boot = OPTIONS.info_dict.get("no_boot") != "true"
- # {vendor,odm,product,product_services}.img are unlike system.img or
+ # {vendor,odm,product,system_ext}.img are unlike system.img or
# system_other.img. Because it could be built from source, or dropped into
# target_files.zip as a prebuilt blob. We consider either of them as
- # {vendor,product,product_services}.img being available, which could be
+ # {vendor,product,system_ext}.img being available, which could be
# used when generating vbmeta.img for AVB.
has_vendor = (os.path.isdir(os.path.join(OPTIONS.input_tmp, "VENDOR")) or
os.path.exists(os.path.join(OPTIONS.input_tmp, "IMAGES",
@@ -748,11 +748,11 @@
has_product = (os.path.isdir(os.path.join(OPTIONS.input_tmp, "PRODUCT")) or
os.path.exists(os.path.join(OPTIONS.input_tmp, "IMAGES",
"product.img")))
- has_product_services = (os.path.isdir(os.path.join(OPTIONS.input_tmp,
- "PRODUCT_SERVICES")) or
- os.path.exists(os.path.join(OPTIONS.input_tmp,
- "IMAGES",
- "product_services.img")))
+ has_system_ext = (os.path.isdir(os.path.join(OPTIONS.input_tmp,
+ "SYSTEM_EXT")) or
+ os.path.exists(os.path.join(OPTIONS.input_tmp,
+ "IMAGES",
+ "system_ext.img")))
has_system = os.path.isdir(os.path.join(OPTIONS.input_tmp, "SYSTEM"))
has_system_other = os.path.isdir(os.path.join(OPTIONS.input_tmp,
"SYSTEM_OTHER"))
@@ -833,9 +833,9 @@
banner("product")
partitions['product'] = AddProduct(output_zip)
- if has_product_services:
- banner("product_services")
- partitions['product_services'] = AddProductServices(output_zip)
+ if has_system_ext:
+ banner("system_ext")
+ partitions['system_ext'] = AddSystemExt(output_zip)
if has_odm:
banner("odm")
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index ba04651..ee05dd5 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -644,30 +644,30 @@
d["extfs_rsv_pct"] = "0"
copy_prop("product_reserved_size", "partition_reserved_size")
copy_prop("product_selinux_fc", "selinux_fc")
- elif mount_point == "product_services":
- copy_prop("avb_product_services_hashtree_enable", "avb_hashtree_enable")
- copy_prop("avb_product_services_add_hashtree_footer_args",
+ elif mount_point == "system_ext":
+ copy_prop("avb_system_ext_hashtree_enable", "avb_hashtree_enable")
+ copy_prop("avb_system_ext_add_hashtree_footer_args",
"avb_add_hashtree_footer_args")
- copy_prop("avb_product_services_key_path", "avb_key_path")
- copy_prop("avb_product_services_algorithm", "avb_algorithm")
- copy_prop("product_services_fs_type", "fs_type")
- copy_prop("product_services_size", "partition_size")
- if not copy_prop("product_services_journal_size", "journal_size"):
+ copy_prop("avb_system_ext_key_path", "avb_key_path")
+ copy_prop("avb_system_ext_algorithm", "avb_algorithm")
+ copy_prop("system_ext_fs_type", "fs_type")
+ copy_prop("system_ext_size", "partition_size")
+ if not copy_prop("system_ext_journal_size", "journal_size"):
d["journal_size"] = "0"
- copy_prop("product_services_verity_block_device", "verity_block_device")
+ copy_prop("system_ext_verity_block_device", "verity_block_device")
copy_prop("ext4_share_dup_blocks", "ext4_share_dup_blocks")
- copy_prop("product_services_squashfs_compressor", "squashfs_compressor")
- copy_prop("product_services_squashfs_compressor_opt",
+ copy_prop("system_ext_squashfs_compressor", "squashfs_compressor")
+ copy_prop("system_ext_squashfs_compressor_opt",
"squashfs_compressor_opt")
- copy_prop("product_services_squashfs_block_size", "squashfs_block_size")
- copy_prop("product_services_squashfs_disable_4k_align",
+ copy_prop("system_ext_squashfs_block_size", "squashfs_block_size")
+ copy_prop("system_ext_squashfs_disable_4k_align",
"squashfs_disable_4k_align")
- copy_prop("product_services_base_fs_file", "base_fs_file")
- copy_prop("product_services_extfs_inode_count", "extfs_inode_count")
- if not copy_prop("product_services_extfs_rsv_pct", "extfs_rsv_pct"):
+ copy_prop("system_ext_base_fs_file", "base_fs_file")
+ copy_prop("system_ext_extfs_inode_count", "extfs_inode_count")
+ if not copy_prop("system_ext_extfs_rsv_pct", "extfs_rsv_pct"):
d["extfs_rsv_pct"] = "0"
- copy_prop("product_services_reserved_size", "partition_reserved_size")
- copy_prop("product_services_selinux_fc", "selinux_fc")
+ copy_prop("system_ext_reserved_size", "partition_reserved_size")
+ copy_prop("system_ext_selinux_fc", "selinux_fc")
elif mount_point == "odm":
copy_prop("avb_odm_hashtree_enable", "avb_hashtree_enable")
copy_prop("avb_odm_add_hashtree_footer_args",
@@ -736,8 +736,8 @@
copy_prop("partition_size", "odm_size")
elif mount_point == "product":
copy_prop("partition_size", "product_size")
- elif mount_point == "product_services":
- copy_prop("partition_size", "product_services_size")
+ elif mount_point == "system_ext":
+ copy_prop("partition_size", "system_ext_size")
return d
@@ -777,8 +777,8 @@
mount_point = "oem"
elif image_filename == "product.img":
mount_point = "product"
- elif image_filename == "product_services.img":
- mount_point = "product_services"
+ elif image_filename == "system_ext.img":
+ mount_point = "system_ext"
else:
logger.error("Unknown image file name %s", image_filename)
sys.exit(1)
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index edde89c..0030afa 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -98,15 +98,14 @@
# The partitions allowed to be signed by AVB (Android Verified Boot 2.0). Note
# that system_other is not in the list because we don't want to include its
# descriptor into vbmeta.img.
-AVB_PARTITIONS = ('boot', 'dtbo', 'odm', 'product', 'product_services',
- 'recovery', 'system', 'vendor')
+AVB_PARTITIONS = ('boot', 'dtbo', 'odm', 'product', 'recovery', 'system',
+ 'system_ext', 'vendor')
# Chained VBMeta partitions.
AVB_VBMETA_PARTITIONS = ('vbmeta_system', 'vbmeta_vendor')
# Partitions that should have their care_map added to META/care_map.pb
-PARTITIONS_WITH_CARE_MAP = ('system', 'vendor', 'product', 'product_services',
- 'odm')
+PARTITIONS_WITH_CARE_MAP = ('system', 'vendor', 'product', 'system_ext', 'odm')
class ErrorCode(object):
@@ -1461,7 +1460,7 @@
values.
"""
result = {}
- for k, v in sorted(current.iteritems()):
+ for k, v in sorted(current.items()):
if v:
result[k] = v
else:
@@ -1482,7 +1481,7 @@
f.write("# (Additional spaces are harmless.)\n\n")
first_line = None
- sorted_list = sorted([(not v, k, v) for (k, v) in current.iteritems()])
+ sorted_list = sorted([(not v, k, v) for (k, v) in current.items()])
for i, (_, k, v) in enumerate(sorted_list):
f.write("[[[ %s ]]] %s\n" % (v, k))
if not v and first_line is None:
@@ -1648,7 +1647,7 @@
"""Keyword arguments to the constructor become attributes of this
object, which is passed to all functions in the device-specific
module."""
- for k, v in kwargs.iteritems():
+ for k, v in kwargs.items():
setattr(self, k, v)
self.extras = OPTIONS.extras
diff --git a/tools/releasetools/merge_target_files.py b/tools/releasetools/merge_target_files.py
index a9e9151..f73bae1 100755
--- a/tools/releasetools/merge_target_files.py
+++ b/tools/releasetools/merge_target_files.py
@@ -13,7 +13,9 @@
# 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 script merges two partial target files packages.
+
+"""
+This script merges two partial target files packages.
One package contains framework files, and the other contains vendor files.
It produces a complete target files package that can be used to generate an
@@ -91,6 +93,7 @@
import ota_from_target_files
logger = logging.getLogger(__name__)
+
OPTIONS = common.OPTIONS
OPTIONS.verbose = True
OPTIONS.framework_target_files = None
@@ -143,8 +146,8 @@
'avb_system_rollback_index_location',
'avb_product_hashtree_enable',
'avb_product_add_hashtree_footer_args',
- 'avb_product_services_hashtree_enable',
- 'avb_product_services_add_hashtree_footer_args',
+ 'avb_system_ext_hashtree_enable',
+ 'avb_system_ext_add_hashtree_footer_args',
'system_root_image',
'root_dir',
'ab_update',
@@ -190,7 +193,7 @@
'DATA/',
'ODM/',
'PRODUCT/',
- 'PRODUCT_SERVICES/',
+ 'SYSTEM_EXT/',
'RADIO/',
'RECOVERY/',
'ROOT/',
@@ -201,10 +204,10 @@
def write_sorted_data(data, path):
- """Write the sorted contents of either a list or dict to file.
+ """Writes the sorted contents of either a list or dict to file.
- This function sorts the contents of the list or dict and then
- writes the resulting sorted contents to a file specified by path.
+ This function sorts the contents of the list or dict and then writes the
+ resulting sorted contents to a file specified by path.
Args:
data: The list or dict to sort and write.
@@ -219,7 +222,7 @@
def extract_items(target_files, target_files_temp_dir, extract_item_list):
- """Extract items from target files to temporary directory.
+ """Extracts items from target files to temporary directory.
This function extracts from the specified target files zip archive into the
specified temporary directory, the items specified in the extract item list.
@@ -237,7 +240,7 @@
# zip file. Otherwise, the extraction step will fail.
with zipfile.ZipFile(
- target_files, 'r', allowZip64=True) as target_files_zipfile:
+ target_files, allowZip64=True) as target_files_zipfile:
target_files_namelist = target_files_zipfile.namelist()
filtered_extract_item_list = []
@@ -334,9 +337,9 @@
in_vendor = any(item.startswith(partition) for item in vendor_item_list)
if in_framework and in_vendor:
logger.error(
- 'Cannot extract items from {0} for both the framework and vendor'
+ 'Cannot extract items from %s for both the framework and vendor'
' builds. Please ensure only one merge config item list'
- ' includes {0}.'.format(partition))
+ ' includes %s.', partition, partition)
has_error = True
if ('dynamic_partition_list' in framework_misc_info_keys) or (
@@ -351,15 +354,14 @@
def process_ab_partitions_txt(framework_target_files_temp_dir,
vendor_target_files_temp_dir,
output_target_files_temp_dir):
- """Perform special processing for META/ab_partitions.txt.
+ """Performs special processing for META/ab_partitions.txt.
- This function merges the contents of the META/ab_partitions.txt files from
- the framework directory and the vendor directory, placing the merged result in
- the output directory. The precondition in that the files are already
- extracted. The post condition is that the output META/ab_partitions.txt
- contains the merged content. The format for each ab_partitions.txt a one
- partition name per line. The output file contains the union of the parition
- names.
+ This function merges the contents of the META/ab_partitions.txt files from the
+ framework directory and the vendor directory, placing the merged result in the
+ output directory. The precondition in that the files are already extracted.
+ The post condition is that the output META/ab_partitions.txt contains the
+ merged content. The format for each ab_partitions.txt a one partition name per
+ line. The output file contains the union of the parition names.
Args:
framework_target_files_temp_dir: The name of a directory containing the
@@ -392,10 +394,10 @@
def append_recovery_to_filesystem_config(output_target_files_temp_dir):
- """Perform special processing for META/filesystem_config.txt.
+ """Performs special processing for META/filesystem_config.txt.
- This function appends recovery information to META/filesystem_config.txt
- so that recovery patch regeneration will succeed.
+ This function appends recovery information to META/filesystem_config.txt so
+ that recovery patch regeneration will succeed.
Args:
output_target_files_temp_dir: The name of a directory that will be used to
@@ -479,7 +481,7 @@
vendor_target_files_temp_dir,
output_target_files_temp_dir,
framework_misc_info_keys):
- """Perform special processing for META/misc_info.txt.
+ """Performs special processing for META/misc_info.txt.
This function merges the contents of the META/misc_info.txt files from the
framework directory and the vendor directory, placing the merged result in the
@@ -551,7 +553,7 @@
def process_dynamic_partitions_info_txt(framework_target_files_dir,
vendor_target_files_dir,
output_target_files_dir):
- """Perform special processing for META/dynamic_partitions_info.txt.
+ """Performs special processing for META/dynamic_partitions_info.txt.
This function merges the contents of the META/dynamic_partitions_info.txt
files from the framework directory and the vendor directory, placing the
@@ -599,14 +601,13 @@
def process_apex_keys_apk_certs_common(framework_target_files_dir,
vendor_target_files_dir,
output_target_files_dir, file_name):
- """Perform special processing for META/apexkeys.txt or META/apkcerts.txt.
+ """Performs special processing for META/apexkeys.txt or META/apkcerts.txt.
This function merges the contents of the META/apexkeys.txt or
- META/apkcerts.txt files from the framework directory and the vendor
- directory, placing the merged result in the output directory. The
- precondition in that the files are already extracted. The post condition
- is that the output META/apexkeys.txt or META/apkcerts.txt contains the
- merged content.
+ META/apkcerts.txt files from the framework directory and the vendor directory,
+ placing the merged result in the output directory. The precondition in that
+ the files are already extracted. The post condition is that the output
+ META/apexkeys.txt or META/apkcerts.txt contains the merged content.
Args:
framework_target_files_dir: The name of a directory containing the special
@@ -673,7 +674,7 @@
vendor_target_files_temp_dir,
output_target_files_temp_dir,
framework_misc_info_keys, rebuild_recovery):
- """Perform special-case processing for certain target files items.
+ """Performs special-case processing for certain target files items.
Certain files in the output target files package require special-case
processing. This function performs all that special-case processing.
@@ -732,16 +733,30 @@
file_name='apexkeys.txt')
-def merge_target_files(temp_dir, framework_target_files, framework_item_list,
- framework_misc_info_keys, vendor_target_files,
- vendor_item_list, output_target_files, output_dir,
- output_item_list, output_ota, output_img,
- output_super_empty, rebuild_recovery):
- """Merge two target files packages together.
+def files_from_path(target_path, extra_args=None):
+ """Gets files under given path.
- This function takes framework and vendor target files packages as input,
- performs various file extractions, special case processing, and finally
- creates a merged zip archive as output.
+ Get (sub)files from given target path and return sorted list.
+
+ Args:
+ target_path: Target path to get subfiles.
+ extra_args: List of extra argument for find command. Optional.
+
+ Returns:
+ Sorted files and directories list.
+ """
+
+ find_command = ['find', target_path] + (extra_args or [])
+ find_process = common.Run(find_command, stdout=subprocess.PIPE, verbose=False)
+ return common.RunAndCheckOutput(['sort'], stdin=find_process.stdout,
+ verbose=False)
+
+
+def create_merged_package(temp_dir, framework_target_files, framework_item_list,
+ vendor_target_files, vendor_item_list,
+ framework_misc_info_keys,
+ rebuild_recovery):
+ """Merges two target files packages into one target files structure.
Args:
temp_dir: The name of a directory we use when we extract items from the
@@ -753,29 +768,21 @@
target files package as is, meaning these items will land in the output
target files package exactly as they appear in the input partial framework
target files package.
- framework_misc_info_keys: The list of keys to obtain from the framework
- instance of META/misc_info.txt. The remaining keys from the vendor
- instance.
vendor_target_files: The name of the zip archive containing the vendor
partial target files package.
vendor_item_list: The list of items to extract from the partial vendor
target files package as is, meaning these items will land in the output
target files package exactly as they appear in the input partial vendor
target files package.
- output_target_files: The name of the output zip archive target files package
- created by merging framework and vendor.
- output_dir: The destination directory for saving merged files.
- output_item_list: The list of items to copy into the output_dir.
- output_ota: The name of the output zip archive ota package.
- output_img: The name of the output zip archive img package.
- output_super_empty: If provided, creates a super_empty.img file from the
- merged target files package and saves it at this path.
+ framework_misc_info_keys: The list of keys to obtain from the framework
+ instance of META/misc_info.txt. The remaining keys from the vendor
+ instance.
rebuild_recovery: If true, rebuild the recovery patch used by non-A/B
devices and write it to the system image.
- """
- logger.info('starting: merge framework %s and vendor %s into output %s',
- framework_target_files, vendor_target_files, output_target_files)
+ Returns:
+ Path to merged package under temp directory.
+ """
# Create directory names that we'll use when we extract files from framework,
# and vendor, and for zipping the final output.
@@ -832,18 +839,43 @@
framework_misc_info_keys=framework_misc_info_keys,
rebuild_recovery=rebuild_recovery)
- # Regenerate IMAGES in the temporary directory.
+ return output_target_files_temp_dir
+
+
+def generate_images(target_files_dir, rebuild_recovery):
+ """Generate images from target files.
+
+ This function takes merged output temporary directory and create images
+ from it.
+
+ Args:
+ target_files_dir: Path to merged temp directory.
+ rebuild_recovery: If true, rebuild the recovery patch used by non-A/B
+ devices and write it to the system image.
+ """
+
+ # Regenerate IMAGES in the target directory.
add_img_args = ['--verbose']
if rebuild_recovery:
add_img_args.append('--rebuild_recovery')
- add_img_args.append(output_target_files_temp_dir)
+ add_img_args.append(target_files_dir)
add_img_to_target_files.main(add_img_args)
+
+def generate_super_empty_image(target_dir, output_super_empty):
+ """Generates super_empty image from target package.
+
+ Args:
+ target_dir: Path to the target file package which contains misc_info.txt for
+ detailed information for super image.
+ output_super_empty: If provided, copies a super_empty.img file from the
+ target files package to this path.
+ """
# Create super_empty.img using the merged misc_info.txt.
- misc_info_txt = os.path.join(output_target_files_temp_dir, 'META',
+ misc_info_txt = os.path.join(target_dir, 'META',
'misc_info.txt')
use_dynamic_partitions = common.LoadDictionaryFromFile(misc_info_txt).get(
@@ -853,7 +885,7 @@
raise ValueError(
'Building super_empty.img requires use_dynamic_partitions=true.')
elif use_dynamic_partitions == 'true':
- super_empty_img = os.path.join(output_target_files_temp_dir, 'IMAGES',
+ super_empty_img = os.path.join(target_dir, 'IMAGES',
'super_empty.img')
build_super_image_args = [
misc_info_txt,
@@ -865,15 +897,134 @@
if output_super_empty:
shutil.copyfile(super_empty_img, output_super_empty)
- # Create the IMG package from the merged target files (before zipping, in
- # order to avoid an unnecessary unzip and copy).
+
+def create_img_archive(source_path, target_path):
+ """Creates IMG archive in target path from source package.
+
+ Args:
+ source_path: Path of the source package to be packed.
+ target_path: Create IMG package from the source package.
+ """
+
+ img_from_target_files_args = [
+ source_path,
+ target_path,
+ ]
+ img_from_target_files.main(img_from_target_files_args)
+
+
+def create_target_files_archive(output_file, source_dir, temp_dir):
+ """Creates archive from target package.
+
+ Args:
+ output_file: The name of the zip archive target files package.
+ source_dir: The target directory contains package to be archived.
+ temp_dir: Path to temporary directory for any intermediate files.
+ """
+ output_target_files_list = os.path.join(temp_dir, 'output.list')
+ output_zip = os.path.abspath(output_file)
+ output_target_files_meta_dir = os.path.join(source_dir,
+ 'META')
+
+ meta_content = files_from_path(output_target_files_meta_dir)
+ other_content = files_from_path(source_dir,
+ ['-path', output_target_files_meta_dir,
+ '-prune', '-o', '-print'])
+
+ with open(output_target_files_list, 'w') as f:
+ f.write(meta_content)
+ f.write(other_content)
+
+ command = [
+ 'soong_zip',
+ '-d',
+ '-o',
+ output_zip,
+ '-C',
+ source_dir,
+ '-l',
+ output_target_files_list,
+ ]
+
+ logger.info('creating %s', output_file)
+ common.RunAndWait(command, verbose=True)
+ logger.info('finished creating %s', output_file)
+
+ return output_zip
+
+
+def create_ota_package(zip_package, output_ota):
+ """Creates OTA package from archived package.
+
+ Args:
+ zip_package: The name of the zip archived package.
+ output_ota: The name of the output zip archive ota package.
+ """
+ ota_from_target_files_args = [
+ zip_package,
+ output_ota,
+ ]
+ ota_from_target_files.main(ota_from_target_files_args)
+
+
+def merge_target_files(temp_dir, framework_target_files, framework_item_list,
+ framework_misc_info_keys, vendor_target_files,
+ vendor_item_list, output_target_files, output_dir,
+ output_item_list, output_ota, output_img,
+ output_super_empty, rebuild_recovery):
+ """Merges two target files packages together.
+
+ This function takes framework and vendor target files packages as input,
+ performs various file extractions, special case processing, and finally
+ creates a merged zip archive as output.
+
+ Args:
+ temp_dir: The name of a directory we use when we extract items from the
+ input target files packages, and also a scratch directory that we use for
+ temporary files.
+ framework_target_files: The name of the zip archive containing the framework
+ partial target files package.
+ framework_item_list: The list of items to extract from the partial framework
+ target files package as is, meaning these items will land in the output
+ target files package exactly as they appear in the input partial framework
+ target files package.
+ framework_misc_info_keys: The list of keys to obtain from the framework
+ instance of META/misc_info.txt. The remaining keys from the vendor
+ instance.
+ vendor_target_files: The name of the zip archive containing the vendor
+ partial target files package.
+ vendor_item_list: The list of items to extract from the partial vendor
+ target files package as is, meaning these items will land in the output
+ target files package exactly as they appear in the input partial vendor
+ target files package.
+ output_target_files: The name of the output zip archive target files package
+ created by merging framework and vendor.
+ output_dir: The destination directory for saving merged files.
+ output_item_list: The list of items to copy into the output_dir.
+ output_ota: The name of the output zip archive ota package.
+ output_img: The name of the output zip archive img package.
+ output_super_empty: If provided, creates a super_empty.img file from the
+ merged target files package and saves it at this path.
+ rebuild_recovery: If true, rebuild the recovery patch used by non-A/B
+ devices and write it to the system image.
+ """
+
+ logger.info('starting: merge framework %s and vendor %s into output %s',
+ framework_target_files, vendor_target_files, output_target_files)
+
+ output_target_files_temp_dir = create_merged_package(
+ temp_dir, framework_target_files, framework_item_list,
+ vendor_target_files, vendor_item_list, framework_misc_info_keys,
+ rebuild_recovery)
+
+ generate_images(output_target_files_temp_dir, rebuild_recovery)
+
+ generate_super_empty_image(output_target_files_temp_dir, output_super_empty)
if output_img:
- img_from_target_files_args = [
- output_target_files_temp_dir,
- output_img,
- ]
- img_from_target_files.main(img_from_target_files_args)
+ # Create the IMG package from the merged target files (before zipping, in
+ # order to avoid an unnecessary unzip and copy).
+ create_img_archive(output_target_files_temp_dir, output_img)
# Finally, create the output target files zip archive and/or copy the
# output items to the output target files directory.
@@ -884,59 +1035,18 @@
if not output_target_files:
return
- output_zip = os.path.abspath(output_target_files)
- output_target_files_list = os.path.join(temp_dir, 'output.list')
- output_target_files_meta_dir = os.path.join(output_target_files_temp_dir,
- 'META')
-
- find_command = [
- 'find',
- output_target_files_meta_dir,
- ]
- find_process = common.Run(find_command, stdout=subprocess.PIPE, verbose=False)
- meta_content = common.RunAndCheckOutput(['sort'],
- stdin=find_process.stdout,
- verbose=False)
-
- find_command = [
- 'find', output_target_files_temp_dir, '-path',
- output_target_files_meta_dir, '-prune', '-o', '-print'
- ]
- find_process = common.Run(find_command, stdout=subprocess.PIPE, verbose=False)
- other_content = common.RunAndCheckOutput(['sort'],
- stdin=find_process.stdout,
- verbose=False)
-
- with open(output_target_files_list, 'wb') as f:
- f.write(meta_content)
- f.write(other_content)
-
- command = [
- 'soong_zip',
- '-d',
- '-o',
- output_zip,
- '-C',
- output_target_files_temp_dir,
- '-l',
- output_target_files_list,
- ]
- logger.info('creating %s', output_target_files)
- common.RunAndWait(command, verbose=True)
- logger.info('finished creating %s', output_target_files)
+ output_zip = create_target_files_archive(output_target_files,
+ output_target_files_temp_dir,
+ temp_dir)
# Create the OTA package from the merged target files package.
if output_ota:
- ota_from_target_files_args = [
- output_zip,
- output_ota,
- ]
- ota_from_target_files.main(ota_from_target_files_args)
+ create_ota_package(output_zip, output_ota)
def call_func_with_temp_dir(func, keep_tmp):
- """Manage the creation and cleanup of the temporary directory.
+ """Manages the creation and cleanup of the temporary directory.
This function calls the given function after first creating a temporary
directory. It also cleans up the temporary directory.
@@ -955,8 +1065,6 @@
try:
func(temp_dir)
- except:
- raise
finally:
if keep_tmp:
logger.info('keeping %s', temp_dir)
@@ -1050,6 +1158,7 @@
],
extra_option_handler=option_handler)
+ # pylint: disable=too-many-boolean-expressions
if (args or OPTIONS.framework_target_files is None or
OPTIONS.vendor_target_files is None or
(OPTIONS.output_target_files is None and OPTIONS.output_dir is None) or
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 0e84327..4598317 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -276,8 +276,8 @@
_RO_PRODUCT_RESOLVE_PROPS = ["ro.product.brand", "ro.product.device",
"ro.product.manufacturer", "ro.product.model",
"ro.product.name"]
- _RO_PRODUCT_PROPS_DEFAULT_SOURCE_ORDER = ["product", "product_services",
- "odm", "vendor", "system"]
+ _RO_PRODUCT_PROPS_DEFAULT_SOURCE_ORDER = ["product", "odm", "vendor",
+ "system_ext", "system"]
def __init__(self, info_dict, oem_dicts):
"""Initializes a BuildInfo instance with the given dicts.
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index a7e6bb0..4cb3a37 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -188,6 +188,9 @@
for apex, key in OPTIONS.extra_apex_payload_keys.items():
if not key:
key = 'PRESIGNED'
+ if apex not in keys_info:
+ logger.warning('Failed to find %s in target_files; Ignored', apex)
+ continue
keys_info[apex] = (key, keys_info[apex][1])
# Apply the key remapping to container keys.
@@ -501,8 +504,8 @@
"PRODUCT/build.prop",
"SYSTEM/product/build.prop",
- "PRODUCT_SERVICES/build.prop",
- "SYSTEM/product_services/build.prop",
+ "SYSTEM_EXT/build.prop",
+ "SYSTEM/system_ext/build.prop",
"SYSTEM/etc/prop.default",
"BOOT/RAMDISK/prop.default",
diff --git a/tools/releasetools/test_common.py b/tools/releasetools/test_common.py
index 287cf0a..50fa86f 100644
--- a/tools/releasetools/test_common.py
+++ b/tools/releasetools/test_common.py
@@ -1254,10 +1254,10 @@
def test_incremental(self):
source_info = common.LoadDictionaryFromLines("""
-dynamic_partition_list=system vendor product product_services
+dynamic_partition_list=system vendor product system_ext
super_partition_groups=group_foo
super_group_foo_group_size={group_foo_size}
-super_group_foo_partition_list=system vendor product product_services
+super_group_foo_partition_list=system vendor product system_ext
""".format(group_foo_size=4 * GiB).split("\n"))
target_info = common.LoadDictionaryFromLines("""
dynamic_partition_list=system vendor product odm
@@ -1274,7 +1274,7 @@
src=FakeSparseImage(1024 * MiB)),
MockBlockDifference("product", FakeSparseImage(1024 * MiB),
src=FakeSparseImage(1024 * MiB)),
- MockBlockDifference("product_services", None,
+ MockBlockDifference("system_ext", None,
src=FakeSparseImage(1024 * MiB)),
MockBlockDifference("odm", FakeSparseImage(1024 * MiB),
src=None)]
@@ -1297,11 +1297,11 @@
self.assertLess(patch_idx, verify_idx,
"Should verify {} after patching".format(p))
- self.assertNotIn("patch(product_services);", self.script.lines)
+ self.assertNotIn("patch(system_ext);", self.script.lines)
lines = self.get_op_list(self.output_path)
- remove = lines.index("remove product_services")
+ remove = lines.index("remove system_ext")
move_product_out = lines.index("move product default")
shrink = lines.index("resize vendor 536870912")
shrink_group = lines.index("resize_group group_foo 3221225472")
diff --git a/tools/releasetools/test_merge_target_files.py b/tools/releasetools/test_merge_target_files.py
index b90a2e7..bca29e5 100644
--- a/tools/releasetools/test_merge_target_files.py
+++ b/tools/releasetools/test_merge_target_files.py
@@ -98,7 +98,8 @@
'ROOT/*',
'SYSTEM/*',
]
- self.assertItemsEqual(framework_item_list, expected_framework_item_list)
+ self.assertEqual(sorted(framework_item_list),
+ sorted(expected_framework_item_list))
def test_validate_config_lists_ReturnsFalseIfMissingDefaultItem(self):
framework_item_list = list(DEFAULT_FRAMEWORK_ITEM_LIST)
diff --git a/tools/releasetools/test_sign_target_files_apks.py b/tools/releasetools/test_sign_target_files_apks.py
index 9a1d163..0100729 100644
--- a/tools/releasetools/test_sign_target_files_apks.py
+++ b/tools/releasetools/test_sign_target_files_apks.py
@@ -70,10 +70,10 @@
'ro.product.build.fingerprint=foo/bar/release-keys'),
('ro.product.build.thumbprint=foo/bar/dev-keys',
'ro.product.build.thumbprint=foo/bar/release-keys'),
- ('ro.product_services.build.fingerprint=foo/bar/test-keys',
- 'ro.product_services.build.fingerprint=foo/bar/release-keys'),
- ('ro.product_services.build.thumbprint=foo/bar/test-keys',
- 'ro.product_services.build.thumbprint=foo/bar/release-keys'),
+ ('ro.system_ext.build.fingerprint=foo/bar/test-keys',
+ 'ro.system_ext.build.fingerprint=foo/bar/release-keys'),
+ ('ro.system_ext.build.thumbprint=foo/bar/test-keys',
+ 'ro.system_ext.build.thumbprint=foo/bar/release-keys'),
('# comment line 1', '# comment line 1'),
('ro.bootimage.build.fingerprint=foo/bar/dev-keys',
'ro.bootimage.build.fingerprint=foo/bar/release-keys'),
@@ -91,8 +91,8 @@
'ro.odm.build.tags=release-keys'),
('ro.product.build.tags=dev-keys',
'ro.product.build.tags=release-keys'),
- ('ro.product_services.build.tags=dev-keys',
- 'ro.product_services.build.tags=release-keys'),
+ ('ro.system_ext.build.tags=dev-keys',
+ 'ro.system_ext.build.tags=release-keys'),
('# comment line 2', '# comment line 2'),
('ro.build.display.id=OPR6.170623.012 dev-keys',
'ro.build.display.id=OPR6.170623.012'),
diff --git a/tools/signapk/src/com/android/signapk/SignApk.java b/tools/signapk/src/com/android/signapk/SignApk.java
index 57973ec..9809ed4 100644
--- a/tools/signapk/src/com/android/signapk/SignApk.java
+++ b/tools/signapk/src/com/android/signapk/SignApk.java
@@ -381,9 +381,8 @@
byte[] buffer = new byte[4096];
int num;
- List<Pattern> pinPatterns = extractPinPatterns(in);
+ List<Hints.PatternWithRange> pinPatterns = extractPinPatterns(in);
ArrayList<Hints.ByteRange> pinByteRanges = pinPatterns == null ? null : new ArrayList<>();
- HashSet<String> namesToPin = new HashSet<>();
ArrayList<String> names = new ArrayList<String>();
for (Enumeration<JarEntry> e = in.entries(); e.hasMoreElements();) {
@@ -399,13 +398,6 @@
if (Hints.PIN_BYTE_RANGE_ZIP_ENTRY_NAME.equals(entryName)) {
continue; // We regenerate it below.
}
- if (pinPatterns != null) {
- for (Pattern pinPattern : pinPatterns) {
- if (pinPattern.matcher(entryName).matches()) {
- namesToPin.add(entryName);
- }
- }
- }
names.add(entryName);
}
Collections.sort(names);
@@ -485,6 +477,7 @@
DataSink entryDataSink =
(inspectEntryRequest != null) ? inspectEntryRequest.getDataSink() : null;
+ long entryDataStart = outCounter.getWrittenBytes();
try (InputStream data = in.getInputStream(inEntry)) {
while ((num = data.read(buffer)) > 0) {
out.write(buffer, 0, num);
@@ -500,11 +493,27 @@
inspectEntryRequest.done();
}
- if (namesToPin.contains(name)) {
- pinByteRanges.add(
- new Hints.ByteRange(
- entryHeaderStart,
- outCounter.getWrittenBytes()));
+ if (pinPatterns != null) {
+ boolean pinFileHeader = false;
+ for (Hints.PatternWithRange pinPattern : pinPatterns) {
+ if (!pinPattern.matcher(name).matches()) {
+ continue;
+ }
+ Hints.ByteRange dataRange =
+ new Hints.ByteRange(
+ entryDataStart,
+ outCounter.getWrittenBytes());
+ Hints.ByteRange pinRange =
+ pinPattern.ClampToAbsoluteByteRange(dataRange);
+ if (pinRange != null) {
+ pinFileHeader = true;
+ pinByteRanges.add(pinRange);
+ }
+ }
+ if (pinFileHeader) {
+ pinByteRanges.add(new Hints.ByteRange(entryHeaderStart,
+ entryDataStart));
+ }
}
}
@@ -528,6 +537,7 @@
DataSink entryDataSink =
(inspectEntryRequest != null) ? inspectEntryRequest.getDataSink() : null;
+ long entryDataStart = outCounter.getWrittenBytes();
InputStream data = in.getInputStream(inEntry);
while ((num = data.read(buffer)) > 0) {
out.write(buffer, 0, num);
@@ -541,11 +551,27 @@
inspectEntryRequest.done();
}
- if (namesToPin.contains(name)) {
- pinByteRanges.add(
- new Hints.ByteRange(
- entryHeaderStart,
- outCounter.getWrittenBytes()));
+ if (pinPatterns != null) {
+ boolean pinFileHeader = false;
+ for (Hints.PatternWithRange pinPattern : pinPatterns) {
+ if (!pinPattern.matcher(name).matches()) {
+ continue;
+ }
+ Hints.ByteRange dataRange =
+ new Hints.ByteRange(
+ entryDataStart,
+ outCounter.getWrittenBytes());
+ Hints.ByteRange pinRange =
+ pinPattern.ClampToAbsoluteByteRange(dataRange);
+ if (pinRange != null) {
+ pinFileHeader = true;
+ pinByteRanges.add(pinRange);
+ }
+ }
+ if (pinFileHeader) {
+ pinByteRanges.add(new Hints.ByteRange(entryHeaderStart,
+ entryDataStart));
+ }
}
}
@@ -558,7 +584,7 @@
}
}
- private static List<Pattern> extractPinPatterns(JarFile in) throws IOException {
+ private static List<Hints.PatternWithRange> extractPinPatterns(JarFile in) throws IOException {
ZipEntry pinMetaEntry = in.getEntry(Hints.PIN_HINT_ASSET_ZIP_ENTRY_NAME);
if (pinMetaEntry == null) {
return null;