summaryrefslogtreecommitdiff
path: root/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem')
-rw-r--r--filesystem/android_device.go18
-rw-r--r--filesystem/filesystem.go3
2 files changed, 17 insertions, 4 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 19e93ae8f..666aa6865 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -95,12 +95,22 @@ func (a *androidDevice) buildTargetFilesZip(ctx android.ModuleContext) {
builder := android.NewRuleBuilder(pctx, ctx)
builder.Command().Textf("rm -rf %s", targetFilesDir.String())
builder.Command().Textf("mkdir -p %s", targetFilesDir.String())
- if a.partitionProps.Vendor_partition_name != nil {
- fsInfo := a.getFilesystemInfo(ctx, *a.partitionProps.Vendor_partition_name)
- builder.Command().Textf("mkdir -p %s/VENDOR", targetFilesDir.String())
+ partitionToSubdir := map[*string]string{
+ a.partitionProps.System_partition_name: "SYSTEM",
+ a.partitionProps.System_ext_partition_name: "SYSTEM_EXT",
+ a.partitionProps.Product_partition_name: "PRODUCT",
+ a.partitionProps.Vendor_partition_name: "VENDOR",
+ a.partitionProps.Odm_partition_name: "ODM",
+ }
+ for partition, subdir := range partitionToSubdir {
+ if partition == nil {
+ continue
+ }
+ fsInfo := a.getFilesystemInfo(ctx, *partition)
+ builder.Command().Textf("mkdir -p %s/%s", targetFilesDir.String(), subdir)
builder.Command().
BuiltTool("acp").
- Textf("-rd %s/. %s/VENDOR", fsInfo.RootDir, targetFilesDir).
+ Textf("-rd %s/. %s/%s", fsInfo.RootDir, targetFilesDir, subdir).
Implicit(fsInfo.Output) // so that the staging dir is built
}
builder.Command().
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 43fd390ce..6dfbfd1be 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -751,7 +751,10 @@ func (f *filesystem) buildPropFile(ctx android.ModuleContext) (android.Path, and
}
if timestamp := proptools.String(f.properties.Fake_timestamp); timestamp != "" {
addStr("timestamp", timestamp)
+ } else if ctx.Config().Getenv("USE_FIXED_TIMESTAMP_IMG_FILES") == "true" {
+ addStr("use_fixed_timestamp", "true")
}
+
if uuid := proptools.String(f.properties.Uuid); uuid != "" {
addStr("uuid", uuid)
addStr("hash_seed", uuid)