It’s frustrating when your smartphone runs out of power, and batteries perform worse the older they get.