summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-02-12 01:32:21 +0000
committer Spandan Das <spandandas@google.com> 2025-02-12 17:33:48 +0000
commit7a42d1c1ca460c32b8deaca5489eabea5dbcbe5e (patch)
tree79e7ced81d7665316bf197c25b7a97d102b0c97f /filesystem/android_device.go
parent5ef1a9ca49b520fb82a64f360820811edc79462e (diff)
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
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go8
1 files changed, 6 insertions, 2 deletions
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())