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

Commit 4be48031 authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Only allow ROOT'ed ADB to run unit tests ignoring certificates." into tm-dev

parents 4b29570d cb5d61b4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -14330,7 +14330,8 @@ public class ActivityManagerService extends IActivityManager.Stub
            int match = mContext.getPackageManager().checkSignatures(
                    ii.targetPackage, ii.packageName);
            if (match < 0 && match != PackageManager.SIGNATURE_FIRST_NOT_SIGNED) {
                if (Build.IS_DEBUGGABLE && (flags & INSTR_FLAG_ALWAYS_CHECK_SIGNATURE) == 0) {
                if (Build.IS_DEBUGGABLE && (callingUid == Process.ROOT_UID)
                        && (flags & INSTR_FLAG_ALWAYS_CHECK_SIGNATURE) == 0) {
                    Slog.w(TAG, "Instrumentation test " + ii.packageName
                            + " doesn't have a signature matching the target " + ii.targetPackage
                            + ", which would not be allowed on the production Android builds");