summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-02-14 00:18:41 +0000
committer Spandan Das <spandandas@google.com> 2025-02-14 01:42:38 +0000
commit37240d9564c3e6e75ffc6bc2fb35bc800df841c3 (patch)
treee26f8d337e9fe776d3634f5af140c6c6d1b8f917 /filesystem/android_device.go
parent75955b1bf70c92848be9427b65a0e0e4a73f0fc4 (diff)
Package releasetools.py in target_files.zip
This CL creates an intermediate filegroup, and adds that to `Releasetools_extension` dep of the autogenerated android_device. This dep will be used for packaging target_files.zip Bug: 3493530 Test: Built and diff'd target_files.zip Change-Id: I9a5a2c3dba5fd37924544e92cb2646837047600a
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 224c2ef2b..8d7f92f7d 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -75,7 +75,8 @@ type DeviceProperties struct {
Ab_ota_keys []string
Ab_ota_postinstall_config []string
- Ramdisk_node_list *string `android:"path"`
+ Ramdisk_node_list *string `android:"path"`
+ Releasetools_extension *string `android:"path"`
}
type androidDevice struct {
@@ -477,7 +478,13 @@ func (a *androidDevice) copyMetadataToTargetZip(ctx android.ModuleContext, build
builder.Command().Textf("cp").Input(fsInfos[partition].FilesystemConfig).Textf(" %s/META/%s", targetFilesDir.String(), a.filesystemConfigNameForTargetFiles(partition))
}
// Copy ramdisk_node_list
- builder.Command().Textf("cp").Input(android.PathForModuleSrc(ctx, proptools.String(a.deviceProps.Ramdisk_node_list))).Textf(" %s/META/", targetFilesDir.String())
+ if ramdiskNodeList := android.PathForModuleSrc(ctx, proptools.String(a.deviceProps.Ramdisk_node_list)); ramdiskNodeList != nil {
+ builder.Command().Textf("cp").Input(ramdiskNodeList).Textf(" %s/META/", targetFilesDir.String())
+ }
+ // Copy releasetools.py
+ if releaseTools := android.PathForModuleSrc(ctx, proptools.String(a.deviceProps.Releasetools_extension)); releaseTools != nil {
+ builder.Command().Textf("cp").Input(releaseTools).Textf(" %s/META/", targetFilesDir.String())
+ }
}
// Filenames for the partition specific fs_config files.