Question

I am trying to find where in the android source code the event that tells the device to shut down due to low battery it located.

I am currently looking at cyanogenmod source but I imagine this is a common area for all mod sources.

Can anyone point out where this is and if possible how to prevent the phone from shutting down?

To clarify why I want to do this:

I have a faulty phone that always reports the battery level to be zero when I know it is not (I have tested the battery in other phones and other batteries in the faulty phone). Preventing it from shutting down would just extend the life of this otherwise useless phone.

Was it helpful?

Solution

in BatteryService.java ,when the battery lvl is too low (0%, lower than 3.4v),the service will call shutdownIfNoPower to shutdown system.

By the way, is your phone has been ADC calibrated ? or the calibration data had been destoryed....

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top