From 7a42d1c1ca460c32b8deaca5489eabea5dbcbe5e Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Wed, 12 Feb 2025 01:32:21 +0000 Subject: Copy system_other.img to target_files.zip Similar to https://r.android.com/3489814, this adds an additional rule in systemOtherImage to create a hermetic version of system_other.img with pinned timestamps. This information will be provided to android_device via super_image. block_list information is not implemented for system_other to match the make behavior Test: Built the soong built target_files.zip locally Bug: 385383524 Change-Id: I4cbb4f8a5380203eaef846b3d8a56eb7791f8a34 --- filesystem/android_device.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'filesystem/android_device.go') diff --git a/filesystem/android_device.go b/filesystem/android_device.go index 960c96acf..c14cc4cff 100644 --- a/filesystem/android_device.go +++ b/filesystem/android_device.go @@ -398,8 +398,12 @@ func (a *androidDevice) copyImagesToTargetZip(ctx android.ModuleContext, builder superPartition := ctx.GetDirectDepProxyWithTag(*a.partitionProps.Super_partition_name, superPartitionDepTag) if info, ok := android.OtherModuleProvider(ctx, superPartition, SuperImageProvider); ok { for _, partition := range android.SortedKeys(info.SubImageInfo) { - builder.Command().Textf("cp ").Input(info.SubImageInfo[partition].OutputHermetic).Textf(" %s/IMAGES/", targetFilesDir.String()) - builder.Command().Textf("cp ").Input(info.SubImageInfo[partition].MapFile).Textf(" %s/IMAGES/", targetFilesDir.String()) + if info.SubImageInfo[partition].OutputHermetic != nil { + builder.Command().Textf("cp ").Input(info.SubImageInfo[partition].OutputHermetic).Textf(" %s/IMAGES/", targetFilesDir.String()) + } + if info.SubImageInfo[partition].MapFile != nil { + builder.Command().Textf("cp ").Input(info.SubImageInfo[partition].MapFile).Textf(" %s/IMAGES/", targetFilesDir.String()) + } } } else { ctx.ModuleErrorf("Super partition %s does set SuperImageProvider\n", superPartition.Name()) -- cgit v1.2.3-59-g8ed1b