Index: tools/telemetry/telemetry/core/backends/chrome/android_browser_backend.py |
diff --git a/tools/telemetry/telemetry/core/backends/chrome/android_browser_backend.py b/tools/telemetry/telemetry/core/backends/chrome/android_browser_backend.py |
index a0d6dcc7e0f58ac21f16d7f5c2c789f5833c5e15..09d21c54bc5f9e044a0a61dc55baa1f1275943dc 100644 |
--- a/tools/telemetry/telemetry/core/backends/chrome/android_browser_backend.py |
+++ b/tools/telemetry/telemetry/core/backends/chrome/android_browser_backend.py |
@@ -207,9 +207,7 @@ class AndroidBrowserBackend(chrome_browser_backend.ChromeBrowserBackend): |
def _SetCommandLineFile(self, file_contents): |
def IsProtectedFile(name): |
if self._adb.Adb().FileExistsOnDevice(name): |
- ls_output = self._adb.RunShellCommand('ls -l %s' % name)[0] |
- return ls_output == 'opendir failed, Permission denied' or \ |
- ls_output.split()[1] == 'root' |
+ return not self._adb.Adb().IsFileWritableOnDevice(name) |
else: |
parent_name = os.path.dirname(name) |
if parent_name != '': |