mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
contrib: script to sample 20 mins of battery status from android app
This commit is contained in:
23
contrib/app_android-battery-sampler.sh
Executable file
23
contrib/app_android-battery-sampler.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Use wireless debugging with this script
|
||||
# Phone should be fully charged and unplugged
|
||||
|
||||
adb root
|
||||
|
||||
log_elapsed() {
|
||||
now=$(date +%s)
|
||||
elapsed=$(( now - start ))
|
||||
volt=$(adb shell cat /sys/class/power_supply/battery/voltage_now)
|
||||
echo $elapsed, $volt
|
||||
}
|
||||
|
||||
start=$(date +%s)
|
||||
|
||||
for i in $(seq 1 20); do
|
||||
log_elapsed
|
||||
sleep 60
|
||||
done
|
||||
|
||||
log_elapsed
|
||||
|
||||
Reference in New Issue
Block a user