diff --git a/cmds/idmap2/libidmap2/ResourceMapping.cpp b/cmds/idmap2/libidmap2/ResourceMapping.cpp index 122f0682aec6c6cfbd8024e912a5f95fbe0c6bb1..31f1c16ba5a68cb290fdfb90919cbc33990527b8 100644 --- a/cmds/idmap2/libidmap2/ResourceMapping.cpp +++ b/cmds/idmap2/libidmap2/ResourceMapping.cpp @@ -71,9 +71,9 @@ Result<Unit> CheckOverlayable(const LoadedPackage& target_package, if (!target_package.DefinesOverlayable()) { return (sDefaultPolicies & fulfilled_policies) != 0 ? Result<Unit>({}) - : Error( - "overlay must be preinstalled or signed with the same signature as the " - "target"); + : Error("overlay must be preinstalled, signed with the same signature as the target," + " or signed with the same signature as the package referenced through" + " <overlay-config-signature>."); } const OverlayableInfo* overlayable_info = target_package.GetOverlayableInfo(target_resource); diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java index 4fc66bc802f3e256c3b7c4316eda0ee9fac3edf8..d6e2c2f6d78367f683d31df6d7b7e45732f16044 100644 --- a/core/java/com/android/server/SystemConfig.java +++ b/core/java/com/android/server/SystemConfig.java @@ -243,7 +243,7 @@ public class SystemConfig { // partition that is used to verify if an overlay package fulfills // the 'config_signature' policy by comparing their signatures: // if the overlay package is signed with the same certificate as - // the package declared in 'config-signature' tag, then the + // the package declared in 'overlay-config-signature' tag, then the // overlay package fulfills the 'config_signature' policy. private String mOverlayConfigSignaturePackage; diff --git a/services/core/java/com/android/server/om/IdmapManager.java b/services/core/java/com/android/server/om/IdmapManager.java index cb6e960b721de38b3158df45bd1c53d2ca9063a3..eeb26552e63dac9c46281e38a22814b667bacd05 100644 --- a/services/core/java/com/android/server/om/IdmapManager.java +++ b/services/core/java/com/android/server/om/IdmapManager.java @@ -57,7 +57,7 @@ final class IdmapManager { private final PackageManagerHelper mPackageManager; /** - * Package name of the reference package defined in 'config-signature' tag of + * Package name of the reference package defined in 'overlay-config-signature' tag of * SystemConfig or empty String if tag not defined. This package is vetted on scan by * PackageManagerService that it's a system package and is used to check if overlay matches * its signature in order to fulfill the config_signature policy. @@ -159,7 +159,7 @@ final class IdmapManager { fulfilledPolicies |= OverlayablePolicy.ACTOR_SIGNATURE; } - // If SystemConfig defines 'config-signature' package, given that + // If SystemConfig defines 'overlay-config-signature' package, given that // this package is vetted by OverlayManagerService that it's a // preinstalled package, check if overlay matches its signature. if (!TextUtils.isEmpty(mConfigSignaturePackage) diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index fddd46a9c026b01f7eb7aa02b8e2f40c889a815a..373c052dca04f27f736afa3fdaad14256ec84d85 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -12161,9 +12161,10 @@ public class PackageManagerService extends IPackageManager.Stub // A non-preloaded overlay package, without <overlay android:targetName>, will // only be used if it is signed with the same certificate as its target OR if // it is signed with the same certificate as a reference package declared - // in 'config-signature' tag of SystemConfig. - // If the target is already installed or 'config-signature' tag in SystemConfig - // is set, check this here to augment the last line of defence which is OMS. + // in 'overlay-config-signature' tag of SystemConfig. + // If the target is already installed or 'overlay-config-signature' tag in + // SystemConfig is set, check this here to augment the last line of defense + // which is OMS. if (pkg.getOverlayTargetName() == null) { final PackageSetting targetPkgSetting = mSettings.getPackageLPr(pkg.getOverlayTarget());