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

Commit 9c049147 authored by Eric Lin's avatar Eric Lin
Browse files

Update Protolog commands in the doc.

Bug: 378565144
Bug: 387193964
Flag: EXEMPT doc only update
Test: Run protologs commands on device
Change-Id: Iea2b921fd94b25f5629273519c951e5f5a1d315d
parent 56f93335
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
# Window Manager Shell Readme

go/wmshell

The following docs present more detail about the implementation of the WMShell library (in no
particular order):

+9 −9
Original line number Diff line number Diff line
@@ -35,24 +35,24 @@ using ProtoLogging in Kotlin does not provide the same memory gains as in Java,
slightly less performant due to additional string interning at runtime.

### Enabling ProtoLog command line logging
Run these commands to enable protologs (in logcat) for WM Core ([list of all core tags](/core/java/com/android/internal/protolog/ProtoLogGroup.java)):
Run these commands to enable protologs (in logcat) for WM Core ([list of all core groups](/core/java/com/android/internal/protolog/WmProtoLogGroups.java)) or WM Shell ([list of all shell groups](/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java)):
```shell
adb shell wm logging enable-text TAG
adb shell wm logging disable-text TAG
# Note: prior to 25Q2, you may need to use:
#   adb shell dumpsys activity service SystemUIService WMShell protolog enable-text TAG
adb shell cmd protolog_configuration logcat enable <group>
adb shell cmd protolog_configuration logcat disable <group>
```

And these commands to enable protologs (in logcat) for WM Shell ([list of all shell tags](/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java)):
Use these commands to print protolog groups and their status:
```shell
# Note: prior to 25Q2, you may need to use:
#   adb shell dumpsys activity service SystemUIService WMShell protolog enable-text TAG
adb shell wm shell protolog enable-text TAG
adb shell wm shell protolog disable-text TAG
adb shell cmd protolog_configuration groups list
adb shell cmd protolog_configuration groups status <group>
```

### R8 optimizations & ProtoLog

If the APK that the Shell library is included into has R8 optimizations enabled, then you may need
to update the proguard flags to keep the generated protolog classes (ie. AOSP SystemUI's [proguard.flags](base/packages/SystemUI/proguard_common.flags)).
to update the proguard flags to keep the generated protolog classes (ie. AOSP SystemUI's [proguard.flags](/packages/SystemUI/proguard_common.flags)).

## Winscope Tracing