Vishnu Nair | 4df8eb6 | 2022-02-17 15:32:02 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -ex |
| 4 | |
| 5 | # Build, push and run layertracegenerator |
| 6 | $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode layertracegenerator |
| 7 | adb wait-for-device && adb push $OUT/system/bin/layertracegenerator /data/layertracegenerator |
Vishnu Nair | 63a662a | 2023-02-22 20:17:18 +0000 | [diff] [blame^] | 8 | |
| 9 | if [ -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 |
| 18 | fi |
Vishnu Nair | 4df8eb6 | 2022-02-17 15:32:02 -0800 | [diff] [blame] | 19 | adb pull /data/misc/wmtrace/layers_trace.winscope |