Change battery meter behavior I heard that charging li-ion batteries to less voltage value heavily increases number of (charge-discharge) cycles, while decreasing phone work time(energy return from charge) only for a little.



Charging only a half of capacity increases number of charges 3x, so there is 1.5x outcome in energy that i could get from battery for its life. I have 5000 mAh battery, and a huge power bank. It is very big capacity, and i am ready to sacrifice some working time to prolong battery life for years as much as possible.

So for now it could charge to 4.2V to 100%, and i want to "reconfigure" or "recalibrate" BMS. It should "think" for example that 3.9V is 100% charge and stop charging it, and 3.6V is a 0% and is a device shutdown voltage.

How to set this in Android?
For starters your device needs to be rooted ( see rooting ) 

One way could be to fool the system by pretending you have a smaller mAh capacity battery so that it stops charging prematurely (relative to actual capacity) but that's tough because the battery capacity files are hard coded into the kernel, so you need to "cook" your kernel. See
 Where are the battery capacity files located?

Practical alternative is to stop charging at a level that matches your desired voltage.


You can do it the hard way. See
Automatically limit (stop) battery charging at a given percentage


Or 


Easier way. See How to limit charging to 60%


Also see Ideal charging / discharging percentage for maximum battery life?

Rather than actually figuring out the voltage levels at which you want to charge / shutdown , it is easier to go by battery charged level and stop charging