summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-01-09 18:11:59 +0000
committer Spandan Das <spandandas@google.com> 2025-01-10 00:32:29 +0000
commite51ff957ad1fb2ecc03d82e293069c764c014c3c (patch)
treee2e70201dffff69547953f0095ccde8eb19ab7f3 /filesystem/android_device.go
parent41692ce4861588107d0db45dae059f53c6405c01 (diff)
Add android-info.txt to OTA/ subdir of target_files.zip
This information will be provided by an explicit `Android_info` property on `andorid_device`. An alternative would be to propagate this information from vendor_partition dependency, but that might run into issues if android_info.txt is no longer used a prop file input for building vendor's build.prop file Test: diff'd target_files.zip of make and soong Fixes: 388633397 Change-Id: Iaacffd0526b6ce7a7ce1566774753d4e20d9f9a2
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 4b615bc51..406f47cbe 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -57,6 +57,8 @@ type PartitionNameProperties struct {
type DeviceProperties struct {
// Path to the prebuilt bootloader that would be copied to PRODUCT_OUT
Bootloader *string `android:"path"`
+ // Path to android-info.txt file containing board specific info.
+ Android_info *string `android:"path"`
}
type androidDevice struct {
@@ -231,6 +233,11 @@ func (a *androidDevice) buildTargetFilesZip(ctx android.ModuleContext) {
}
}
+ if a.deviceProps.Android_info != nil {
+ builder.Command().Textf("mkdir -p %s/OTA", targetFilesDir)
+ builder.Command().Textf("cp %s %s/OTA/android-info.txt", android.PathForModuleSrc(ctx, proptools.String(a.deviceProps.Android_info)), targetFilesDir)
+ }
+
builder.Command().
BuiltTool("soong_zip").
Text("-d").