Merge "fix: set built_module in misc_prebuilt_internal.mk"
diff --git a/core/Makefile b/core/Makefile
index dc06051..e9cd51f 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1172,7 +1172,7 @@
.PHONY: notice_files
# Create the rule to combine the files into text and html/xml forms
-# $(1) - xml_excluded_vendor_product|xml_vendor|xml_product|html
+# $(1) - xml_excluded_vendor_product|xml_vendor|xml_product|xml_odm|html
# $(2) - Plain text output file
# $(3) - HTML/XML output file
# $(4) - File title
@@ -1197,11 +1197,12 @@
$(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 system_ext --xml-output, \
+ $(if $(filter $(1),xml_excluded_extra_partitions),-e vendor -e product -e system_ext -e odm --xml-output, \
$(if $(filter $(1),xml_vendor),-i vendor --xml-output, \
$(if $(filter $(1),xml_product),-i product --xml-output, \
$(if $(filter $(1),xml_system_ext),-i system_ext --xml-output, \
- --html-output)))) $(3) \
+ $(if $(filter $(1),xml_odm),-i odm --xml-output, \
+ --html-output))))) $(3) \
-t $$(PRIVATE_MESSAGE) -s $$(PRIVATE_DIR)/src
notice_files: $(2) $(3)
endef
@@ -1254,6 +1255,11 @@
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
+target_odm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.txt
+target_odm_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.xml
+target_odm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.xml.gz
+installed_odm_notice_xml_gz := $(TARGET_OUT_ODM)/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
# install a license file relevant to it.
@@ -1265,7 +1271,11 @@
license_modules_vendor := $(filter $(TARGET_OUT_VENDOR)/%,$(license_modules))
license_modules_product := $(filter $(TARGET_OUT_PRODUCT)/%,$(license_modules))
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_odm := $(filter $(TARGET_OUT_ODM)/%,$(license_modules))
+license_modules_agg := $(license_modules_vendor) \
+ $(license_modules_product) \
+ $(license_modules_system_ext) \
+ $(license_modules_odm)
license_modules_rest := $(filter-out $(license_modules_agg),$(license_modules))
$(eval $(call combine-notice-files, xml_excluded_extra_partitions, \
@@ -1292,6 +1302,12 @@
"Notices for files contained in the system_ext filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_system_ext)))
+$(eval $(call combine-notice-files, xml_odm, \
+ $(target_odm_notice_file_txt), \
+ $(target_odm_notice_file_xml), \
+ "Notices for files contained in the odm filesystem image in this directory:", \
+ $(TARGET_OUT_NOTICE_FILES), \
+ $(license_modules_odm)))
$(target_notice_file_xml_gz): $(target_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
@@ -1301,6 +1317,8 @@
$(hide) $(MINIGZIP) -9 < $< > $@
$(target_system_ext_notice_file_xml_gz): $(target_system_ext_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
+$(target_odm_notice_file_xml_gz): $(target_odm_notice_file_xml) | $(MINIGZIP)
+ $(hide) $(MINIGZIP) -9 < $< > $@
$(installed_notice_html_or_xml_gz): $(target_notice_file_xml_gz)
$(copy-file-to-target)
$(installed_vendor_notice_xml_gz): $(target_vendor_notice_file_xml_gz)
@@ -1309,6 +1327,8 @@
$(copy-file-to-target)
$(installed_system_ext_notice_xml_gz): $(target_system_ext_notice_file_xml_gz)
$(copy-file-to-target)
+$(installed_odm_notice_xml_gz): $(target_odm_notice_file_xml_gz)
+ $(copy-file-to-target)
# if we've been run my mm, mmm, etc, don't reinstall this every time
ifeq ($(ONE_SHOT_MAKEFILE),)
@@ -1316,6 +1336,7 @@
ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_notice_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_product_notice_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_system_ext_notice_xml_gz)
+ ALL_DEFAULT_INSTALLED_MODULES += $(installed_odm_notice_xml_gz)
endif
endif # PRODUCT_NOTICE_SPLIT
@@ -2165,7 +2186,8 @@
$(AVBTOOL) add_hash_footer \
--image $@ \
--partition_size $(BOARD_BOOTIMAGE_PARTITION_SIZE) \
- --partition_name boot $(PRIVATE_AVB_DEBUG_BOOT_SIGNING_ARGS), \
+ --partition_name boot $(PRIVATE_AVB_DEBUG_BOOT_SIGNING_ARGS) \
+ $(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS), \
$(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE)))
.PHONY: bootimage_debug-nodeps
@@ -2177,7 +2199,8 @@
$(AVBTOOL) add_hash_footer \
--image $(INSTALLED_DEBUG_BOOTIMAGE_TARGET) \
--partition_size $(BOARD_BOOTIMAGE_PARTITION_SIZE) \
- --partition_name boot $(PRIVATE_AVB_DEBUG_BOOT_SIGNING_ARGS), \
+ --partition_name boot $(PRIVATE_AVB_DEBUG_BOOT_SIGNING_ARGS) \
+ $(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS), \
$(call assert-max-image-size,$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),$(BOARD_BOOTIMAGE_PARTITION_SIZE)))
endif # TARGET_NO_KERNEL
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index ba76969..9f14aa2 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -33,12 +33,6 @@
TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := mips32r2-fp
endif
-TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_$(combo_2nd_arch_prefix)ARCH)/$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT).mk
-ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
-$(error Unknown MIPS architecture variant: $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
-endif
-
-include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
include $(BUILD_SYSTEM)/combo/fdo.mk
define $(combo_var_prefix)transform-shared-lib-to-toc
diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk
index b498d1f..ae17e46 100644
--- a/core/combo/TARGET_linux-mips64.mk
+++ b/core/combo/TARGET_linux-mips64.mk
@@ -33,12 +33,6 @@
TARGET_ARCH_VARIANT := mips64r6
endif
-TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT).mk
-ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
-$(error Unknown MIPS architecture variant: $(TARGET_ARCH_VARIANT))
-endif
-
-include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
include $(BUILD_SYSTEM)/combo/fdo.mk
define $(combo_var_prefix)transform-shared-lib-to-toc
diff --git a/core/combo/arch/arm/armv7-a-neon.mk b/core/combo/arch/arm/armv7-a-neon.mk
index 01d2235..0c01ac3 100644
--- a/core/combo/arch/arm/armv7-a-neon.mk
+++ b/core/combo/arch/arm/armv7-a-neon.mk
@@ -1,7 +1,6 @@
# Configuration for Linux on ARM.
# Generating binaries for the ARMv7-a architecture and higher with NEON
#
-ARCH_ARM_HAVE_ARMV7A := true
ARCH_ARM_HAVE_VFP := true
ARCH_ARM_HAVE_VFP_D32 := true
ARCH_ARM_HAVE_NEON := true
diff --git a/core/combo/arch/arm/armv8-2a.mk b/core/combo/arch/arm/armv8-2a.mk
index c1d8182..7e2ca18 100644
--- a/core/combo/arch/arm/armv8-2a.mk
+++ b/core/combo/arch/arm/armv8-2a.mk
@@ -3,7 +3,6 @@
#
# Many libraries are not aware of armv8-2a, and AArch32 is (almost) a superset
# of armv7-a-neon. So just let them think we are just like v7.
-ARCH_ARM_HAVE_ARMV7A := true
ARCH_ARM_HAVE_VFP := true
ARCH_ARM_HAVE_VFP_D32 := true
ARCH_ARM_HAVE_NEON := true
diff --git a/core/combo/arch/arm/armv8-a.mk b/core/combo/arch/arm/armv8-a.mk
index 9ef5c49..19bc014 100644
--- a/core/combo/arch/arm/armv8-a.mk
+++ b/core/combo/arch/arm/armv8-a.mk
@@ -3,7 +3,6 @@
#
# Many libraries are not aware of armv8-a, and AArch32 is (almost) a superset
# of armv7-a-neon. So just let them think we are just like v7.
-ARCH_ARM_HAVE_ARMV7A := true
ARCH_ARM_HAVE_VFP := true
ARCH_ARM_HAVE_VFP_D32 := true
ARCH_ARM_HAVE_NEON := true
diff --git a/core/combo/arch/mips/mips32-fp.mk b/core/combo/arch/mips/mips32-fp.mk
deleted file mode 100644
index 4b09bc1..0000000
--- a/core/combo/arch/mips/mips32-fp.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32/hard-float/little-endian
-
-ARCH_MIPS_HAS_FPU :=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r2-fp-xburst.mk b/core/combo/arch/mips/mips32r2-fp-xburst.mk
deleted file mode 100644
index 83fb12e..0000000
--- a/core/combo/arch/mips/mips32r2-fp-xburst.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-# Configuration for Android on Ingenic xb4780/Xburst MIPS CPU.
-# Generating binaries for MIPS32R2/hard-float/little-endian without
-# support for the Madd family of instructions.
-
-ARCH_MIPS_HAS_FPU :=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r2-fp.mk b/core/combo/arch/mips/mips32r2-fp.mk
deleted file mode 100644
index 97c14c3..0000000
--- a/core/combo/arch/mips/mips32r2-fp.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R2/hard-float/little-endian
-
-ARCH_MIPS_HAS_FPU :=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r2dsp-fp.mk b/core/combo/arch/mips/mips32r2dsp-fp.mk
deleted file mode 100644
index 522b6b9..0000000
--- a/core/combo/arch/mips/mips32r2dsp-fp.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R2/hard-float/little-endian/dsp
-
-ARCH_MIPS_HAS_DSP :=true
-ARCH_MIPS_DSP_REV :=1
-ARCH_MIPS_HAS_FPU :=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r2dspr2-fp.mk b/core/combo/arch/mips/mips32r2dspr2-fp.mk
deleted file mode 100644
index 886d378..0000000
--- a/core/combo/arch/mips/mips32r2dspr2-fp.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R2/hard-float/little-endian/dsp
-
-ARCH_MIPS_HAS_DSP :=true
-ARCH_MIPS_DSP_REV :=2
-ARCH_MIPS_HAS_FPU :=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips/mips32r6.mk b/core/combo/arch/mips/mips32r6.mk
deleted file mode 100644
index 7bc6cac..0000000
--- a/core/combo/arch/mips/mips32r6.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R6/hard-float/little-endian
-
-ARCH_MIPS_REV6 := true
diff --git a/core/combo/arch/mips64/mips64r2.mk b/core/combo/arch/mips64/mips64r2.mk
deleted file mode 100644
index 54aa387..0000000
--- a/core/combo/arch/mips64/mips64r2.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-# Configuration for Android on mips64r2.
-
-# This target is for temporary use only, until mips64r6 is supported by Android's qemu.
-
-ARCH_MIPS_HAS_FPU :=true
-ARCH_HAVE_ALIGNED_DOUBLES :=true
diff --git a/core/combo/arch/mips64/mips64r6.mk b/core/combo/arch/mips64/mips64r6.mk
deleted file mode 100644
index 42d6c9e..0000000
--- a/core/combo/arch/mips64/mips64r6.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# Configuration for Android on mips64r6.
-
-ARCH_MIPS64_REV6 := true
diff --git a/core/combo/arch/x86/amberlake.mk b/core/combo/arch/x86/amberlake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86/amberlake.mk
+++ b/core/combo/arch/x86/amberlake.mk
@@ -3,11 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86/atom.mk b/core/combo/arch/x86/atom.mk
index 43a170c..bae7946 100644
--- a/core/combo/arch/x86/atom.mk
+++ b/core/combo/arch/x86/atom.mk
@@ -4,6 +4,3 @@
#
# See build/make/core/combo/arch/x86/x86.mk for differences.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_MOVBE := true
-ARCH_X86_HAVE_POPCNT := false # popcnt is not supported by current Atom CPUs
diff --git a/core/combo/arch/x86/broadwell.mk b/core/combo/arch/x86/broadwell.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86/broadwell.mk
+++ b/core/combo/arch/x86/broadwell.mk
@@ -3,11 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86/haswell.mk b/core/combo/arch/x86/haswell.mk
index 50c27b4..ffa3bac 100644
--- a/core/combo/arch/x86/haswell.mk
+++ b/core/combo/arch/x86/haswell.mk
@@ -1,11 +1,4 @@
# Configuration for Linux on x86.
# Generating binaries for Haswell processors.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86/icelake.mk b/core/combo/arch/x86/icelake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86/icelake.mk
+++ b/core/combo/arch/x86/icelake.mk
@@ -3,12 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86/ivybridge.mk b/core/combo/arch/x86/ivybridge.mk
index 44035d8..a1358e6 100644
--- a/core/combo/arch/x86/ivybridge.mk
+++ b/core/combo/arch/x86/ivybridge.mk
@@ -1,11 +1,4 @@
# Configuration for Linux on x86.
# Generating binaries for Ivy Bridge processors.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := false
diff --git a/core/combo/arch/x86/kabylake.mk b/core/combo/arch/x86/kabylake.mk
index 50518d6..9906259 100644
--- a/core/combo/arch/x86/kabylake.mk
+++ b/core/combo/arch/x86/kabylake.mk
@@ -3,11 +3,4 @@
# that support AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86/sandybridge.mk b/core/combo/arch/x86/sandybridge.mk
index a4c1bd9..d6552ab 100644
--- a/core/combo/arch/x86/sandybridge.mk
+++ b/core/combo/arch/x86/sandybridge.mk
@@ -1,11 +1,4 @@
# Configuration for Linux on x86.
# Generating binaries for SandyBridge processors.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := false
-ARCH_X86_HAVE_AVX := false
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := false
diff --git a/core/combo/arch/x86/silvermont.mk b/core/combo/arch/x86/silvermont.mk
index cba1079..8ac2b98 100644
--- a/core/combo/arch/x86/silvermont.mk
+++ b/core/combo/arch/x86/silvermont.mk
@@ -4,10 +4,4 @@
# See build/make/core/combo/arch/x86/x86-atom.mk for differences.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86/skylake.mk b/core/combo/arch/x86/skylake.mk
index 03705c0..9906259 100644
--- a/core/combo/arch/x86/skylake.mk
+++ b/core/combo/arch/x86/skylake.mk
@@ -3,13 +3,4 @@
# that support AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
-
diff --git a/core/combo/arch/x86/stoneyridge.mk b/core/combo/arch/x86/stoneyridge.mk
index 30405a1..05ff77a 100644
--- a/core/combo/arch/x86/stoneyridge.mk
+++ b/core/combo/arch/x86/stoneyridge.mk
@@ -1,12 +1,4 @@
# Configuration for Linux on x86.
# Generating binaries for Stoney Ridge processors.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86/tigerlake.mk b/core/combo/arch/x86/tigerlake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86/tigerlake.mk
+++ b/core/combo/arch/x86/tigerlake.mk
@@ -3,12 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86/whiskeylake.mk b/core/combo/arch/x86/whiskeylake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86/whiskeylake.mk
+++ b/core/combo/arch/x86/whiskeylake.mk
@@ -3,11 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86/x86.mk b/core/combo/arch/x86/x86.mk
index db55ff8..066f66a 100644
--- a/core/combo/arch/x86/x86.mk
+++ b/core/combo/arch/x86/x86.mk
@@ -8,9 +8,3 @@
# These features are optional and shall not be included in the base platform
# Otherwise, sdk_x86-eng system images might fail to run on some
# developer machines.
-ARCH_X86_HAVE_SSSE3 := false
-ARCH_X86_HAVE_MOVBE := false
-ARCH_X86_HAVE_POPCNT := false
-ARCH_X86_HAVE_AVX := false
-ARCH_X86_HAVE_AVX2 := false
-ARCH_X86_HAVE_AVX512 := false
diff --git a/core/combo/arch/x86/x86_64.mk b/core/combo/arch/x86/x86_64.mk
index fc2a087..eff406b 100644
--- a/core/combo/arch/x86/x86_64.mk
+++ b/core/combo/arch/x86/x86_64.mk
@@ -4,9 +4,4 @@
# The generic 'x86' variant cannot be used, since it resets some flags used
# by the 'x86_64' variant.
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_MOVBE := false # Only supported on Atom.
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
diff --git a/core/combo/arch/x86_64/amberlake.mk b/core/combo/arch/x86_64/amberlake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86_64/amberlake.mk
+++ b/core/combo/arch/x86_64/amberlake.mk
@@ -3,11 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/broadwell.mk b/core/combo/arch/x86_64/broadwell.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86_64/broadwell.mk
+++ b/core/combo/arch/x86_64/broadwell.mk
@@ -3,11 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/haswell.mk b/core/combo/arch/x86_64/haswell.mk
index f9c6ebd..faf12fa 100644
--- a/core/combo/arch/x86_64/haswell.mk
+++ b/core/combo/arch/x86_64/haswell.mk
@@ -1,11 +1,4 @@
# Configuration for Linux on x86_64.
# Generating binaries for Haswell processors.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/icelake.mk b/core/combo/arch/x86_64/icelake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86_64/icelake.mk
+++ b/core/combo/arch/x86_64/icelake.mk
@@ -3,12 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/ivybridge.mk b/core/combo/arch/x86_64/ivybridge.mk
index 69011d6..464fa98 100644
--- a/core/combo/arch/x86_64/ivybridge.mk
+++ b/core/combo/arch/x86_64/ivybridge.mk
@@ -1,11 +1,4 @@
# Configuration for Linux on x86_64.
# Generating binaries for Ivy Bridge processors.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := false
diff --git a/core/combo/arch/x86_64/kabylake.mk b/core/combo/arch/x86_64/kabylake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86_64/kabylake.mk
+++ b/core/combo/arch/x86_64/kabylake.mk
@@ -3,11 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/sandybridge.mk b/core/combo/arch/x86_64/sandybridge.mk
index 2092d19..a09db2a 100644
--- a/core/combo/arch/x86_64/sandybridge.mk
+++ b/core/combo/arch/x86_64/sandybridge.mk
@@ -1,11 +1,4 @@
# Configuration for Linux on x86_64.
# Generating binaries for SandyBridge processors.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := false
-ARCH_X86_HAVE_AVX := false
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := false
diff --git a/core/combo/arch/x86_64/silvermont.mk b/core/combo/arch/x86_64/silvermont.mk
index cba1079..8ac2b98 100644
--- a/core/combo/arch/x86_64/silvermont.mk
+++ b/core/combo/arch/x86_64/silvermont.mk
@@ -4,10 +4,4 @@
# See build/make/core/combo/arch/x86/x86-atom.mk for differences.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/skylake.mk b/core/combo/arch/x86_64/skylake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86_64/skylake.mk
+++ b/core/combo/arch/x86_64/skylake.mk
@@ -3,12 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/stoneyridge.mk b/core/combo/arch/x86_64/stoneyridge.mk
index f7d9583..5950d9a 100644
--- a/core/combo/arch/x86_64/stoneyridge.mk
+++ b/core/combo/arch/x86_64/stoneyridge.mk
@@ -1,12 +1,4 @@
# Configuration for Linux on x86_64.
# Generating binaries for Stoney Ridge processors.
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AES_NI := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/tigerlake.mk b/core/combo/arch/x86_64/tigerlake.mk
index 76fe212..a7ae6ed 100644
--- a/core/combo/arch/x86_64/tigerlake.mk
+++ b/core/combo/arch/x86_64/tigerlake.mk
@@ -3,12 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_AVX512 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/whiskeylake.mk b/core/combo/arch/x86_64/whiskeylake.mk
index 37100a4..a7ae6ed 100644
--- a/core/combo/arch/x86_64/whiskeylake.mk
+++ b/core/combo/arch/x86_64/whiskeylake.mk
@@ -3,11 +3,4 @@
# that have AVX2 feature flag
#
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := true
-ARCH_X86_HAVE_AVX2 := true
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_MOVBE := true
diff --git a/core/combo/arch/x86_64/x86_64.mk b/core/combo/arch/x86_64/x86_64.mk
index e7c8928..17413c7 100755
--- a/core/combo/arch/x86_64/x86_64.mk
+++ b/core/combo/arch/x86_64/x86_64.mk
@@ -5,12 +5,4 @@
# that are run in the emulator under KVM emulation (i.e. running directly on
# the host development machine's CPU).
-ARCH_X86_HAVE_SSSE3 := true
-ARCH_X86_HAVE_MOVBE := false # Only supported on Atom.
-ARCH_X86_HAVE_POPCNT := true
-ARCH_X86_HAVE_SSE4 := true
ARCH_X86_HAVE_SSE4_1 := true
-ARCH_X86_HAVE_SSE4_2 := true
-ARCH_X86_HAVE_AVX := false
-ARCH_X86_HAVE_AVX2 := false
-ARCH_X86_HAVE_AVX512 := false
diff --git a/core/config.mk b/core/config.mk
index 730e029..a6a76cb 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -101,6 +101,23 @@
$(KATI_obsolete_export It is a global setting. See $(CHANGES_URL)#export_keyword)
$(KATI_obsolete_var BUILD_BROKEN_ANDROIDMK_EXPORTS)
$(KATI_obsolete_var PRODUCT_STATIC_BOOT_CONTROL_HAL,Use shared library module instead. See $(CHANGES_URL)#PRODUCT_STATIC_BOOT_CONTROL_HAL)
+$(KATI_obsolete_var \
+ ARCH_ARM_HAVE_ARMV7A \
+ ARCH_DSP_REV \
+ ARCH_HAVE_ALIGNED_DOUBLES \
+ ARCH_MIPS_HAS_DSP \
+ ARCH_MIPS_HAS_FPU \
+ ARCH_MIPS_REV6 \
+ ARCH_X86_HAVE_AES_NI \
+ ARCH_X86_HAVE_AVX \
+ ARCH_X86_HAVE_AVX2 \
+ ARCH_X86_HAVE_AVX512 \
+ ARCH_X86_HAVE_MOVBE \
+ ARCH_X86_HAVE_POPCNT \
+ ARCH_X86_HAVE_SSE4 \
+ ARCH_X86_HAVE_SSE4_2 \
+ ARCH_X86_HAVE_SSSE3 \
+)
# Used to force goals to build. Only use for conditionally defined goals.
.PHONY: FORCE
@@ -312,6 +329,7 @@
ifeq ($(CALLED_FROM_SETUP),true)
include $(BUILD_SYSTEM)/ccache.mk
include $(BUILD_SYSTEM)/goma.mk
+include $(BUILD_SYSTEM)/rbe.mk
endif
ifdef TARGET_PREFER_32_BIT
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index 7a9f23e..2439f79 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -345,9 +345,6 @@
my_shared_libraries := $($(LOCAL_2ND_ARCH_VAR_PREFIX)ADDRESS_SANITIZER_RUNTIME_LIBRARY) \
$(my_shared_libraries)
endif
- ifeq (,$(filter $(LOCAL_MODULE),$(ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES)))
- my_static_libraries += $(ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES)
- endif
# Do not add unnecessary dependency in shared libraries.
ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
diff --git a/core/definitions.mk b/core/definitions.mk
index 0e0da9e..e44f51d 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2444,8 +2444,16 @@
$(1) \
$(HOST_INIT_VERIFIER) \
$(HIDL_INHERITANCE_HIERARCHY) \
- $(call intermediates-dir-for,ETC,passwd)/passwd
- $(hide) $(HOST_INIT_VERIFIER) -p $(call intermediates-dir-for,ETC,passwd)/passwd -i $(HIDL_INHERITANCE_HIERARCHY) $$<
+ $(call intermediates-dir-for,ETC,passwd_system)/passwd_system \
+ $(call intermediates-dir-for,ETC,passwd_vendor)/passwd_vendor \
+ $(call intermediates-dir-for,ETC,passwd_odm)/passwd_odm \
+ $(call intermediates-dir-for,ETC,passwd_product)/passwd_product
+ $(hide) $(HOST_INIT_VERIFIER) \
+ -p $(call intermediates-dir-for,ETC,passwd_system)/passwd_system \
+ -p $(call intermediates-dir-for,ETC,passwd_vendor)/passwd_vendor \
+ -p $(call intermediates-dir-for,ETC,passwd_odm)/passwd_odm \
+ -p $(call intermediates-dir-for,ETC,passwd_product)/passwd_product \
+ -i $(HIDL_INHERITANCE_HIERARCHY) $$<
else
$(2): $(1)
endif
diff --git a/core/main.mk b/core/main.mk
index ff670dc..b7b6cd0 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1244,6 +1244,7 @@
libnativebridge.so \
libnativehelper.so \
libnativeloader.so \
+ libneuralnetworks.so \
libnpt.so \
libopenjdk.so \
libopenjdkjvm.so \
diff --git a/core/rbe.mk b/core/rbe.mk
new file mode 100644
index 0000000..766b121
--- /dev/null
+++ b/core/rbe.mk
@@ -0,0 +1,32 @@
+#
+# 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.
+#
+
+# Notice: this works only with Google's RBE service.
+ifneq ($(filter-out false,$(USE_RBE)),)
+ ifdef RBE_DIR
+ rbe_dir := $(RBE_DIR)
+ else
+ rbe_dir := $(HOME)/rbe
+ endif
+ RBE_WRAPPER := $(rbe_dir)/rewrapper
+
+ # Append rewrapper to existing *_WRAPPER variables so it's possible to
+ # use both ccache and rewrapper.
+ CC_WRAPPER := $(strip $(CC_WRAPPER) $(RBE_WRAPPER))
+ CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(RBE_WRAPPER))
+
+ rbe_dir :=
+endif
diff --git a/core/soong_config.mk b/core/soong_config.mk
index eebe843..3e60a83 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -152,6 +152,7 @@
$(call add_json_bool, MinimizeJavaDebugInfo, $(filter true,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO)))
$(call add_json_bool, UseGoma, $(filter-out false,$(USE_GOMA)))
+$(call add_json_bool, UseRBE, $(filter-out false,$(USE_RBE)))
$(call add_json_bool, Arc, $(filter true,$(TARGET_ARC)))
$(call add_json_list, NamespacesToExport, $(PRODUCT_SOONG_NAMESPACES))
diff --git a/target/product/base_product.mk b/target/product/base_product.mk
index 82557bf..749d2c2 100644
--- a/target/product/base_product.mk
+++ b/target/product/base_product.mk
@@ -16,7 +16,9 @@
# Base modules and settings for the product partition.
PRODUCT_PACKAGES += \
+ group_product \
healthd \
ModuleMetadata \
+ passwd_product \
product_compatibility_matrix.xml \
product_manifest.xml \
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 162fbed..c256641 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -19,6 +19,9 @@
abb \
adbd \
am \
+ android.hardware.neuralnetworks@1.0 \
+ android.hardware.neuralnetworks@1.1 \
+ android.hardware.neuralnetworks@1.2 \
android.hidl.allocator@1.0-service \
android.hidl.base-V1.0-java \
android.hidl.manager-V1.0-java \
@@ -53,6 +56,7 @@
com.android.conscrypt \
com.android.location.provider \
com.android.resolv \
+ com.android.neuralnetworks \
com.android.tzdata \
ContactsProvider \
content \
@@ -77,6 +81,7 @@
fsck_msdos \
fs_config_files_system \
fs_config_dirs_system \
+ group_system \
gsid \
heapprofd \
heapprofd_client \
@@ -153,7 +158,6 @@
libnetd_client \
libnetlink \
libnetutils \
- libneuralnetworks \
libOpenMAXAL \
libOpenSLES \
libpdfium \
@@ -210,6 +214,7 @@
NetworkStack \
org.apache.http.legacy \
otacerts \
+ passwd_system \
perfetto \
ping \
ping6 \
@@ -222,6 +227,7 @@
resize2fs \
rss_hwm_reset \
run-as \
+ sanitizer.libraries.txt \
schedtest \
screencap \
sdcard \
@@ -259,6 +265,8 @@
viewcompiler \
voip-common \
vold \
+ vndkcore.libraries.txt \
+ vndkprivate.libraries.txt \
WallpaperBackup \
watchdogd \
wificond \
diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk
index bb39cd9..4233c1c 100644
--- a/target/product/base_vendor.mk
+++ b/target/product/base_vendor.mk
@@ -47,7 +47,8 @@
fs_config_files_nonsystem \
fs_config_dirs_nonsystem \
gralloc.default \
- group \
+ group_odm \
+ group_vendor \
init_vendor \
libashmemd_hidl_client \
libbundlewrapper \
@@ -62,7 +63,8 @@
libreverbwrapper \
libril \
libvisualizer \
- passwd \
+ passwd_odm \
+ passwd_vendor \
selinux_policy_nonsystem \
shell_and_utilities_vendor \
vndservice \
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
index 5693234..1ef124b 100644
--- a/target/product/gsi/Android.mk
+++ b/target/product/gsi/Android.mk
@@ -38,6 +38,7 @@
droidcore: check-vndk-list
check-vndk-list-timestamp := $(call intermediates-dir-for,PACKAGING,vndk)/check-list-timestamp
+check-vndk-abi-dump-list-timestamp := $(call intermediates-dir-for,PACKAGING,vndk)/check-abi-dump-list-timestamp
ifeq ($(TARGET_IS_64_BIT)|$(TARGET_2ND_ARCH),true|)
# TODO(b/110429754) remove this condition when we support 64-bit-only device
@@ -50,6 +51,9 @@
check-vndk-list: ;
else
check-vndk-list: $(check-vndk-list-timestamp)
+ifneq ($(SKIP_ABI_CHECKS),true)
+check-vndk-list: $(check-vndk-abi-dump-list-timestamp)
+endif
endif
_vndk_check_failure_message := " error: VNDK library list has been changed.\n"
@@ -97,12 +101,51 @@
endif
@chmod a+x $@
+#####################################################################
+# Check that all ABI reference dumps have corresponding NDK/VNDK
+# libraries.
+
+# $(1): The directory containing ABI dumps.
+# Return a list of ABI dump paths ending with .so.lsdump.
+define find-abi-dump-paths
+$(if $(wildcard $(1)), \
+ $(addprefix $(1)/, \
+ $(call find-files-in-subdirs,$(1),"*.so.lsdump" -and -type f,.)))
+endef
+
+VNDK_ABI_DUMP_DIR := prebuilts/abi-dumps/vndk/$(PLATFORM_VNDK_VERSION)
+NDK_ABI_DUMP_DIR := prebuilts/abi-dumps/ndk/$(PLATFORM_VNDK_VERSION)
+VNDK_ABI_DUMPS := $(call find-abi-dump-paths,$(VNDK_ABI_DUMP_DIR))
+NDK_ABI_DUMPS := $(call find-abi-dump-paths,$(NDK_ABI_DUMP_DIR))
+
+$(check-vndk-abi-dump-list-timestamp): $(VNDK_ABI_DUMPS) $(NDK_ABI_DUMPS)
+ $(eval added_vndk_abi_dumps := $(strip $(sort $(filter-out \
+ $(addsuffix .so.lsdump,$(VNDK_SAMEPROCESS_LIBRARIES) $(VNDK_CORE_LIBRARIES)), \
+ $(notdir $(VNDK_ABI_DUMPS))))))
+ $(if $(added_vndk_abi_dumps), \
+ echo -e "Found ABI reference dumps for non-VNDK libraries. Run \`find \$${ANDROID_BUILD_TOP}/$(VNDK_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_vndk_abi_dumps)) ')' -delete\` to delete the dumps.")
+
+ $(eval added_ndk_abi_dumps := $(strip $(sort $(filter-out \
+ $(addsuffix .so.lsdump,$(NDK_MIGRATED_LIBS) $(LLNDK_LIBRARIES)), \
+ $(notdir $(NDK_ABI_DUMPS))))))
+ $(if $(added_ndk_abi_dumps), \
+ echo -e "Found ABI reference dumps for non-NDK libraries. Run \`find \$${ANDROID_BUILD_TOP}/$(NDK_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_ndk_abi_dumps)) ')' -delete\` to delete the dumps.")
+
+ $(if $(added_vndk_abi_dumps)$(added_ndk_abi_dumps),exit 1)
+ $(hide) mkdir -p $(dir $@)
+ $(hide) touch $@
+
+#####################################################################
+# VNDK package and snapshot.
+
ifneq ($(BOARD_VNDK_VERSION),)
include $(CLEAR_VARS)
LOCAL_MODULE := vndk_package
+# Filter LLNDK libs moved to APEX to avoid pulling them into /system/LIB
LOCAL_REQUIRED_MODULES := \
- $(LLNDK_LIBRARIES)
+ $(filter-out $(LLNDK_MOVED_TO_APEX_LIBRARIES),$(LLNDK_LIBRARIES)))
+
ifneq ($(TARGET_SKIP_CURRENT_VNDK),true)
LOCAL_REQUIRED_MODULES += \
llndk.libraries.txt \
diff --git a/target/product/gsi/current.txt b/target/product/gsi/current.txt
index e936d45..d954e9f 100644
--- a/target/product/gsi/current.txt
+++ b/target/product/gsi/current.txt
@@ -4,6 +4,7 @@
LLNDK: libGLESv3.so
LLNDK: libRS.so
LLNDK: libandroid_net.so
+LLNDK: libbinder_ndk.so
LLNDK: libc.so
LLNDK: libcgrouprc.so
LLNDK: libdl.so
@@ -194,7 +195,6 @@
VNDK-core: libgui.so
VNDK-core: libhardware_legacy.so
VNDK-core: libhidlallocatorutils.so
-VNDK-core: libhidlcache.so
VNDK-core: libjpeg.so
VNDK-core: libkeymaster_messages.so
VNDK-core: libkeymaster_portable.so
diff --git a/tools/fs_config/Android.bp b/tools/fs_config/Android.bp
index d9a48d7..8c69417 100644
--- a/tools/fs_config/Android.bp
+++ b/tools/fs_config/Android.bp
@@ -20,7 +20,7 @@
"soong-genrule",
],
srcs: [
- "fs_config.go"
+ "fs_config.go",
],
pluginFor: ["soong_build"],
}
@@ -56,13 +56,13 @@
export_generated_headers: ["oemaids_header_gen"],
}
-// Generate the vendor/etc/passwd text file for the target
-// This file may be empty if no AIDs are defined in
+// Generate the */etc/passwd text files for the target
+// These files may be empty if no AIDs are defined in
// TARGET_FS_CONFIG_GEN files.
genrule {
- name: "passwd_gen",
+ name: "passwd_gen_system",
tool_files: ["fs_config_generator.py"],
- cmd: "$(location fs_config_generator.py) passwd --required-prefix=vendor_ --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ cmd: "$(location fs_config_generator.py) passwd --partition=system --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
srcs: [
":target_fs_config_gen",
":android_filesystem_config_header",
@@ -71,18 +71,90 @@
}
prebuilt_etc {
- name: "passwd",
- vendor: true,
- src: ":passwd_gen",
+ name: "passwd_system",
+ filename: "passwd",
+ src: ":passwd_gen_system",
}
-// Generate the vendor/etc/group text file for the target
-// This file may be empty if no AIDs are defined in
+genrule {
+ name: "passwd_gen_vendor",
+ tool_files: ["fs_config_generator.py"],
+ cmd: "$(location fs_config_generator.py) passwd --partition=vendor --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ srcs: [
+ ":target_fs_config_gen",
+ ":android_filesystem_config_header",
+ ],
+ out: ["passwd"],
+}
+
+prebuilt_etc {
+ name: "passwd_vendor",
+ filename: "passwd",
+ vendor: true,
+ src: ":passwd_gen_vendor",
+}
+
+genrule {
+ name: "passwd_gen_odm",
+ tool_files: ["fs_config_generator.py"],
+ cmd: "$(location fs_config_generator.py) passwd --partition=odm --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ srcs: [
+ ":target_fs_config_gen",
+ ":android_filesystem_config_header",
+ ],
+ out: ["passwd"],
+}
+
+prebuilt_etc {
+ name: "passwd_odm",
+ filename: "passwd",
+ device_specific: true,
+ src: ":passwd_gen_odm",
+}
+
+genrule {
+ name: "passwd_gen_product",
+ tool_files: ["fs_config_generator.py"],
+ cmd: "$(location fs_config_generator.py) passwd --partition=product --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ srcs: [
+ ":target_fs_config_gen",
+ ":android_filesystem_config_header",
+ ],
+ out: ["passwd"],
+}
+
+prebuilt_etc {
+ name: "passwd_product",
+ filename: "passwd",
+ product_specific: true,
+ src: ":passwd_gen_product",
+}
+
+genrule {
+ name: "passwd_gen_system_ext",
+ tool_files: ["fs_config_generator.py"],
+ cmd: "$(location fs_config_generator.py) passwd --partition=system_ext --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ srcs: [
+ ":target_fs_config_gen",
+ ":android_filesystem_config_header",
+ ],
+ out: ["passwd"],
+}
+
+prebuilt_etc {
+ name: "passwd_system_ext",
+ filename: "passwd",
+ system_ext_specific: true,
+ src: ":passwd_gen_system_ext",
+}
+
+// Generate the */etc/group text files for the target
+// These files may be empty if no AIDs are defined in
// TARGET_FS_CONFIG_GEN files.
genrule {
- name: "group_gen",
+ name: "group_gen_system",
tool_files: ["fs_config_generator.py"],
- cmd: "$(location fs_config_generator.py) group --required-prefix=vendor_ --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ cmd: "$(location fs_config_generator.py) group --partition=system --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
srcs: [
":target_fs_config_gen",
":android_filesystem_config_header",
@@ -91,7 +163,79 @@
}
prebuilt_etc {
- name: "group",
+ name: "group_system",
+ filename: "group",
+ src: ":group_gen_system",
+}
+
+genrule {
+ name: "group_gen_vendor",
+ tool_files: ["fs_config_generator.py"],
+ cmd: "$(location fs_config_generator.py) group --partition=vendor --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ srcs: [
+ ":target_fs_config_gen",
+ ":android_filesystem_config_header",
+ ],
+ out: ["group"],
+}
+
+prebuilt_etc {
+ name: "group_vendor",
+ filename: "group",
vendor: true,
- src: ":group_gen",
+ src: ":group_gen_vendor",
+}
+
+genrule {
+ name: "group_gen_odm",
+ tool_files: ["fs_config_generator.py"],
+ cmd: "$(location fs_config_generator.py) group --partition=odm --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ srcs: [
+ ":target_fs_config_gen",
+ ":android_filesystem_config_header",
+ ],
+ out: ["group"],
+}
+
+prebuilt_etc {
+ name: "group_odm",
+ filename: "group",
+ device_specific: true,
+ src: ":group_gen_odm",
+}
+
+genrule {
+ name: "group_gen_product",
+ tool_files: ["fs_config_generator.py"],
+ cmd: "$(location fs_config_generator.py) group --partition=product --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ srcs: [
+ ":target_fs_config_gen",
+ ":android_filesystem_config_header",
+ ],
+ out: ["group"],
+}
+
+prebuilt_etc {
+ name: "group_product",
+ filename: "group",
+ product_specific: true,
+ src: ":group_gen_product",
+}
+
+genrule {
+ name: "group_gen_system_ext",
+ tool_files: ["fs_config_generator.py"],
+ cmd: "$(location fs_config_generator.py) group --partition=system_ext --aid-header=$(location :android_filesystem_config_header) $(locations :target_fs_config_gen) >$(out)",
+ srcs: [
+ ":target_fs_config_gen",
+ ":android_filesystem_config_header",
+ ],
+ out: ["group"],
+}
+
+prebuilt_etc {
+ name: "group_system_ext",
+ filename: "group",
+ system_ext_specific: true,
+ src: ":group_gen_system_ext",
}
diff --git a/tools/fs_config/fs_config_generator.py b/tools/fs_config/fs_config_generator.py
index 4400466..e1aafc9 100755
--- a/tools/fs_config/fs_config_generator.py
+++ b/tools/fs_config/fs_config_generator.py
@@ -312,13 +312,12 @@
re.compile(r'%sUSER' % AID.PREFIX)
]
_AID_DEFINE = re.compile(r'\s*#define\s+%s.*' % AID.PREFIX)
- _OEM_START_KW = 'START'
- _OEM_END_KW = 'END'
- _OEM_RANGE = re.compile('%sOEM_RESERVED_[0-9]*_{0,1}(%s|%s)' %
- (AID.PREFIX, _OEM_START_KW, _OEM_END_KW))
+ _RESERVED_RANGE = re.compile(
+ r'#define AID_(.+)_RESERVED_\d*_*(START|END)\s+(\d+)')
+
# AID lines cannot end with _START or _END, ie AID_FOO is OK
# but AID_FOO_START is skiped. Note that AID_FOOSTART is NOT skipped.
- _AID_SKIP_RANGE = ['_' + _OEM_START_KW, '_' + _OEM_END_KW]
+ _AID_SKIP_RANGE = ['_START', '_END']
_COLLISION_OK = ['AID_APP', 'AID_APP_START', 'AID_USER', 'AID_USER_OFFSET']
def __init__(self, aid_header):
@@ -330,7 +329,7 @@
self._aid_header = aid_header
self._aid_name_to_value = {}
self._aid_value_to_name = {}
- self._oem_ranges = {}
+ self._ranges = {}
with open(aid_header) as open_file:
self._parse(open_file)
@@ -355,6 +354,23 @@
return 'Error "{}" in file: "{}" on line: {}'.format(
msg, self._aid_header, str(lineno))
+ range_match = self._RESERVED_RANGE.match(line)
+ if range_match:
+ partition = range_match.group(1).lower()
+ value = int(range_match.group(3), 0)
+
+ if partition == 'oem':
+ partition = 'vendor'
+
+ if partition in self._ranges:
+ if isinstance(self._ranges[partition][-1], int):
+ self._ranges[partition][-1] = (
+ self._ranges[partition][-1], value)
+ else:
+ self._ranges[partition].append(value)
+ else:
+ self._ranges[partition] = [value]
+
if AIDHeaderParser._AID_DEFINE.match(line):
chunks = line.split()
identifier = chunks[1]
@@ -366,9 +382,7 @@
continue
try:
- if AIDHeaderParser._is_oem_range(identifier):
- self._handle_oem_range(identifier, value)
- elif not any(
+ if not any(
identifier.endswith(x)
for x in AIDHeaderParser._AID_SKIP_RANGE):
self._handle_aid(identifier, value)
@@ -404,67 +418,6 @@
self._aid_name_to_value[aid.friendly] = aid
self._aid_value_to_name[value] = aid.friendly
- def _handle_oem_range(self, identifier, value):
- """Handle an OEM range C #define.
-
- When encountering special AID defines, notably for the OEM ranges
- this method handles sanity checking and adding them to the internal
- maps. For internal use only.
-
- Args:
- identifier (str): The name of the #define identifier.
- ie AID_OEM_RESERVED_START/END.
- value (str): The value associated with the identifier.
-
- Raises:
- ValueError: With message set to indicate the error.
- """
-
- try:
- int_value = int(value, 0)
- except ValueError:
- raise ValueError(
- 'Could not convert "%s" to integer value, got: "%s"' %
- (identifier, value))
-
- # convert AID_OEM_RESERVED_START or AID_OEM_RESERVED_<num>_START
- # to AID_OEM_RESERVED or AID_OEM_RESERVED_<num>
- is_start = identifier.endswith(AIDHeaderParser._OEM_START_KW)
-
- if is_start:
- tostrip = len(AIDHeaderParser._OEM_START_KW)
- else:
- tostrip = len(AIDHeaderParser._OEM_END_KW)
-
- # ending _
- tostrip = tostrip + 1
-
- strip = identifier[:-tostrip]
- if strip not in self._oem_ranges:
- self._oem_ranges[strip] = []
-
- if len(self._oem_ranges[strip]) > 2:
- raise ValueError('Too many same OEM Ranges "%s"' % identifier)
-
- if len(self._oem_ranges[strip]) == 1:
- tmp = self._oem_ranges[strip][0]
-
- if tmp == int_value:
- raise ValueError('START and END values equal %u' % int_value)
- elif is_start and tmp < int_value:
- raise ValueError(
- 'END value %u less than START value %u' % (tmp, int_value))
- elif not is_start and tmp > int_value:
- raise ValueError(
- 'END value %u less than START value %u' % (int_value, tmp))
-
- # Add START values to the head of the list and END values at the end.
- # Thus, the list is ordered with index 0 as START and index 1 as END.
- if is_start:
- self._oem_ranges[strip].insert(0, int_value)
- else:
- self._oem_ranges[strip].append(int_value)
-
def _process_and_check(self):
"""Process, check and populate internal data structures.
@@ -475,36 +428,32 @@
ValueError: With the message set to indicate the specific error.
"""
- # tuplefy the lists since range() does not like them mutable.
- self._oem_ranges = [
- AIDHeaderParser._convert_lst_to_tup(k, v)
- for k, v in self._oem_ranges.iteritems()
- ]
-
# Check for overlapping ranges
- for i, range1 in enumerate(self._oem_ranges):
- for range2 in self._oem_ranges[i + 1:]:
- if AIDHeaderParser._is_overlap(range1, range2):
- raise ValueError("Overlapping OEM Ranges found %s and %s" %
- (str(range1), str(range2)))
+ for ranges in self._ranges.values():
+ for i, range1 in enumerate(ranges):
+ for range2 in ranges[i + 1:]:
+ if AIDHeaderParser._is_overlap(range1, range2):
+ raise ValueError(
+ "Overlapping OEM Ranges found %s and %s" %
+ (str(range1), str(range2)))
# No core AIDs should be within any oem range.
for aid in self._aid_value_to_name:
-
- if Utils.in_any_range(aid, self._oem_ranges):
- name = self._aid_value_to_name[aid]
- raise ValueError(
- 'AID "%s" value: %u within reserved OEM Range: "%s"' %
- (name, aid, str(self._oem_ranges)))
+ for ranges in self._ranges.values():
+ if Utils.in_any_range(aid, ranges):
+ name = self._aid_value_to_name[aid]
+ raise ValueError(
+ 'AID "%s" value: %u within reserved OEM Range: "%s"' %
+ (name, aid, str(ranges)))
@property
- def oem_ranges(self):
+ def ranges(self):
"""Retrieves the OEM closed ranges as a list of tuples.
Returns:
A list of closed range tuples: [ (0, 42), (50, 105) ... ]
"""
- return self._oem_ranges
+ return self._ranges
@property
def aids(self):
@@ -516,39 +465,6 @@
return self._aid_name_to_value.values()
@staticmethod
- def _convert_lst_to_tup(name, lst):
- """Converts a mutable list to a non-mutable tuple.
-
- Used ONLY for ranges and thus enforces a length of 2.
-
- Args:
- lst (List): list that should be "tuplefied".
-
- Raises:
- ValueError if lst is not a list or len is not 2.
-
- Returns:
- Tuple(lst)
- """
- if not lst or len(lst) != 2:
- raise ValueError('Mismatched range for "%s"' % name)
-
- return tuple(lst)
-
- @staticmethod
- def _is_oem_range(aid):
- """Detects if a given aid is within the reserved OEM range.
-
- Args:
- aid (int): The aid to test
-
- Returns:
- True if it is within the range, False otherwise.
- """
-
- return AIDHeaderParser._OEM_RANGE.match(aid)
-
- @staticmethod
def _is_overlap(range_a, range_b):
"""Calculates the overlap of two range tuples.
@@ -588,12 +504,12 @@
_SECTIONS = [('_handle_aid', ('value', )),
('_handle_path', ('mode', 'user', 'group', 'caps'))]
- def __init__(self, config_files, oem_ranges):
+ def __init__(self, config_files, ranges):
"""
Args:
config_files ([str]): The list of config.fs files to parse.
Note the filename is not important.
- oem_ranges ([(),()]): range tuples indicating reserved OEM ranges.
+ ranges ({str,[()]): Dictionary of partitions and a list of tuples that correspond to their ranges
"""
self._files = []
@@ -604,7 +520,7 @@
# (name to file, value to aid)
self._seen_aids = ({}, {})
- self._oem_ranges = oem_ranges
+ self._ranges = ranges
self._config_files = config_files
@@ -669,6 +585,27 @@
# within the generated file.
self._aids.sort(key=lambda item: item.normalized_value)
+ def _verify_valid_range(self, aid):
+ """Verified an AID entry is in a valid range"""
+
+ ranges = None
+
+ partitions = self._ranges.keys()
+ partitions.sort(key=len, reverse=True)
+ for partition in partitions:
+ if aid.friendly.startswith(partition):
+ ranges = self._ranges[partition]
+ break
+
+ if ranges is None:
+ sys.exit('AID "%s" must be prefixed with a partition name' %
+ aid.friendly)
+
+ if not Utils.in_any_range(int(aid.value, 0), ranges):
+ emsg = '"value" for aid "%s" not in valid range %s, got: %s'
+ emsg = emsg % (aid.friendly, str(ranges), aid.value)
+ sys.exit(emsg)
+
def _handle_aid(self, file_name, section_name, config):
"""Verifies an AID entry and adds it to the aid list.
@@ -702,15 +639,11 @@
sys.exit(error_message('Found specified but unset "value"'))
try:
- aid = AID(section_name, value, file_name, '/vendor/bin/sh')
+ aid = AID(section_name, value, file_name, '/bin/sh')
except ValueError as exception:
sys.exit(error_message(exception))
- # Values must be within OEM range
- if not Utils.in_any_range(int(aid.value, 0), self._oem_ranges):
- emsg = '"value" not in valid range %s, got: %s'
- emsg = emsg % (str(self._oem_ranges), value)
- sys.exit(error_message(emsg))
+ self._verify_valid_range(aid)
# use the normalized int value in the dict and detect
# duplicate definitions of the same value
@@ -1000,7 +933,7 @@
args['capability_header'])
self._base_parser = AIDHeaderParser(args['aid_header'])
self._oem_parser = FSConfigFileParser(args['fsconfig'],
- self._base_parser.oem_ranges)
+ self._base_parser.ranges)
self._partition = args['partition']
self._all_partitions = args['all_partitions']
@@ -1265,7 +1198,7 @@
hdr_parser = AIDHeaderParser(args['aid_header'])
- parser = FSConfigFileParser(args['fsconfig'], hdr_parser.oem_ranges)
+ parser = FSConfigFileParser(args['fsconfig'], hdr_parser.ranges)
print OEMAidGen._GENERATED
@@ -1313,17 +1246,19 @@
'to parse AIDs and OEM Ranges from')
opt_group.add_argument(
- '--required-prefix',
- required=False,
- help='A prefix that the names are required to contain.')
+ '--partition',
+ required=True,
+ help=
+ 'Filter the input file and only output entries for the given partition.'
+ )
def __call__(self, args):
hdr_parser = AIDHeaderParser(args['aid_header'])
- parser = FSConfigFileParser(args['fsconfig'], hdr_parser.oem_ranges)
+ parser = FSConfigFileParser(args['fsconfig'], hdr_parser.ranges)
- required_prefix = args['required_prefix']
+ filter_partition = args['partition']
aids = parser.aids
@@ -1331,13 +1266,22 @@
if not aids:
return
+ aids_by_partition = {}
+ partitions = hdr_parser.ranges.keys()
+ partitions.sort(key=len, reverse=True)
+
for aid in aids:
- if required_prefix is None or aid.friendly.startswith(
- required_prefix):
+ for partition in partitions:
+ if aid.friendly.startswith(partition):
+ if partition in aids_by_partition:
+ aids_by_partition[partition].append(aid)
+ else:
+ aids_by_partition[partition] = [aid]
+ break
+
+ if filter_partition in aids_by_partition:
+ for aid in aids_by_partition[filter_partition]:
self._print_formatted_line(aid)
- else:
- sys.exit("%s: AID '%s' must start with '%s'" %
- (args['fsconfig'], aid.friendly, required_prefix))
def _print_formatted_line(self, aid):
"""Prints the aid to stdout in the passwd format. Internal use only.
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 4cb3a37..2f3642b 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -111,6 +111,7 @@
import copy
import errno
import gzip
+import io
import itertools
import logging
import os
@@ -746,12 +747,7 @@
filename: The archive name in the output zip.
keys: A list of public keys to use during OTA package verification.
"""
-
- try:
- from StringIO import StringIO
- except ImportError:
- from io import StringIO
- temp_file = StringIO()
+ temp_file = io.BytesIO()
certs_zip = zipfile.ZipFile(temp_file, "w")
for k in keys:
common.ZipWrite(certs_zip, k)
diff --git a/tools/releasetools/test_sign_target_files_apks.py b/tools/releasetools/test_sign_target_files_apks.py
index 0100729..70c147e 100644
--- a/tools/releasetools/test_sign_target_files_apks.py
+++ b/tools/releasetools/test_sign_target_files_apks.py
@@ -15,6 +15,7 @@
#
import base64
+import io
import os.path
import zipfile
@@ -22,7 +23,7 @@
import test_utils
from sign_target_files_apks import (
CheckApkAndApexKeysAvailable, EditTags, GetApkFileInfo, ReadApexKeysInfo,
- ReplaceCerts, ReplaceVerityKeyId, RewriteProps)
+ ReplaceCerts, ReplaceVerityKeyId, RewriteProps, WriteOtacerts)
class SignTargetFilesApksTest(test_utils.ReleaseToolsTestCase):
@@ -236,6 +237,22 @@
}
self.assertEqual(output_xml, ReplaceCerts(input_xml))
+ def test_WriteOtacerts(self):
+ certs = [
+ os.path.join(self.testdata_dir, 'platform.x509.pem'),
+ os.path.join(self.testdata_dir, 'media.x509.pem'),
+ os.path.join(self.testdata_dir, 'testkey.x509.pem'),
+ ]
+ entry_name = 'SYSTEM/etc/security/otacerts.zip'
+ output_file = common.MakeTempFile(suffix='.zip')
+ with zipfile.ZipFile(output_file, 'w') as output_zip:
+ WriteOtacerts(output_zip, entry_name, certs)
+ with zipfile.ZipFile(output_file) as input_zip:
+ self.assertIn(entry_name, input_zip.namelist())
+ otacerts_file = io.BytesIO(input_zip.read(entry_name))
+ with zipfile.ZipFile(otacerts_file) as otacerts_zip:
+ self.assertEqual(3, len(otacerts_zip.namelist()))
+
def test_CheckApkAndApexKeysAvailable(self):
input_file = common.MakeTempFile(suffix='.zip')
with zipfile.ZipFile(input_file, 'w') as input_zip: