Add vbmeta_*.img files to IMAGES/ in soong built target_files.zip
Bug: 388635097
Test: built the soong target_files.zip locally
Test: verified that vbmeta*img files are included, although they are not
bit-identical
Change-Id: Ifed30cec8122ba14635ab2b8fd1edbd3eb05f9a1
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 6a939e8..86f853c 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -213,6 +213,11 @@
if a.deviceProps.Bootloader != nil {
builder.Command().Textf("cp ").Input(android.PathForModuleSrc(ctx, proptools.String(a.deviceProps.Bootloader))).Textf(" %s/IMAGES/bootloader", targetFilesDir.String())
}
+ // Copy the vbmeta img files to IMAGES/
+ for _, vbmetaPartition := range a.partitionProps.Vbmeta_partitions {
+ vbmetaInfo, _ := android.OtherModuleProvider(ctx, ctx.GetDirectDepWithTag(vbmetaPartition, filesystemDepTag), vbmetaPartitionProvider)
+ builder.Command().Textf("cp ").Input(vbmetaInfo.Output).Textf(" %s/IMAGES/", targetFilesDir.String())
+ }
for _, zipCopy := range toCopy {
if zipCopy.srcModule == nil {