一 抓取WinScope命令
# WindowManager: 使用命令
adb shell cmd window tracing start
adb shell cmd window tracing stop
# SurfaceFlinger: 使用命令
adb shell su root service call SurfaceFlinger 1025 i32 1
adb shell su root service call SurfaceFlinger 1025 i32 0
执行命令后,生成winscope文件并导出
adb pull /data/misc/wmtrace/wm_trace.winscope .
二 查看WinScope文件
- 打开编译好的winscope html文件,
- 导入wm_trace.winscope
- 显示效果