aboutsummaryrefslogtreecommitdiff
path: root/scripts/android-filesystem-dump.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/android-filesystem-dump.py')
-rwxr-xr-xscripts/android-filesystem-dump.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/android-filesystem-dump.py b/scripts/android-filesystem-dump.py
index 9e2f17c..6014e1b 100755
--- a/scripts/android-filesystem-dump.py
+++ b/scripts/android-filesystem-dump.py
@@ -246,9 +246,10 @@ def adb_pull(device_path, local_path):
if any(device_path.startswith(prefix) for prefix in SHELL_PREFIX):
content = adb_shell(["cat", device_path])
if content is not None:
- with open(local_path, "wb") as local_file:
- local_file.write(content)
- return content is not None
+ if not content.rstrip().endswith("No such file or directory"):
+ with open(local_path, "wb") as local_file:
+ local_file.write(content)
+ return True
else:
env = os.environ.copy()
env["LC_ALL"] = "C"