Member
Thanks Meter 11
Posts: 83
Join Date: Dec 2009
Location: Moreno Valley, CA
|
Automatic Battery calibration
Hey Mikey is there anyway to included the Automatic battery calibration script to your ROM? I think we would all benefit from it since most of us flash your lastest every 3 days or so and would potentially fix some of the battery issues some are having.
Try it ..add these lines to init.post_boot.sh
#Automatic Battery calibration
SLEEP=120
if [ -e /data/.battery-calibrated ] ; then
exit 0
fi
(
while : ; do
LEVEL=$(cat /sys/class/power_supply/battery/capacity)
CUR=$(cat /sys/class/power_supply/battery/batt_current)
if [ "$LEVEL" == "100" ] && [ "$CUR" == "0" ] ; then
log -p i -t battery-calibration "*** LEVEL: $LEVEL CUR: $CUR***: calibrating..."
rm -f /data/system/batterystats.bin
touch /data/.battery-calibrated
exit 0
fi
# log -p i -t battery-calibration "*** LEVEL: $LEVEL CUR: $CUR ***: sleeping for $SLEEP s..."
sleep $SLEEP
done
) &
IF I HELPED U IN ANYWAY,BUY ME SOME HOT POCKETS....THANKS!!!
https://www.paypal.com/cgi-bin/websc...if%3aNonHosted
|