am 439cdfd0: am af0baad7: Merge "adb shouldn\'t trace unless told to"
* commit '439cdfd0bfa8ee2cf0996f517e61ab9f7d90bdc6':
adb shouldn't trace unless told to
diff --git a/adb/adb.cpp b/adb/adb.cpp
index ff6a499..371525c 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
@@ -190,6 +190,13 @@
}
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();