Harcode partition info of apk-in-apex for apkcerts.txt
`apex` creates an androidmk entry for each apk-in-apex, but does not
add its partition info to `LOCAL_*_SPECIFIC` of these autogenerated
androidmk modules. Therefore partition of apk-in-apex in make is always
"system".
This CL hardcodes the partition of these modules to "system" when
building with Soong as well.
Bug: 399788149
Test: Verified that these diff disappears
< name="CompOSPayloadApp.apk" certificate="build/make/target/product/security/testkey.x509.pem" private_key="build/make/target/product/security/testkey.pk8" partition="system"
Change-Id: I8a0d32e69fae8a30e7612a0e017d218b6db5f083
---
> name="CompOSPayloadApp.apk" certificate="build/make/target/product/security/testkey.x509.pem" private_key="build/make/target/product/security/testkey.pk8" partition="system_ext"
Test: The files are now bit-identical
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 7387c8a..6b8af74 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -942,7 +942,9 @@
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 {
- apkCerts = append(apkCerts, formatLine(certInfo.Certificate, certInfo.InstallApkName+".apk", partition))
+ // Partition information of apk-in-apex is not exported to the legacy Make packaging system.
+ // Hardcode the partition to "system"
+ apkCerts = append(apkCerts, formatLine(certInfo.Certificate, certInfo.InstallApkName+".apk", "system"))
}
} else if info, ok := android.OtherModuleProvider(ctx, installedModule, java.RuntimeResourceOverlayInfoProvider); ok {
apkCerts = append(apkCerts, formatLine(info.Certificate, info.OutputFile.Base(), partition))