adb shell "atrace -c -t 15 sched freq idle am wm gfx view binder_driver hal dalvik camera input res gfx view wm am ss video camera hal res sync idle binder_driver binder_lock ss --async_start"
adb shell atrace --async_stop-z-c-o /sdcard/atrace_normal.atrace
adb pull /sdcard/atrace_normal.atrace
方式2
touch systtrace-capture.sh
# 加入以下指令,../google-android12/为源码位置#!/system/bin/sh../google-android12/external/perfetto/tools/record_android_trace -o$(date +%Y%m%d_%H%M%S)_trace_file.perfetto-trace -t 15s -b 32mb sched freq idle am wm gfx view binder_driver hal dalvik camera input res memory gfx view wm am ss video camera hal res sync idle binder_driver binder_lock ss
~
#执行,等待完成后自动打开sh systtrace-capture.sh