What causes iPhone low battery crashes? Is there a software fix? Some iPhone users (especially those with devices that've been in use for a while) encounter a problem where the device crashes once the battery gets low. For example:


  
  "After updating to iOS 7 my iPhone 5 has been doing something strange.
  When the battery gets low (usually around 20-30%), iOS will shut down
  completely, and when you try to power the phone back on it flashes on
  the screen telling you to plug the phone in to charge it (saying that
  the battery is almost completely dead).   The phone refuses to power
  on until you plug it in, but once I plug the phone in and power it
  back on, the battery life shows the last percentage it was at before
  it crashed (20-30%). This has happened to me more than once, so I know
  it's not just some crazy fluke."
  https://discussions.apple.com/message/23587500#23587500
  "I have a 3GS that is almost 2 years old now and had a hard life. It
  has now developed a tendency to crash when the battery gets below 25%.
  it will restart using the top button ok but as soon as you put any
  strain on the battery it crashes when at this low level. When the
  phone is charged it seems to work fine."
  http://forums.macrumors.com/showthread.php?t=1139488
  "I have a weird problem with my iPhone 5. My phone switches off when
  the battery is low. I was at 23% charge and just browsing facebook
  when my battery died. The other day I was at 13% charge and it
  switched off. Last week 17%.. It refuses to switch back on until it
  was plugged into the wall. I have tried restoring the phone and set up
  as new but I still have the same problem. It just seems to switch off
  when the battery is low at different percentages."
  https://discussions.apple.com/message/22284705#22284705
  


It seems to happen on various model iPhones and versions of the OS; it's currently happening to me on a heavily used two year old 4S running iOS 6.1.1.

TidBITS suggests that:


  "The common element in these crashes is low battery life, usually under 20 percent, although one crash occurred at almost 30 percent. When I give the iPhone power, it restarts immediately and shows the expected amount of battery life remaining. So it’s not that the battery is actually running out; instead, [iOS's] power management code is freaking out once the battery level falls to around 20 percent. I do see a number of LowBatteryLog files in Settings > General > About > Diagnostics &amp; Usage > Diagnostic &amp; Usage Data, though their contents don’t reveal a smoking gun. Letting the battery run down completely and then recharging entirely to recalibrate it made no difference."


(NB. TidBITS writes about this as it pertains to iOS 7 only.)

So, my question:


Do we know, technically, what is causing these crashes beyond simply "the power management code is freaking out"?
Are there any software hacks, fixes or usage habits (beyond usual battery saving/care techniques and "just get a new battery/don't let the battery get low!") that might help avoid these crashes?


(I'm interested in general answers, but in case it's of use here are the low battery logs from my two most recent crashes.)
If your phone shuts down with more than 10% charge remaining on the estimate, then you have a voltage / capacity issue in the battery and should have the device tested with Apple diagnostics to check the health of the battery. Think of a small town with a medium sized reservoir and a small water tower. The reservoir level can have water, but if it’s not pressurized (voltage) in the tower, the system can ask for more water (current) than the tower can supply. For a shower, the water just stops, but for an iPhone, it shuts off when the voltage drops too quickly.

The diagnostics read the low battery logs and compare them with thousands of other logs and Apple engineering standards to tell if your battery needs to be replaced.

Technically, those log files are total benefit with no downside. Your phone is out of juice and will shut down anyway. The OS is logging the data so you can take action on it if you choose. They don't cause anything other than logging what led up to the low power condition. 

I watch my LowBatteryLog-YYYY-MM-DD-hhmmss.plist log files quite regularly to know when to seek service for my battery.

Technically, the lithium polymer cells can exhibit voltage drops when they are out of specification but not yet failing or in a state where they should be shut off and not used again.

Looking more deeply into your two posted logs, I would focus on these lines primarily:

Awake Time: 03:45:27 (13526)
Standby Time: 04:55:29 (17729)
Partial Charge: 0
Capacity: 0
Voltage: 3469 mV


When Partial Charge is 1 - that means that you plugged it in and the device received a charge between when it was full and first removed from power and it eventually shut itself off due to low power detection. In those cases, I really only focus on the Voltage - knowing when the device decided to preserve the remaining voltage for standby and battery protection. 

The log above shows a very short awake time and indicates a likelihood that the battery isn't providing the correct duration and amount of power. Even if the CPU is full use, all radios are on, speaker cranking, brightness max - I expect 4 to 5 hours on most devices.

Unless that 3h45m run was a rare occurrence, my estimate is you need a hardware repair as sleeping more often will allow the sleep time to increase, but never increase the active time.

For newer iOS hardware (think iPhone 5 to 10) the voltage to available current to available capacity can also be due to aging, power management software or hardware issues. 


Why does my iPhone power off when the battery is down to 30%?