Documented how to use system service dumper.

Test: m services
Bug: 163921395

Change-Id: I87cde223291b1a6a86ba66d391832d8eef95bfa9
This commit is contained in:
Felipe Leme
2021-09-23 11:34:49 -07:00
parent 1a1c6c87f6
commit cb2a476752
2 changed files with 17 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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")