Android OS电池使用

Android OS 电池使用现象

Many of us complains about Andoid OS draining and keeping the CPU activity all the time. Let me explain how Andoid OS bumps up on to your Battery Graph.

If you got really frustated seeing Andoid OS in the graph, you'll probably root your device, freeze system apps or uninstall some, but still Andoid OS remains.

Under my observation. I installed better battarey stats to monitor possible wakelocks.

Android OS wakelock

Kernel wakelock found:

  • ospm_wake_lock
  • earlysuspend_wakelock

If you do the same, you'll notice this two wakelocks running all the time even when device is on standby.

This what actually makes Android OS to be running all time. All of this are modules within the Linux Kernel power management.

It doesnt cause battery drain or keeping your device awake all time and not to enter deepsleep.

ospm_wake_lock

Operating System Power Management (OSPM) is an operating system technology for managing the power of the underlying platform and switching it between different power states. OSPM enables a platform or system to implement the most efficient power mode and is applicable across all devices and components within a platform/system. OSPM is also known as Operating System-directed configuration and Power Management.

earlysuspend_wakelock

Earlysuspend provided a bit more of a gradient of states between on and suspended. The device may be still running, say playing some music, but the screen is off. In this case, it may make sense to power-down parts of the device that aren't going to be in-use if the screen is off: like touch sensors, or gpus.

总结

This is why Android OS keeps activity to the graph as shown above.

It doesnt mean it drains battery juice because you'll see a higher percentage of usage where in its actually the Power management taking place at the time.

Power management is built into the Linux Kernel to handle the device power and had in imporved from 3.X+ linux kernels.