2

As far as I know, LiIon batteries should be kept in about 40%-80% range in order to degrade more slowly.

On my laptop I use the following commands to make it change battery conditionally, only when it's lower than 45% and up to 90% instead of to 100%:

tpacpi-bat -v -s ST 1 45
tpacpi-bat -v -s SP 1 90

How do I do the same for Android? I can control the charger from software, so it should be definitely possible.

Device: Huawei Honor 6 (H60-L04)

Vi0
  • 1,665
  • 7
  • 23
  • 43

1 Answers1

1

I managed to do it for the same device cutting off charging at am upper level. How do I override charging current on Huawei Honor 6? Surely something on those lines can be implemented for lower l level maybe a macro to shutdown the phone ( too drastic) or sound alarms and send text messages or mails if you are not close to the phone Hope this helps

beeshyams
  • 40,739
  • 30
  • 119
  • 269
  • I'll probably write a program that periodically polls current charge level and does echo 0 > enable_charger automatically. – Vi0 Oct 29 '15 at 12:17
  • @Vi0 :-) were you able to echo 0.. I couldn't at all and had to copy paste file. Big thanks to you for pointing that file – beeshyams Oct 29 '15 at 13:29
  • enable_charger is a typical sysfs/proc knob which should be perfectly readable by cat and writable by echo ... > (as root, obviously). – Vi0 Oct 29 '15 at 16:16
  • @Vi0...Thanks..which means I am trying the command with wrong syntax. I am Noob in Linux and took help to try this. May I request you to kindly help write the complete command? Thanks in advance – beeshyams Oct 29 '15 at 17:05
  • For example, I have the following script at host: adb shell 'su -c "echo 0 > /sys/class/hw_power/charger/charge_data/enable_charger"' – Vi0 Oct 29 '15 at 22:29
  • Thanks @Vi0. Looks the the syntax is same as I used ...wonder why it didn't work. Anyway, got the end result but just curious if there are exceptions – beeshyams Oct 30 '15 at 02:01
  • 1
    Have you received a notification of my reply in the chat? (I'm not sure how reliably this "move to chat" feature works). – Vi0 Oct 30 '15 at 15:18
  • 1
    Yes. Received and replied on chat please – beeshyams Oct 30 '15 at 16:03