From 6f009d9496fc060ba76f97348aa0702a62fcf927 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Fri, 5 Jun 2015 16:00:07 -0700 Subject: [PATCH] adb shouldn't trace unless told to Prevents clean unmount of /data in crypto bounce Bug: 21516860 Change-Id: I1f761dfdf216dcb35b4609cd46cc4d0644cc4a81 --- adb/adb.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/adb/adb.cpp b/adb/adb.cpp index ff6a4998b..371525ce5 100644 --- a/adb/adb.cpp +++ b/adb/adb.cpp @@ -190,6 +190,13 @@ static void setup_trace_mask() { } void adb_trace_init(char** argv) { + // Don't open log file if no tracing, since this will block + // the crypto unmount of /data + const std::string trace_setting = get_trace_setting(); + if (trace_setting.empty()) { + return; + } + #if !ADB_HOST if (isatty(STDOUT_FILENO) == 0) { start_device_log();