Here's a script you can place on the sdcard and run from there once you
chmod it.
Currently, I can't seem to connect adb over wifi (bug 1179144 ). Anyways,
here's the script:
INTERVAL=1
CAPACITYVOLTAGE=0
while true; do
PREVVOLTAGE=$CAPACITYVOLTAGE
DATETIME=$(date +'%Y/%m/%d|%H:%M:%S')
CAPACITYVOLTAGE="$(( $(cat
/sys/devices/qpnp-charger-f612e800/power_supply/battery/voltage_now) / 1000
))"
CAPACITYPERCENT="$(cat
/sys/devices/qpnp-charger-f612e800/power_supply/battery/capacity)"
DISCHARGE="+$(( $CAPACITYVOLTAGE - $PREVVOLTAGE ))"
TEMP="$(( $(cat
/sys/devices/qpnp-charger-f612e800/power_supply/battery/temp) / 10 ))"
echo "${DATETIME}|$(echo
${DISCHARGE})mA|${CAPACITYPERCENT}%|${CAPACITYVOLTAGE}mV|${TEMP}°C"
sleep ${INTERVAL}
done
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g