Merge "Only allow ROOT'ed ADB to run unit tests ignoring certificates." into tm-dev am: 4be480315a am: f94ce89ce9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16987854 Change-Id: I881fb1503f1168a03974e00b8c44359dbe001c27
This commit is contained in:
@@ -14332,7 +14332,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");
|
||||
|
||||
Reference in New Issue
Block a user