Android14 抓取WinScope

204 阅读1分钟

一 抓取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文件

  1. 打开编译好的winscope html文件, image.png
  2. 导入wm_trace.winscope image.png
  3. 显示效果 image.png