summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-03-03 09:36:16 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-03-03 09:36:16 -0800
commita6ef795f375f5249d70b94f90070adf567e7f388 (patch)
tree5910bef9e17085c7d00885ac12ed09490f2d55fa /filesystem/android_device.go
parent0b09af15f2949badb21480a6b0bb7523776c8f23 (diff)
parent3dfa17f31c8c310d220f6ff1df43d072659e3e68 (diff)
Merge changes from topics "fastboot-info.txt", "super_in_update_package" into main
* changes: Generate META/fastboot-info.txt file Add Super_image_in_update_package prop to super_image Generate META/dynamic_partitions_info.txt of target_files.zip
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index a2fa0f08a..c0f0676af 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -87,6 +87,7 @@ type DeviceProperties struct {
Ramdisk_node_list *string `android:"path"`
Releasetools_extension *string `android:"path"`
+ FastbootInfo *string `android:"path"`
}
type androidDevice struct {
@@ -621,6 +622,23 @@ func (a *androidDevice) copyMetadataToTargetZip(ctx android.ModuleContext, build
}
installedApexKeys = android.SortedUniquePaths(installedApexKeys) // Sort by keypath to match make
builder.Command().Text("cat").Inputs(installedApexKeys).Textf(" >> %s/META/apexkeys.txt", targetFilesDir.String())
+ // Copy fastboot-info.txt
+ if fastbootInfo := android.PathForModuleSrc(ctx, proptools.String(a.deviceProps.FastbootInfo)); fastbootInfo != nil {
+ // TODO (b/399788523): Autogenerate fastboot-info.txt if there is no source fastboot-info.txt
+ // https://cs.android.com/android/_/android/platform/build/+/80b9546f8f69e78b8fe1870e0e745d70fc18dfcd:core/Makefile;l=5831-5893;drc=077490384423dff9eac954da5c001c6f0be3fa6e;bpv=0;bpt=0
+ builder.Command().Textf("cp").Input(fastbootInfo).Textf(" %s/META/fastboot-info.txt", targetFilesDir.String())
+ }
+
+ if a.partitionProps.Super_partition_name != nil {
+ superPartition := ctx.GetDirectDepProxyWithTag(*a.partitionProps.Super_partition_name, superPartitionDepTag)
+ if info, ok := android.OtherModuleProvider(ctx, superPartition, SuperImageProvider); ok {
+ // dynamic_partitions_info.txt
+ // TODO (b/390192334): Add `building_super_empty_partition=true`
+ builder.Command().Text("cp").Input(info.DynamicPartitionsInfo).Textf(" %s/META/", targetFilesDir.String())
+ } else {
+ ctx.ModuleErrorf("Super partition %s does set SuperImageProvider\n", superPartition.Name())
+ }
+ }
}