From 0284ed43ebf95d17ab3d395857f782e212b3d705 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Sat, 8 Mar 2025 00:43:08 +0000 Subject: 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 --- filesystem/android_device.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'filesystem/android_device.go') diff --git a/filesystem/android_device.go b/filesystem/android_device.go index 7387c8ab7..6b8af741d 100644 --- a/filesystem/android_device.go +++ b/filesystem/android_device.go @@ -942,7 +942,9 @@ func (a *androidDevice) buildApkCertsInfo(ctx android.ModuleContext, allInstalle 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)) -- cgit v1.2.3-59-g8ed1b