diff options
author | 2025-02-27 13:13:50 +0000 | |
---|---|---|
committer | 2025-02-28 08:27:53 +0000 | |
commit | f079f0d018a6a5d806d3c0b2a875e8ffc54104df (patch) | |
tree | bd3a256729b479880e4b2ab7fa1ae855b6861a9c /filesystem/android_device.go | |
parent | 5efa02606a465f8c13b1c6923d32021afae9bb68 (diff) |
Generate META/dynamic_partitions_info.txt of target_files.zip
dynamic_partitions_info.txt is generated by
`dump-dynamic-partitions-info` in make, and its contents are similar to
misc_info.txt of the device's super_image.
This CL creates this file in target_files.zip. The common contents are
refactored to a helper function in super_image, and this helper function
will be used to generate misc_info.txt of the super_image, and
META/dynamic_partitions_info.txt
Bug: 399788100
Test: Built META/dynamic_partitions_info.txt
Test: diff between make and soong (after sort)
< build_super_empty_partition=true
Change-Id: Ifd8ef89008d8ce3a2baaa73466236325b635c6e5
---
>
> ab_update=true
3c4
< dynamic_partition_list= product system system_ext system_dlkm odm vendor vendor_dlkm odm_dlkm
---
> dynamic_partition_list=odm odm_dlkm product system system_dlkm system_ext vendor vendor_dlkm
7c8
< super_google_system_dynamic_partitions_partition_list= product system system_ext system_dlkm
---
> super_google_system_dynamic_partitions_partition_list=product system system_ext system_dlkm
9c10
< super_google_vendor_dynamic_partitions_partition_list= odm vendor vendor_dlkm odm_dlkm
---
> super_google_vendor_dynamic_partitions_partition_list=odm vendor vendor_dlkm odm_dlkm
There are some formatting diffs. `build_super_empty_image` seems to be
main missing info. I have added a TODO to add that.
Change-Id: I68d0a43b0c3e53ea88246784392cd7706dd2a9e9
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r-- | filesystem/android_device.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go index a2fa0f08a..6718320e1 100644 --- a/filesystem/android_device.go +++ b/filesystem/android_device.go @@ -622,6 +622,17 @@ func (a *androidDevice) copyMetadataToTargetZip(ctx android.ModuleContext, build installedApexKeys = android.SortedUniquePaths(installedApexKeys) // Sort by keypath to match make builder.Command().Text("cat").Inputs(installedApexKeys).Textf(" >> %s/META/apexkeys.txt", targetFilesDir.String()) + if a.partitionProps.Super_partition_name != nil { + superPartition := ctx.GetDirectDepProxyWithTag(*a.partitionProps.Super_partition_name, superPartitionDepTag) + if info, ok := android.OtherModuleProvider(ctx, superPartition, SuperImageProvider); ok { + // dynamic_partitions_info.txt + // TODO (b/390192334): Add `building_super_empty_partition=true` + builder.Command().Text("cp").Input(info.DynamicPartitionsInfo).Textf(" %s/META/", targetFilesDir.String()) + } else { + ctx.ModuleErrorf("Super partition %s does set SuperImageProvider\n", superPartition.Name()) + } + } + } type ApexKeyPathInfo struct { |