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

Commit cb2a4767 authored by Felipe Leme's avatar Felipe Leme
Browse files

Documented how to use system service dumper.

Test: m services
Bug: 163921395

Change-Id: I87cde223291b1a6a86ba66d391832d8eef95bfa9
parent 1a1c6c87
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ import android.util.IndentingPrintWriter;

/**
 * Interface used to dump {@link SystemServer} state that is not associated with any service.
 *
 * <p>See {@link SystemServer.SystemServerDumper} for usage example.
 */
public interface Dumpable {

+15 −0
Original line number Diff line number Diff line
@@ -645,6 +645,21 @@ public final class SystemServer implements Dumpable {
        TimeUtils.formatDuration(mRuntimeStartElapsedTime, pw); pw.println();
    }

    /**
     * Service used to dump {@link SystemServer} state that is not associated with any service.
     *
     * <p>To dump all services:
     *
     * <pre><code>adb shell dumpsys system_server_dumper</code></pre>
     *
     * <p>To get a list of all services:
     *
     * <pre><code>adb shell dumpsys system_server_dumper --list</code></pre>
     *
     * <p>To dump a specific service (use {@code --list} above to get service names):
     *
     * <pre><code>adb shell dumpsys system_server_dumper --name NAME</code></pre>
     */
    private final class SystemServerDumper extends Binder {

        @GuardedBy("mDumpables")