Merge "Allow ROOT_UID to execute privileged shell cmds"
diff --git a/src/com/android/phone/TelephonyShellCommand.java b/src/com/android/phone/TelephonyShellCommand.java
index 6cec56c..9250118 100644
--- a/src/com/android/phone/TelephonyShellCommand.java
+++ b/src/com/android/phone/TelephonyShellCommand.java
@@ -450,6 +450,8 @@
}
private boolean checkShellUid() {
- return Binder.getCallingUid() == Process.SHELL_UID;
+ // adb can run as root or as shell, depending on whether the device is rooted.
+ return Binder.getCallingUid() == Process.SHELL_UID
+ || Binder.getCallingUid() == Process.ROOT_UID;
}
}