From 9ec5c2570caa6f5c1623fbd128a7d24dd8724025 Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Tue, 24 Jan 2023 15:09:59 -0800 Subject: 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 Merged-In: I2f48511868a871a290ca38126c4a4c3016169db4 Change-Id: I2f48511868a871a290ca38126c4a4c3016169db4 --- cmds/dumpstate/dumpstate.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cmds/dumpstate/dumpstate.cpp') diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 12de33f2db..00704b63be 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -3244,6 +3244,15 @@ void Dumpstate::MaybeSnapshotSystemTrace() { } void Dumpstate::MaybeSnapshotWinTrace() { + // 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 : {"window", "input_method"}) { RunCommand( -- cgit v1.2.3-59-g8ed1b