Hi @direc85 ,
This is a little more info on the 10V community port. Sorry for not feeding back faster. I hope you have not yet made an effort into incorporating the proposed charging solution that I posted about previously. The detail in this post has been discussed briefly on the 10V community port forum topic. Importantly, the learning in this post, and the 10V thread, is the result of many peoples work and effort.
Further testing after my initial report revealed that using /sys/class/battchg_ext/smart_charging_interruption to suspend charging doesn’t work. It turned out a kernel watchdog resets this back to it’s default value every 30 minutes. So altering the value, stops the charging, but only for 30 minutes.
We also tried to use /sys/class/power_supply/battery/input_current_limit to suspend charging. Which was initially effective. But this too was reset by the same watchdog after 30 minutes had lapsed.
As it turns out, charging can be suspended by using both /sys/class/qcom-battery/restrict_chg (setting to 1 activates the restricted current value set next, 0 is default) and /sys/class/qcom-battery/restrict_cur (setting it to 0 sets a charge current of 0, 1000000 is default). The good news is that the watchdog does not touch these settings, so they can be used permanently - no resetting after 30 minutes.
In the case of batterybuddy, is it easy enough to use two files to stop charging? I am not sure. But @sharks took this further to ensure the inbuilt battery ageing protection works.
The community port of the 10V now has a helper script, inbuilt into the port, to suspend charging with the above restrict_chg and restrict_cur settings:
echo 1 > /run/qcom-charge-control/trigger suspends charging, and,
echo 0 > /run/qcom-charge-control/trigger allows charging to resume.
This methodology is not effected by the watchdog, and seems to be reliable. It has been tested now for ~ 1 week by a couple of people. So I think this is a solution that actually works - unlike my previous suggestion.
This helper file will be only on the 10V community port devices, not the official port devices. The devices do identify themselves differently I believe. ssu s reveals Device model: Xperia 10 V (xqdc72 / community). Hopefully that can help you include these changes just for the zambezi community port.
Let me know if any further information is required, otherwise I do help you can add support for this phone to batterybuddy when you get some time.
Thanks again for the work on a great app, and possibly including these changes in the future.