summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2025-02-12 01:01:09 +0000
committer Jihoon Kang <jihoonkang@google.com> 2025-02-12 18:42:36 +0000
commitf67b7dea4af97e8d46aded5d75989147de37b9d0 (patch)
treefef8952634bced51c8aef1f1f407e78991ff6cc3 /filesystem/android_device.go
parent4b92926bd8c3171d0e0c9a15bf7e15cb2c03c0f8 (diff)
Dist installed-files.* in soong only build
Implementation details: - Define static rules for building installed-files.txt and installed-files.json - Avoided adding dependency on the root dir and added dependency on the output image file instead - Propagate the generated installed-files.* via filesystem info provider and generate the dist rule in the main android device Test: m droid dist --soong-only && ls -l out/dist Bug: 395162005 Bug: 394365683 Change-Id: I615b0374c557fd11c19fcd190232cab411e2d299
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index b783d0f57..52b9d94e4 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -237,6 +237,26 @@ func (a *androidDevice) GenerateAndroidBuildActions(ctx android.ModuleContext) {
ctx.CheckbuildFile(allImagesStamp)
a.setVbmetaPhonyTargets(ctx)
+
+ a.distFiles(ctx)
+}
+
+func (a *androidDevice) distFiles(ctx android.ModuleContext) {
+ if !ctx.Config().KatiEnabled() {
+ if proptools.Bool(a.deviceProps.Main_device) {
+ fsInfoMap := a.getFsInfos(ctx)
+ for _, partition := range android.SortedKeys(fsInfoMap) {
+ fsInfo := fsInfoMap[partition]
+ if fsInfo.InstalledFiles.Json != nil {
+ ctx.DistForGoal("droidcore-unbundled", fsInfo.InstalledFiles.Json)
+ }
+ if fsInfo.InstalledFiles.Txt != nil {
+ ctx.DistForGoal("droidcore-unbundled", fsInfo.InstalledFiles.Txt)
+ }
+ }
+ }
+ }
+
}
func (a *androidDevice) MakeVars(ctx android.MakeVarsModuleContext) {