Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d09cd23 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

PackageManager: Limit the platform-key protection to test-keys builds

This block (change I7390b3bdf5289411f7a335c69635bed9f74bbfb3) is intended
to protect the system from abuse of well-known keys. That's not the case
if the system is signed with dev or release keys.

Change-Id: Ifb66f775dd28c577447634ae177442732a18b592
parent 02f73a57
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4058,7 +4058,8 @@ public class PackageManagerService extends IPackageManager.Stub {
            return null;
        }

        if (!pkg.applicationInfo.sourceDir.startsWith(Environment.getRootDirectory().getPath()) &&
        if (Build.TAGS.equals("test-keys") &&
                !pkg.applicationInfo.sourceDir.startsWith(Environment.getRootDirectory().getPath()) &&
                !pkg.applicationInfo.sourceDir.startsWith("/vendor")) {
            Object obj = mSettings.getUserIdLPr(1000);
            Signature[] s1 = null;