#!/bin/bash function send { adb shell dumpsys battery set level $1 } while [ True ]; do for i in {1..100}; do send $i done for i in {100..1}; do send $i done done