1#!/bin/bash
2
3# The files to save output to.
4RAWLOGS_FILE=short-idle-rawlogs.txt
5ANALYSIS_FILE=short-idle-analysis.txt
6
7# Turn on the screen and unlock the device
8# TODO: Power on
9adb shell wm dismiss-keyguard
10
11# Start the analysis process
12$TOP/development/tools/logblame/analyze_logs.py --duration=5m --clear --rawlogs $RAWLOGS_FILE \
13    | tee $ANALYSIS_FILE &
14analyze_pid=$!
15
16# Wait for the pyton process to exit
17echo "waiting... analyze_pid" $analyze_pid
18wait $analyze_pid
19
20echo "Wrote raw logs to $RAWLOGS_FILE"
21echo "Wrote analysis to $ANALYSIS_FILE"
22
23
24