| Index: build/android/pylib/android_commands.py
|
| diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
|
| index b734d17597838541dbda1a12527f05949a2d9eac..3dbe870deeffe55a0b71a16d39a63a556290eab7 100644
|
| --- a/build/android/pylib/android_commands.py
|
| +++ b/build/android/pylib/android_commands.py
|
| @@ -652,7 +652,8 @@ class AndroidCommands(object):
|
| # possible without using a private (local) adb_shell instance (to ensure no
|
| # other command interleaves usage of it), which would defeat the main aim of
|
| # being able to reuse the adb shell instance across commands.
|
| - def RunShellCommand(self, command, timeout_time=20, log_result=False):
|
| + def RunShellCommand(self, command, timeout_time=20, log_result=False,
|
| + skip_check=False):
|
| """Send a command to the adb shell and return the result.
|
|
|
| Args:
|
| @@ -666,7 +667,8 @@ class AndroidCommands(object):
|
| Returns:
|
| list containing the lines of output received from running the command
|
| """
|
| - self._CheckCommandIsValid(command)
|
| + if not skip_check:
|
| + self._CheckCommandIsValid(command)
|
| self._LogShell(command)
|
| if "'" in command:
|
| logging.warning(command + " contains ' quotes")
|
| @@ -682,7 +684,7 @@ class AndroidCommands(object):
|
| return result
|
|
|
| def GetShellCommandStatusAndOutput(self, command, timeout_time=20,
|
| - log_result=False):
|
| + log_result=False, skip_check=False):
|
| """See RunShellCommand() above.
|
|
|
| Returns:
|
| @@ -1100,8 +1102,10 @@ class AndroidCommands(object):
|
| i += 1
|
| return self.GetExternalStorage() + '/' + base_name % i
|
|
|
| - def RunShellCommandWithSU(self, command, timeout_time=20, log_result=False):
|
| - return self.RunShellCommand('su -c %s' % command, timeout_time, log_result)
|
| + def RunShellCommandWithSU(self, command, timeout_time=20, log_result=False,
|
| + skip_check='False'):
|
| + return self.RunShellCommand('su -c %s' % command, timeout_time, log_result,
|
| + skip_check)
|
|
|
| def CanAccessProtectedFileContents(self):
|
| """Returns True if Get/SetProtectedFileContents would work via "su".
|
|
|