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
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 4b615bc..406f47c 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -57,6 +57,8 @@
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 @@
}
}
+ 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").