diff --git a/debuggerd/Android.mk b/debuggerd/Android.mk index 1fc850f38..155b30936 100644 --- a/debuggerd/Android.mk +++ b/debuggerd/Android.mk @@ -120,6 +120,7 @@ debuggerd_shared_libraries := \ libbacktrace \ libbase \ libcutils \ + liblog debuggerd_c_includes := \ $(LOCAL_PATH)/test \ diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp index c87182e88..e2461c0c6 100644 --- a/debuggerd/tombstone.cpp +++ b/debuggerd/tombstone.cpp @@ -32,13 +32,13 @@ #include #include -#include #include #include #include #include #include #include +#include #include @@ -622,9 +622,7 @@ static void dump_logs(log_t* log, pid_t pid, unsigned int tail) { static void dump_crash(log_t* log, BacktraceMap* map, pid_t pid, pid_t tid, const std::set& siblings, uintptr_t abort_msg_address) { // don't copy log messages to tombstone unless this is a dev device - char value[PROPERTY_VALUE_MAX]; - property_get("ro.debuggable", value, "0"); - bool want_logs = (value[0] == '1'); + bool want_logs = __android_log_is_debuggable(); _LOG(log, logtype::HEADER, "*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n");