blob: 307a4d8338f9e32a625ad53ff187de188cd676bb [file] [log] [blame]
Vishnu Nair4df8eb62022-02-17 15:32:02 -08001#!/usr/bin/env bash
2
3set -ex
4
5# Build, push and run layertracegenerator
6$ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode layertracegenerator
7adb wait-for-device && adb push $OUT/system/bin/layertracegenerator /data/layertracegenerator
Vishnu Nair63a662a2023-02-22 20:17:18 +00008
9if [ -z "$1" ]
10 then
11 echo "Writing transaction trace to file"
12 adb shell service call SurfaceFlinger 1041 i32 0
13 adb shell /data/layertracegenerator
14 else
15 echo "Pushing transaction trace to device"
16 adb push $1 /data/transaction_trace.winscope
17 adb shell /data/layertracegenerator /data/transaction_trace.winscope
18fi
Vishnu Nair4df8eb62022-02-17 15:32:02 -080019adb pull /data/misc/wmtrace/layers_trace.winscope