diff options
author | Marat Dukhan <marat@fb.com> | 2017-11-28 01:34:28 +0300 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2017-11-28 01:34:28 +0300 |
commit | 5315276ab0f31d65dc08b97d263862519a0df803 (patch) | |
tree | 3a9ccef545d25d6936219f76e2521a34b6e99048 /scripts | |
parent | e009ce826df331c0629e6ba42c1fab36356f65f5 (diff) |
Improved Android dump script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/android-filesystem-dump.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/android-filesystem-dump.py b/scripts/android-filesystem-dump.py index c0c5d45..fa21045 100755 --- a/scripts/android-filesystem-dump.py +++ b/scripts/android-filesystem-dump.py @@ -139,6 +139,10 @@ def adb_getprop(): prop = prop.strip() if prop: key, value = tuple(map(string.strip, prop.split(":", 1))) + assert key.startswith("[") and key.endswith("]") + key = key[1:-1] + assert value.startswith("[") and value.endswith("]") + value = value[1:-1] properties_list.append((key, value)) return properties_list @@ -170,6 +174,8 @@ def main(args): options = parser.parse_args(args) dmesg_content = adb_shell(["dmesg"]) + if dmesg_content is not None and dmesg_content.strip() == "klogctl: Operation not permitted": + dmesg_content = None if dmesg_content is not None: with open(os.path.join("test", "dmesg", options.prefix + ".log"), "w") as dmesg_dump: dmesg_dump.write(dmesg_content) |