A more specific example: I bought a 5V solar panel with 700mA output. I hooked it up to a usb cable, shorted the data lines and the phone charges great. Except when the solar panel goes in the shadow, then the rate drops to 0, and when it comes out of the shadow it takes a long time to get the current back up if it's plugged into the phone. During that time the current slowly ramps up from 100mAh to 200mah to 300mah, until eventually it gets back up above 400mA and can actually charge the phone(instead of having the charging circuitry drain it).
What I would like to do is have the phone detect when the current dips below 400mA, then stop charging for 60seconds...try again..and stop if current still below a useful level.
I know I can get the current from /sys/devices/platform/jupiter-battery/power_supply/battery/batt_chg_current, can I use some proc file to also turn charging on/off? Is there an existing app that works for this?