summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2023-01-24 15:09:59 -0800
committer Hongwei Wang <hwwang@google.com> 2023-01-31 15:37:18 -0800
commit392291386dd80f88f55870aaa6fbec83eea45d06 (patch)
tree8778a371c735300db35c46fd5f2aa66a017efc9f
parent1d104209a2f9958241459813a5cb48f254699ac2 (diff)
Include WMShell protolog in bug-report
When generating the bug-report, dumpstate will now issue a "save-for-bugreport" command to the WMShell and WMShell flashes the proto logging file to /data/misc/wmtrace if it's enabled. /data/misc/wmtrace is included in the final bug-report. Bug: 251513116 Test: adb bugreport Ignore-AOSP-First: resolve merge conflict on master first Change-Id: I2f48511868a871a290ca38126c4a4c3016169db4
-rw-r--r--cmds/dumpstate/dumpstate.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index d77b45800d..c06a714b6a 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -3270,6 +3270,15 @@ void Dumpstate::MaybeSnapshotUiTraces() {
return;
}
+ // Include the proto logging from WMShell.
+ RunCommand(
+ // Empty name because it's not intended to be classified as a bugreport section.
+ // Actual logging files can be found as "/data/misc/wmtrace/shell_log.winscope"
+ // in the bugreport.
+ "", {"dumpsys", "activity", "service", "SystemUIService",
+ "WMShell", "protolog", "save-for-bugreport"},
+ CommandOptions::WithTimeout(10).Always().DropRoot().RedirectStderr().Build());
+
// Currently WindowManagerService and InputMethodManagerSerivice support WinScope protocol.
for (const auto& service : {"input_method", "window"}) {
RunCommand(