| Index: build/android/pylib/android_commands.py
|
| diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
|
| index 7470081459e88a26f20fed135dd650e46ba11bfc..923ebe7c3e9ca14909b148913e09a655c305039c 100644
|
| --- a/build/android/pylib/android_commands.py
|
| +++ b/build/android/pylib/android_commands.py
|
| @@ -355,8 +355,15 @@ class AndroidCommands(object):
|
| Returns:
|
| True if device is in 'device' mode, False otherwise.
|
| """
|
| - out = self._adb.SendCommand('get-state')
|
| - return out.strip() == 'device'
|
| + # TODO(aurimas): revert to using adb get-state when android L adb is fixed.
|
| + #out = self._adb.SendCommand('get-state')
|
| + #return out.strip() == 'device'
|
| +
|
| + out = self._adb.SendCommand('devices')
|
| + for line in out.split('\n'):
|
| + if self._device in line and 'device' in line:
|
| + return True
|
| + return False
|
|
|
| def IsRootEnabled(self):
|
| """Checks if root is enabled on the device."""
|
|
|