Don't charge to 100% when always-on wall-plugged-in I want to use a Google Nexus phone for an always-on wall-plugged-in WiFi tethering access station.

It occurred to me that if I just do it like this, then I'm risking ruining the battery within a couple of months, and the battery becoming useless, potentially leaving the phone permanently handicapped to a wall-plug operation, and within a year or two, going as far as requiring an external UPS for power-outage situations, too.

Is there a solution to start charging when below 40% or 50%, and stop charging at 60% to 80%?
If you're needing it as always-on wall plugged you will probably need to stick with that. However newer devices stop charge when 100% and then recharge back from ~95%.

Answer here: How to stop an android device from being charged programmatically? Says that you simply can't use any software to stop the charging.