From 4a1240de8a2ee5795a30df123058677d3999145e Mon Sep 17 00:00:00 2001 From: Mohammad Islam Date: Tue, 18 May 2021 17:45:07 +0000 Subject: [PATCH 1/3] Revert "Revert "Re-land "Enable apex compression on all devices with updatable apex"" This reverts commit b695e761f19b02085b0a48abd9fddeff0f3c204c. Reason for revert: b/185708645 has been fixed Bug: 169780183 Bug: 185708645 Change-Id: If0ea1168c710eeb4c90d7a9768a278a07adc48fa Merged-In: If0ea1168c710eeb4c90d7a9768a278a07adc48fa Test: Manually updated APEX with same version via OTA/adb-remount and observed it was decompressed. --- target/product/updatable_apex.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/product/updatable_apex.mk b/target/product/updatable_apex.mk index c8dc8b002..d606e0037 100644 --- a/target/product/updatable_apex.mk +++ b/target/product/updatable_apex.mk @@ -22,4 +22,9 @@ ifneq ($(OVERRIDE_TARGET_FLATTEN_APEX),true) PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_prebuilt PRODUCT_VENDOR_PROPERTIES := ro.apex.updatable=true TARGET_FLATTEN_APEX := false + # Use compressed apexes in pre-installed partitions. + # Note: this doesn't mean that all pre-installed apexes will be compressed. + # Whether an apex is compressed or not is controlled at apex Soong module + # via compresible property. + PRODUCT_COMPRESSED_APEX := true endif From 16bcac122f4cf80b808372f3a6c146ed276dfc6e Mon Sep 17 00:00:00 2001 From: Tianjie Date: Thu, 13 May 2021 15:44:43 -0700 Subject: [PATCH 2/3] Check super size for factory OTA at build time For VAB launched device, factory OTA will write system_other partition to the super image. So we want to check that sum(dynamic partitions) + system_other + overhead <= super at build time. Since we don't know the overhead at build time, we might instead check sum(all partitions) < super. Bug: 185809374 Test: m check-all-partition-sizes, unittests Change-Id: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20 Merged-In: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20 (cherry-picked from commit 294ec7d9e5298d91768e0f2e9abe4cc7de180fe1) Change-Id: I479d1b399a1639b595ae5d7f1481c771a3439e51 --- core/Makefile | 13 ++++++++++--- tools/releasetools/check_partition_sizes.py | 12 +++++++++--- tools/releasetools/test_check_partition_sizes.py | 11 +++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/core/Makefile b/core/Makefile index 233c51547..e99e9675d 100644 --- a/core/Makefile +++ b/core/Makefile @@ -3395,7 +3395,7 @@ endif # BOARD_PREBUILT_PVMFWIMAGE # $(INSTALLED_VENDORIMAGE_TARGET)" for "system vendor". # (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))) +$(strip $(foreach item,$(1),$(if $(filter $(item),system_other),$(INSTALLED_SYSTEMOTHERIMAGE_TARGET),$(INSTALLED_$(call to-upper,$(item))IMAGE_TARGET)))) endef # ----------------------------------------------------------------- @@ -4124,13 +4124,20 @@ ifeq (,$(TARGET_BUILD_UNBUNDLED)) ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION)) +PARTITIONS_AND_OTHER_IN_SUPER := $(BOARD_SUPER_PARTITION_PARTITION_LIST) + +# Add the system other image to the misc_info. Because factory ota may install system_other to the super partition. +ifdef BUILDING_SYSTEM_OTHER_IMAGE +PARTITIONS_AND_OTHER_IN_SUPER += system_other +endif # BUILDING_SYSTEM_OTHER_IMAGE + # $(1): misc_info.txt # #(2): optional log file define check-all-partition-sizes-target mkdir -p $(dir $(1)) rm -f $(1) $(call dump-super-image-info, $(1)) - $(foreach partition,$(BOARD_SUPER_PARTITION_PARTITION_LIST), \ + $(foreach partition,$(PARTITIONS_AND_OTHER_IN_SUPER), \ echo "$(partition)_image="$(call images-for-partitions,$(partition)) >> $(1);) $(CHECK_PARTITION_SIZES) $(if $(2),--logfile $(2),-v) $(1) endef @@ -4141,7 +4148,7 @@ $(call dist-for-goals, droid_targets, $(check_all_partition_sizes_log)) $(check_all_partition_sizes_log): \ $(CHECK_PARTITION_SIZES) \ - $(call images-for-partitions,$(BOARD_SUPER_PARTITION_PARTITION_LIST)) + $(call images-for-partitions,$(PARTITIONS_AND_OTHER_IN_SUPER)) $(call check-all-partition-sizes-target, \ $(call intermediates-dir-for,PACKAGING,check-all-partition-sizes)/misc_info.txt, \ $@) diff --git a/tools/releasetools/check_partition_sizes.py b/tools/releasetools/check_partition_sizes.py index 3047ddb7c..eaed07e87 100644 --- a/tools/releasetools/check_partition_sizes.py +++ b/tools/releasetools/check_partition_sizes.py @@ -223,9 +223,15 @@ class DynamicPartitionSizeChecker(object): error_limit = Expression( "BOARD_SUPER_PARTITION_ERROR_LIMIT{}".format(size_limit_suffix), int(info_dict["super_partition_error_limit"]) // num_slots) - self._CheckSumOfPartitionSizes( - max_size, info_dict["dynamic_partition_list"].strip().split(), - warn_limit, error_limit) + partitions_in_super = info_dict["dynamic_partition_list"].strip().split() + # In the vab case, factory OTA will allocate space on super to install + # the system_other partition. So add system_other to the partition list. + if DeviceType.Get(self.info_dict) == DeviceType.VAB and ( + "system_other_image" in info_dict or + "system_other_image_size" in info_dict): + partitions_in_super.append("system_other") + self._CheckSumOfPartitionSizes(max_size, partitions_in_super, + warn_limit, error_limit) groups = info_dict.get("super_partition_groups", "").strip().split() diff --git a/tools/releasetools/test_check_partition_sizes.py b/tools/releasetools/test_check_partition_sizes.py index 073d2290e..88cf60f6d 100644 --- a/tools/releasetools/test_check_partition_sizes.py +++ b/tools/releasetools/test_check_partition_sizes.py @@ -33,6 +33,7 @@ class CheckPartitionSizesTest(test_utils.ReleaseToolsTestCase): system_image_size=50 vendor_image_size=20 product_image_size=20 + system_other_image_size=10 """.split("\n")) def test_ab(self): @@ -126,3 +127,13 @@ class CheckPartitionSizesTest(test_utils.ReleaseToolsTestCase): """.split("\n"))) with self.assertRaises(RuntimeError): CheckPartitionSizes(self.info_dict) + + def test_vab_too_big_with_system_other(self): + self.info_dict.update(common.LoadDictionaryFromLines(""" + virtual_ab=true + system_other_image_size=20 + super_partition_size=101 + super_super_device_size=101 + """.split("\n"))) + with self.assertRaises(RuntimeError): + CheckPartitionSizes(self.info_dict) From fcc2b97e54aff296dfe03f451acbd2d334fe8ccf Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 27 May 2021 08:37:15 -0600 Subject: [PATCH 3/3] platform/build/make - S is now 31 Bug: 171506470 Test: Build Change-Id: I1f3475479659855c0185236f88bc388a61844968 --- core/config.mk | 2 +- core/version_defaults.mk | 4 +- target/product/gsi/31.txt | 223 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 226 insertions(+), 3 deletions(-) create mode 100644 target/product/gsi/31.txt diff --git a/core/config.mk b/core/config.mk index d1746ef60..93c5db12d 100644 --- a/core/config.mk +++ b/core/config.mk @@ -769,7 +769,7 @@ BUILD_DATETIME_FROM_FILE := $$(cat $(BUILD_DATETIME_FILE)) # is made which breaks compatibility with the previous platform sepolicy version, # not just on every increase in PLATFORM_SDK_VERSION. The minor version should # be reset to 0 on every bump of the PLATFORM_SDK_VERSION. -sepolicy_major_vers := 30 +sepolicy_major_vers := 31 sepolicy_minor_vers := 0 ifneq ($(sepolicy_major_vers), $(PLATFORM_SDK_VERSION)) diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 8d40f6031..7dc35f18e 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -88,7 +88,7 @@ MAX_PLATFORM_VERSION := # The last stable version name of the platform that was released. During # development, this stays at that previous version, while the codename indicates # further work based on the previous version. -PLATFORM_VERSION_LAST_STABLE := 11 +PLATFORM_VERSION_LAST_STABLE := 12 .KATI_READONLY := PLATFORM_VERSION_LAST_STABLE # These are the current development codenames, if the build is not a final @@ -151,7 +151,7 @@ ifndef PLATFORM_SDK_VERSION # When you increment the PLATFORM_SDK_VERSION please ensure you also # clear out the following text file of all older PLATFORM_VERSION's: # cts/tests/tests/os/assets/platform_versions.txt - PLATFORM_SDK_VERSION := 30 + PLATFORM_SDK_VERSION := 31 endif .KATI_READONLY := PLATFORM_SDK_VERSION diff --git a/target/product/gsi/31.txt b/target/product/gsi/31.txt new file mode 100644 index 000000000..971ec922a --- /dev/null +++ b/target/product/gsi/31.txt @@ -0,0 +1,223 @@ +LLNDK: libEGL.so +LLNDK: libGLESv1_CM.so +LLNDK: libGLESv2.so +LLNDK: libGLESv3.so +LLNDK: libRS.so +LLNDK: libandroid_net.so +LLNDK: libbinder_ndk.so +LLNDK: libc.so +LLNDK: libcgrouprc.so +LLNDK: libdl.so +LLNDK: libft2.so +LLNDK: liblog.so +LLNDK: libm.so +LLNDK: libmediandk.so +LLNDK: libnativewindow.so +LLNDK: libneuralnetworks.so +LLNDK: libselinux.so +LLNDK: libsync.so +LLNDK: libvndksupport.so +LLNDK: libvulkan.so +VNDK-SP: android.hardware.common-V2-ndk_platform.so +VNDK-SP: android.hardware.common.fmq-V1-ndk_platform.so +VNDK-SP: android.hardware.graphics.common-V2-ndk_platform.so +VNDK-SP: android.hardware.graphics.common@1.0.so +VNDK-SP: android.hardware.graphics.common@1.1.so +VNDK-SP: android.hardware.graphics.common@1.2.so +VNDK-SP: android.hardware.graphics.mapper@2.0.so +VNDK-SP: android.hardware.graphics.mapper@2.1.so +VNDK-SP: android.hardware.graphics.mapper@3.0.so +VNDK-SP: android.hardware.graphics.mapper@4.0.so +VNDK-SP: android.hardware.renderscript@1.0.so +VNDK-SP: android.hidl.memory.token@1.0.so +VNDK-SP: android.hidl.memory@1.0-impl.so +VNDK-SP: android.hidl.memory@1.0.so +VNDK-SP: android.hidl.safe_union@1.0.so +VNDK-SP: libRSCpuRef.so +VNDK-SP: libRSDriver.so +VNDK-SP: libRS_internal.so +VNDK-SP: libbacktrace.so +VNDK-SP: libbase.so +VNDK-SP: libbcinfo.so +VNDK-SP: libblas.so +VNDK-SP: libc++.so +VNDK-SP: libcompiler_rt.so +VNDK-SP: libcutils.so +VNDK-SP: libdmabufheap.so +VNDK-SP: libgralloctypes.so +VNDK-SP: libhardware.so +VNDK-SP: libhidlbase.so +VNDK-SP: libhidlmemory.so +VNDK-SP: libion.so +VNDK-SP: libjsoncpp.so +VNDK-SP: liblzma.so +VNDK-SP: libprocessgroup.so +VNDK-SP: libunwindstack.so +VNDK-SP: libutils.so +VNDK-SP: libutilscallstack.so +VNDK-SP: libz.so +VNDK-core: android.hardware.audio.common@2.0.so +VNDK-core: android.hardware.authsecret-V1-ndk_platform.so +VNDK-core: android.hardware.automotive.occupant_awareness-V1-ndk_platform.so +VNDK-core: android.hardware.configstore-utils.so +VNDK-core: android.hardware.configstore@1.0.so +VNDK-core: android.hardware.configstore@1.1.so +VNDK-core: android.hardware.confirmationui-support-lib.so +VNDK-core: android.hardware.gnss-V1-ndk_platform.so +VNDK-core: android.hardware.graphics.allocator@2.0.so +VNDK-core: android.hardware.graphics.allocator@3.0.so +VNDK-core: android.hardware.graphics.allocator@4.0.so +VNDK-core: android.hardware.graphics.bufferqueue@1.0.so +VNDK-core: android.hardware.graphics.bufferqueue@2.0.so +VNDK-core: android.hardware.health.storage-V1-ndk_platform.so +VNDK-core: android.hardware.identity-V3-ndk_platform.so +VNDK-core: android.hardware.keymaster-V3-ndk_platform.so +VNDK-core: android.hardware.light-V1-ndk_platform.so +VNDK-core: android.hardware.media.bufferpool@2.0.so +VNDK-core: android.hardware.media.omx@1.0.so +VNDK-core: android.hardware.media@1.0.so +VNDK-core: android.hardware.memtrack-V1-ndk_platform.so +VNDK-core: android.hardware.memtrack@1.0.so +VNDK-core: android.hardware.oemlock-V1-ndk_platform.so +VNDK-core: android.hardware.power-V2-ndk_platform.so +VNDK-core: android.hardware.power.stats-V1-ndk_platform.so +VNDK-core: android.hardware.rebootescrow-V1-ndk_platform.so +VNDK-core: android.hardware.security.keymint-V1-ndk_platform.so +VNDK-core: android.hardware.security.secureclock-V1-ndk_platform.so +VNDK-core: android.hardware.security.sharedsecret-V1-ndk_platform.so +VNDK-core: android.hardware.soundtrigger@2.0-core.so +VNDK-core: android.hardware.soundtrigger@2.0.so +VNDK-core: android.hardware.vibrator-V2-ndk_platform.so +VNDK-core: android.hardware.weaver-V1-ndk_platform.so +VNDK-core: android.hidl.token@1.0-utils.so +VNDK-core: android.hidl.token@1.0.so +VNDK-core: android.system.keystore2-V1-ndk_platform.so +VNDK-core: android.system.suspend@1.0.so +VNDK-core: libaudioroute.so +VNDK-core: libaudioutils.so +VNDK-core: libbinder.so +VNDK-core: libbufferqueueconverter.so +VNDK-core: libcamera_metadata.so +VNDK-core: libcap.so +VNDK-core: libcn-cbor.so +VNDK-core: libcodec2.so +VNDK-core: libcrypto.so +VNDK-core: libcrypto_utils.so +VNDK-core: libcurl.so +VNDK-core: libdiskconfig.so +VNDK-core: libdumpstateutil.so +VNDK-core: libevent.so +VNDK-core: libexif.so +VNDK-core: libexpat.so +VNDK-core: libfmq.so +VNDK-core: libgatekeeper.so +VNDK-core: libgui.so +VNDK-core: libhardware_legacy.so +VNDK-core: libhidlallocatorutils.so +VNDK-core: libjpeg.so +VNDK-core: libldacBT_abr.so +VNDK-core: libldacBT_enc.so +VNDK-core: liblz4.so +VNDK-core: libmedia_helper.so +VNDK-core: libmedia_omx.so +VNDK-core: libmemtrack.so +VNDK-core: libminijail.so +VNDK-core: libmkbootimg_abi_check.so +VNDK-core: libnetutils.so +VNDK-core: libnl.so +VNDK-core: libpcre2.so +VNDK-core: libpiex.so +VNDK-core: libpng.so +VNDK-core: libpower.so +VNDK-core: libprocinfo.so +VNDK-core: libradio_metadata.so +VNDK-core: libspeexresampler.so +VNDK-core: libsqlite.so +VNDK-core: libssl.so +VNDK-core: libstagefright_bufferpool@2.0.so +VNDK-core: libstagefright_bufferqueue_helper.so +VNDK-core: libstagefright_foundation.so +VNDK-core: libstagefright_omx.so +VNDK-core: libstagefright_omx_utils.so +VNDK-core: libstagefright_xmlparser.so +VNDK-core: libsysutils.so +VNDK-core: libtinyalsa.so +VNDK-core: libtinyxml2.so +VNDK-core: libui.so +VNDK-core: libusbhost.so +VNDK-core: libwifi-system-iface.so +VNDK-core: libxml2.so +VNDK-core: libyuv.so +VNDK-core: libziparchive.so +VNDK-private: libbacktrace.so +VNDK-private: libblas.so +VNDK-private: libcompiler_rt.so +VNDK-private: libft2.so +VNDK-private: libgui.so +VNDK-product: android.hardware.audio.common@2.0.so +VNDK-product: android.hardware.configstore@1.0.so +VNDK-product: android.hardware.configstore@1.1.so +VNDK-product: android.hardware.graphics.allocator@2.0.so +VNDK-product: android.hardware.graphics.allocator@3.0.so +VNDK-product: android.hardware.graphics.allocator@4.0.so +VNDK-product: android.hardware.graphics.bufferqueue@1.0.so +VNDK-product: android.hardware.graphics.bufferqueue@2.0.so +VNDK-product: android.hardware.graphics.common@1.0.so +VNDK-product: android.hardware.graphics.common@1.1.so +VNDK-product: android.hardware.graphics.common@1.2.so +VNDK-product: android.hardware.graphics.mapper@2.0.so +VNDK-product: android.hardware.graphics.mapper@2.1.so +VNDK-product: android.hardware.graphics.mapper@3.0.so +VNDK-product: android.hardware.graphics.mapper@4.0.so +VNDK-product: android.hardware.media.bufferpool@2.0.so +VNDK-product: android.hardware.media.omx@1.0.so +VNDK-product: android.hardware.media@1.0.so +VNDK-product: android.hardware.memtrack@1.0.so +VNDK-product: android.hardware.renderscript@1.0.so +VNDK-product: android.hardware.soundtrigger@2.0.so +VNDK-product: android.hidl.memory.token@1.0.so +VNDK-product: android.hidl.memory@1.0.so +VNDK-product: android.hidl.safe_union@1.0.so +VNDK-product: android.hidl.token@1.0.so +VNDK-product: android.system.suspend@1.0.so +VNDK-product: libaudioutils.so +VNDK-product: libbacktrace.so +VNDK-product: libbase.so +VNDK-product: libc++.so +VNDK-product: libcamera_metadata.so +VNDK-product: libcap.so +VNDK-product: libcompiler_rt.so +VNDK-product: libcrypto.so +VNDK-product: libcurl.so +VNDK-product: libcutils.so +VNDK-product: libevent.so +VNDK-product: libexpat.so +VNDK-product: libfmq.so +VNDK-product: libhidlbase.so +VNDK-product: libhidlmemory.so +VNDK-product: libion.so +VNDK-product: libjpeg.so +VNDK-product: libjsoncpp.so +VNDK-product: libldacBT_abr.so +VNDK-product: libldacBT_enc.so +VNDK-product: liblz4.so +VNDK-product: liblzma.so +VNDK-product: libminijail.so +VNDK-product: libnl.so +VNDK-product: libpcre2.so +VNDK-product: libpiex.so +VNDK-product: libpng.so +VNDK-product: libprocessgroup.so +VNDK-product: libprocinfo.so +VNDK-product: libspeexresampler.so +VNDK-product: libssl.so +VNDK-product: libtinyalsa.so +VNDK-product: libtinyxml2.so +VNDK-product: libunwindstack.so +VNDK-product: libutils.so +VNDK-product: libutilscallstack.so +VNDK-product: libwifi-system-iface.so +VNDK-product: libxml2.so +VNDK-product: libyuv.so +VNDK-product: libz.so +VNDK-product: libziparchive.so