Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e73b7eed authored by Josh Gao's avatar Josh Gao
Browse files

Don't attempt to dump vold on user builds.

Bug: http://b/147446655
Test: treehugger
Change-Id: I799508fa221e9a1d22c864d21b4c7c6cd941630a
parent e4426862
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ static const char* native_processes_to_dump[] = {
        "/system/bin/mediametrics", // media.metrics
        "/system/bin/mediaserver",
        "/system/bin/netd",
        "/system/bin/vold",
        "/system/bin/sdcard",
        "/system/bin/statsd",
        "/system/bin/surfaceflinger",
@@ -44,6 +43,13 @@ static const char* native_processes_to_dump[] = {
        NULL,
};


// Native processes to dump on debuggable builds.
static const char* debuggable_native_processes_to_dump[] = {
        "/system/bin/vold",
        NULL,
};

/* list of hal interface to dump containing process during native dumps */
static const char* hal_interfaces_to_dump[] {
        "android.hardware.audio@2.0::IDevicesFactory",
@@ -103,6 +109,15 @@ bool should_dump_native_traces(const char* path) {
            return true;
        }
    }

    if (android::base::GetBoolProperty("ro.debuggable", false)) {
        for (const char** p = debuggable_native_processes_to_dump; *p; p++) {
            if (!strcmp(*p, path)) {
                return true;
            }
        }
    }

    return false;
}