From 19fbb07dabf3a0a0836e6c4b36fd5584a2d1957b Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Thu, 30 Jan 2025 18:19:29 -0800 Subject: Fix staging dir creation for adevice Adevice does a `ninja -t inputs -i droid` and filters the results for out/target/product/ to find files in the staging directories. We were just copying the staging directories without creating ninja rules before, so that failed. Actually create the ninja rules. The rules are created in the android_device module instead of the filesystem so that if you have multiple filesystems, they don't create conflicting installation rules. We should provide a way for tools like adevice to query the build system for installed files, no matter where they are in the out/ dir, and use that to replace this logic. This cl produces the following diff in out/target/product compared to soong-only builds before this change: https://paste.googleplex.com/4624734193713152 It's mostly empty directories, which I don't think matter for adevice. Bug: 393464638 Bug: 392957226 Test: `m installclean && m && launch_cvd && adevice update` says the device is up-to-date. Change-Id: Ifb52aaf5bc3edd2e3900546bf9df73a52d1022c0 --- filesystem/android_device.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filesystem/android_device.go') diff --git a/filesystem/android_device.go b/filesystem/android_device.go index 3e2f61f1b..6c048287b 100644 --- a/filesystem/android_device.go +++ b/filesystem/android_device.go @@ -210,7 +210,7 @@ func (a *androidDevice) GenerateAndroidBuildActions(ctx android.ModuleContext) { // https://cs.android.com/android/platform/superproject/main/+/main:build/make/core/main.mk;l=1396;drc=6595459cdd8164a6008335f6372c9f97b9094060 ctx.Phony("droidcore-unbundled", allImagesStamp) - validations = append(validations, a.copyFilesToProductOutForSoongOnly(ctx)) + deps = append(deps, a.copyFilesToProductOutForSoongOnly(ctx)) } ctx.Build(pctx, android.BuildParams{ -- cgit v1.2.3-59-g8ed1b