diff options
author | 2025-01-14 21:42:44 +0000 | |
---|---|---|
committer | 2025-01-14 22:35:19 +0000 | |
commit | c28395fd75c884fa6b84a14256ca496bc8c94557 (patch) | |
tree | 7f4232fa299d364e97718ddbae93d7c305eb902b | |
parent | 6d08d925785a657af3d24f45fbc24ddfe0ec847f (diff) |
Disable avb for userdata partition
To make the behavior identical between make and soong.
Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_userdata_image/android_common/userdata.img
Bug: 388920173
Change-Id: I4b89be5c0f5355b63791dde77278217f3a82318e
-rw-r--r-- | fsgen/filesystem_creator.go | 2 | ||||
-rw-r--r-- | fsgen/vbmeta_partitions.go | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go index a4c008dc2..9aed460e3 100644 --- a/fsgen/filesystem_creator.go +++ b/fsgen/filesystem_creator.go @@ -381,6 +381,8 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste panic(fmt.Sprintf("Partition size must be an int, got %s", vars.BoardPartitionSize)) } fsProps.Partition_size = &parsed + // Disable avb for userdata partition + fsProps.Use_avb = nil } // https://cs.android.com/android/platform/superproject/main/+/main:build/make/core/Makefile;l=2265;drc=7f50a123045520f2c5e18e9eb4e83f92244a1459 if s, err := strconv.ParseBool(partitionVars.ProductFsCasefold); err == nil { diff --git a/fsgen/vbmeta_partitions.go b/fsgen/vbmeta_partitions.go index 11c57590c..d146cbb8e 100644 --- a/fsgen/vbmeta_partitions.go +++ b/fsgen/vbmeta_partitions.go @@ -154,8 +154,8 @@ func createVbmetaPartitions(ctx android.LoadHookContext, generatedPartitionTypes // Already handled by a chained vbmeta partition continue } - if strings.Contains(partitionType, "ramdisk") || strings.Contains(partitionType, "boot") { - // ramdisk is never signed with avb information + if strings.Contains(partitionType, "ramdisk") || strings.Contains(partitionType, "boot") || partitionType == "userdata" { + // ramdisk and userdata are never signed with avb information // boot partitions just have the avb footer, and don't have a corresponding vbmeta // partition. continue |