summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-20 16:11:36 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-20 16:11:36 -0700
commit29e0a00b2a9010b7b30f004fb9f6a2ad7ea20bcb (patch)
treecb888af41cf7962e5243791334e27beb1d7007b0 /filesystem/android_device.go
parent36e0719e9ef8f0969254c7fd7aac355288e8e63e (diff)
parent8c31132dba8e206387296ec2a9d850832794d9b4 (diff)
Snap for 13248265 from 8c31132dba8e206387296ec2a9d850832794d9b4 to 25Q2-release
Change-Id: If932ac6e530acdff73391ec4a2b3afb3a7adc401
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go25
1 files changed, 23 insertions, 2 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 443e80e67..feb000dc4 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -840,6 +840,15 @@ func (a *androidDevice) addMiscInfo(ctx android.ModuleContext) android.Path {
Textf("echo avb_enable=true >> %s", miscInfo).
Textf("&& echo avb_building_vbmeta_image=true >> %s", miscInfo).
Textf("&& echo avb_avbtool=avbtool >> %s", miscInfo)
+ for _, vbmetaPartitionName := range a.partitionProps.Vbmeta_partitions {
+ img := ctx.GetDirectDepProxyWithTag(vbmetaPartitionName, filesystemDepTag)
+ if provider, ok := android.OtherModuleProvider(ctx, img, vbmetaPartitionProvider); ok {
+ builder.Command().Text("cat").Input(provider.PropFileForMiscInfo).Textf(" >> %s", miscInfo)
+ } else {
+ ctx.ModuleErrorf("vbmeta dep %s does not set vbmetaPartitionProvider\n", vbmetaPartitionName)
+ }
+ }
+
}
if a.partitionProps.Boot_partition_name != nil {
builder.Command().Textf("echo boot_images=boot.img >> %s", miscInfo)
@@ -1046,6 +1055,7 @@ func (a *androidDevice) buildApkCertsInfo(ctx android.ModuleContext, allInstalle
}
apkCerts := []string{}
+ var apkCertsFiles android.Paths
for _, installedModule := range allInstalledModules {
partition := ""
if commonInfo, ok := android.OtherModuleProvider(ctx, installedModule, android.CommonModuleInfoProvider); ok {
@@ -1054,7 +1064,11 @@ func (a *androidDevice) buildApkCertsInfo(ctx android.ModuleContext, allInstalle
ctx.ModuleErrorf("%s does not set CommonModuleInfoKey", installedModule.Name())
}
if info, ok := android.OtherModuleProvider(ctx, installedModule, java.AppInfoProvider); ok {
- apkCerts = append(apkCerts, formatLine(info.Certificate, info.InstallApkName+".apk", partition))
+ if info.AppSet {
+ apkCertsFiles = append(apkCertsFiles, info.ApkCertsFile)
+ } else {
+ apkCerts = append(apkCerts, formatLine(info.Certificate, info.InstallApkName+".apk", partition))
+ }
} else if info, ok := android.OtherModuleProvider(ctx, installedModule, java.AppInfosProvider); ok {
for _, certInfo := range info {
// Partition information of apk-in-apex is not exported to the legacy Make packaging system.
@@ -1075,7 +1089,14 @@ func (a *androidDevice) buildApkCertsInfo(ctx android.ModuleContext, allInstalle
}
}
+ apkCertsInfoWithoutAppSets := android.PathForModuleOut(ctx, "apkcerts_without_app_sets.txt")
+ android.WriteFileRuleVerbatim(ctx, apkCertsInfoWithoutAppSets, strings.Join(apkCerts, "\n")+"\n")
apkCertsInfo := android.PathForModuleOut(ctx, "apkcerts.txt")
- android.WriteFileRuleVerbatim(ctx, apkCertsInfo, strings.Join(apkCerts, "\n")+"\n")
+ ctx.Build(pctx, android.BuildParams{
+ Rule: android.Cat,
+ Description: "combine apkcerts.txt",
+ Output: apkCertsInfo,
+ Inputs: append(apkCertsFiles, apkCertsInfoWithoutAppSets),
+ })
return apkCertsInfo
}