Limiting battery power consumption is essential for smartphones. To get the best autonomy possible, Android OS is designed to opportunistically go into sleep mode as soon as it detects no user activity on the system. Some applications require the device to stay on even if there is no user interaction for a long time. Examples of this are watching a video, listening to music, using GPS, and playing a game. Android provides such a mechanism for the OS or applications in order to keep the device awake. This mechanism is called a wakelock, if you want to learn more info about wakelock and you can view the article.
Basically the phone has three states:
- Awake With Screen On
The transitions are from (1) to (2) and finally from (2) to (3). Now as long as you use your phone it’s in (1) and does not leave that state as long as you keep using it interactively. If you stop using it the phone is aiming to go to (3) as fast as possible. And here’s where wakelocks are important: as our phones as smartphones they tend to do background processing. Some of this processing is important like e.g. making a phone call, listening to music or synchronizing your contacts. As the phone wants to go from (2) to (3) and on the other hand you don’t want to hang up while you are in a call the app keeps hold of a wakelock to prevent that transisiton. When you hang up the partial wakelock gets release and the phone goes to sleep.
but sometimes you find your phone battery drained even when you exited apps and turned off the screen. This might be due to wakelock holding apps or hardware, Is there a good way to find them?
OnePowerGuard Pro provides a feature called Battery Doctor and using our expertise and technology to make understand what happens and find a strategy to change that for the better.
Battery Doctor helps you to detect battery consuming applications in your Android device by checking wakelock usage history. Now you can find out which applications drain your battery in a simple way by using this app! it shows the following usage statistics
Here you will find details about how the views and options of OnePowerGuard Pro are organised. Further information about using Battery Doctor.
- Deep Sleep, Time On Battery, Total Run Time, Radio Type, Data Conn, Screen Brightnesses, Screen On, Signal Scanning Time, Active Phone Call, Wifi On, Wifi Running, Total Received, Total Send, etc.
- Kernel Wakelocks
- Full Wakelocks
- Partial Wakelocks
- Window Wakelocks
- CPU States
- Network stats
- Service States
Note: OnePowerGuard Pro does not collect data in the background but uses references saved at specific times (on specific events).
A usual profile would show low “Screen on” times compared the “Awake” meaning that partial wakelocks are resonsible for the battery drain as those preventing the phone from going to deep sleep.
- Deep Sleep: the total time the phone was sleeping;
- Screen On: the total time the phone was awake and the display was on;
- Active Phone Call : the total time the phone was in a call;
- Wifi On: the total time Wifi was on;
- Wifi Running: the total time Wifi was connected to a SSID;
- Bluetooth On: the total time bluetooth was on;
- Unplugged: is saved when you unplug your phone from the charger
- Charged: is saved when your phone gets charged to 100%
- Kernel Wakelocks: shows the total time and the count of Kernel Wakelocks and the impact in percent;
- Full Wakelocks: shows the total time and the count of Full Wakelocks and the impact in percent;
- Partial Wakelocks: shows the total time and the count of Partial Wakelocks and the impact in percent;
- Window Wakelocks: shows the total time and the count of Window Wakelocks and the impact in percent;
- CPU states: shows the time spent in each CPU state of process and the impact in percent;
- Network: shows the transfered Bytes per application and per network interface.
- Service: shows the count the service processes and the impact in percent
- Alarms: shows events created by applications that may cause wakeups.
This provides an insight about how to use Battery Doctory to reduce the battery drain in a systematic manner.
The following step by step:
1). First you must select a reference (most of the time “unplugged” is the best way to start).
2). Check the deep sleep, awake and screen on times
The deep sleep to total time tells you how much time your phone has spent in the most power saving mode: ideally the deep sleep time should be near to the total time
The screen on vs. awake ratio tells you how much time your phone was in use vs. how long it has been awake. Ideally the screen on time should be equal to the awake time, meaning that the phone was only awake when in use.
3). Check the [Kernel wakelocks]
The list shows you what Kernel wakelocks occured: a symbol on the right shows that there is a knowledge-base article on that specific wakelock In the first step we want to check for high times (minutes or more), once there are no hot spots left we want to look at the high counts.
4). Check the [Partial wakelocks]
The list shows you what partial wakelocks occured and for most of them what application caused them.
5). Check the Network Stats
Here you will find what apps / packages are responsible for high data transfers.
6). Check the CPU Stats
Here you will find what apps / packages use the most CPU.
7). Check the Alarms Stats
Here you will find what apps / packages make your system wake up.
Let’s consider a real case. I stay in a place where wireless signal is poor, From a user standpoint, everything looks fine. After a few minutes I check it with battery doctor, my battery level dropped down from 70% to 65%, what happens? Let us take a look the chart, tap this chart and get more info, you can see some info is marked as red.
On the other hand you can check the time spent within each wakelock type as well as the count. High time or high counts may be symptomatic of a problem. From this report you cannot link a hotspot to a specific application or process but you can spot a specific behaviour that may be triggered by a specific wakelock, process or application.