summaryrefslogtreecommitdiff
path: root/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem')
-rw-r--r--filesystem/android_device_product_out.go6
-rw-r--r--filesystem/filesystem.go4
2 files changed, 9 insertions, 1 deletions
diff --git a/filesystem/android_device_product_out.go b/filesystem/android_device_product_out.go
index 2c8cad6c0..7d37f1ee7 100644
--- a/filesystem/android_device_product_out.go
+++ b/filesystem/android_device_product_out.go
@@ -73,6 +73,12 @@ func (a *androidDevice) copyFilesToProductOutForSoongOnly(ctx android.ModuleCont
Rule: android.CpWithBash,
Input: fip.SourcePath,
Output: fip.FullInstallPath,
+ Args: map[string]string{
+ // Preserve timestamps for adb sync, so that this installed file's
+ // timestamp matches the timestamp in the filesystem's intermediate
+ // staging dir
+ "cpFlags": "-p",
+ },
})
} else {
ctx.Build(pctx, android.BuildParams{
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 0381951ca..979dba5a1 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -868,7 +868,9 @@ func (f *filesystem) copyPackagingSpecs(ctx android.ModuleContext, builder *andr
dirsToSpecs[rootDir] = rootDirSpecs
dirsToSpecs[rebasedDir] = rebasedDirSpecs
- return f.CopySpecsToDirs(ctx, builder, dirsToSpecs)
+ // Preserve timestamps for adb sync, so that this staging dir file matches the timestamp in the
+ // out/target/product staging directory.
+ return f.CopySpecsToDirs(ctx, builder, dirsToSpecs, true)
}
func (f *filesystem) rootDirString() string {