Split provider / service dumpsys into platform and non-platform
Also extend the timeout to 60 seconds.
- Because each provider / service dump may time out, the total time should relatively be large.
Bug: 78017892
Fix: 78017892
Test: Manual test with the following dumpsys commands:
dumpsys activity provider all
dumpsys activity provider all-platform
dumpsys activity provider all-nonplatform
dumpsys activity provider com.android.providers.contacts/com.android.providers.contacts.VoicemailContentProvider
dumpsys activity provider com.android.providers.contacts/.VoicemailContentProvider
dumpsys activity provider contacts
dumpsys activity provider voicemail
dumpsys activity provider 4d45a78
dumpsys activity service all
dumpsys activity service all-platform
dumpsys activity service all-nonplatform
dumpsys activity service bluetooth
Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/DumpTest.java
Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/ParseUtilsTest.java
Test: Manual test with "adb bugreport" with adding sleep(10s) to ProviderMap.dumpProvider()
Change-Id: If1639e6961e49265f7f9e59b1e370acdff584989
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 19bf216..c929e35 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -1432,19 +1432,40 @@
printf("== Running Application Activities\n");
printf("========================================================\n");
- RunDumpsys("APP ACTIVITIES", {"activity", "-v", "all"});
+ // The following dumpsys internally collects output from running apps, so it can take a long
+ // time. So let's extend the timeout.
+
+ const CommandOptions DUMPSYS_COMPONENTS_OPTIONS = CommandOptions::WithTimeout(60).Build();
+
+ RunDumpsys("APP ACTIVITIES", {"activity", "-v", "all"}, DUMPSYS_COMPONENTS_OPTIONS);
printf("========================================================\n");
- printf("== Running Application Services\n");
+ printf("== Running Application Services (platform)\n");
printf("========================================================\n");
- RunDumpsys("APP SERVICES", {"activity", "service", "all"});
+ RunDumpsys("APP SERVICES PLATFORM", {"activity", "service", "all-platform"},
+ DUMPSYS_COMPONENTS_OPTIONS);
printf("========================================================\n");
- printf("== Running Application Providers\n");
+ printf("== Running Application Services (non-platform)\n");
printf("========================================================\n");
- RunDumpsys("APP PROVIDERS", {"activity", "provider", "all"});
+ RunDumpsys("APP SERVICES NON-PLATFORM", {"activity", "service", "all-non-platform"},
+ DUMPSYS_COMPONENTS_OPTIONS);
+
+ printf("========================================================\n");
+ printf("== Running Application Providers (platform)\n");
+ printf("========================================================\n");
+
+ RunDumpsys("APP PROVIDERS PLATFORM", {"activity", "provider", "all-platform"},
+ DUMPSYS_COMPONENTS_OPTIONS);
+
+ printf("========================================================\n");
+ printf("== Running Application Providers (non-platform)\n");
+ printf("========================================================\n");
+
+ RunDumpsys("APP PROVIDERS NON-PLATFORM", {"activity", "provider", "all-non-platform"},
+ DUMPSYS_COMPONENTS_OPTIONS);
printf("========================================================\n");
printf("== Dropbox crashes\n");