Lines Matching refs:battery
12 # times. It will detect if it is in a low battery situation and wait for it to
62 # Blocks until battery level is at least
76 local battery
78 log_print "checking battery level"
79 while [ "$battery" = "" ]; do
80 battery=`$ADB -s $device shell dumpsys battery | tr -d '\r' | awk '/level:/ {print $2}'`
83 if [ $battery -lt $LIMIT ]; then
84 log_print "Battery is low, waiting for charge"
86 battery=`$ADB -s $device shell dumpsys battery | tr -d '\r' | awk '/level:/ {print $2}'`
87 if (( $battery >= $TARGET )); then break; fi
88 tick=$[$TARGET - $battery]
89 echo "battery charge level is $battery, sleeping for $tick seconds"
90 sleep $[$TARGET - $battery * 10]
92 log_print "resuming test run with battery level at $battery%"
94 log_print "resuming test run with battery level at $battery%"