John Galea's Blog

My blog on Gadgets and the like

Power management on Android Gingerbread

It still surprises me how little power management is built into Android. All the way to Ice Cream Sandwich. Even Windows Mobile had more power management options. And I’ve played with HTC, Samsung and Motorola devices so I know this isn’t a vendor specific thing.

The starting point to power management is understanding what to focus on. A phone is simply a collection of building blocks. Understanding which of them you can control and which take the most power you can regain some control of your device and extend your battery life! The great thing about Android is the plethora of aps and choices the user has to control, automate and monitor everything on your device. As an engineer I like this. Now don’t try most of this on your iPhone 🙂 Funny thing, most of the same results you will find on an iPhone!

I’ve not been able to do power profiling for a while, I’ve been on Motorola devices for the last little bit and they only do battery increments of 10% making it much more difficult and inaccurate.

What I’m going to try and do in this post is point out some helpful tools, and the results I found. While the specific numbers are relative to my device a Samsung Captivate Glide I927R running Android 2.35 the relative findings will be similar for other Android devices and to some extent other smart phones. The tools will of course be Android tools 🙂

First off you need tools to display and track the battery status. I have found two widgets that work best for me. They give you both the current percentage and the projected battery life.
Battery Left Widget works well but I have found it inaccurate in comparison to the built in battery % status. Battery Widget is also quite good. You need to see which is accurate for your device.

I use Battery graph to be able to export the battery status over time as a CSV and then you can import it into a spreadsheet for analysis.

As a starting point I wanted to get a baseline for standby with 3G data on Rogers/Fido. I will compare relative numbers from there. I found I got 7.8% per hour or a projected life of 12.9 hours.

Past experience has shown that the 3G radio and specifically data on 3G is one of the largest points of control. In part because it draws a lot of power, but more because it draws this power on an ongoing basis. Constant sync of data, and Android itself talks back to the mother ship constantly. Checking for new updates to your aps, getting ads for the free software etc.

Every time I post this I get people arguing … So here it goes. WIFI draws less power than the 3G radio. By comparison connected to an N router it goes down to 3.3% per hour or a projected 31 hours battery life. That’s an improvement of 238%. So if you can stay on WIFI it helps! You can use profile aps to turn WIFI on whenever possible. I found a great ap to do this automatically called Y5. What this does is remember the cell towers that are in the area of a WIFI connection you’ve made in the past. If you are near one it enables WIFI. If you are not it doesn’t. Very nice way to automate turning on/off wifi. So far I have been unable to get an accurate reading on how much WIFI on standby not connected actually draws. No idea why that is but the number I get each and every time I do it makes absolutely no sense.

Edge Data
The cell network (some anyway) have a number of different generations still around. Fido/Rogers for example have the original GSM data (called edge), 3G, 4G and LTE. Edge draws a LOT less power than 3G. The trade off is stupid slow speeds. On Edge data it draws 3.1% per hour with a projected battery life of 32 hours with an improvement of 248% (compared to 3G). By the way Bell/Telus do not have an Edge network so this is not an option for you. Using Speed test 4G speeds measured 6Mbps down, 1Mbps upload Vs 191kbps down 115kbps upload on Edge, so changing over to Edge has a dramatic effect on speed too. Everything has it’s trade offs. Now if all your doing is email then who cares. You can change this in the Wireless networks, Mobile Network setting. This needs to cycle the radio on and off so takes a few seconds to change. I’ve not found ANY decent aps to automate this setting. There is a widget that acts as a short cut to this setting 2G-3G OnOff.

Data off
Turning data off is an easy way to save a lot of power. If your at your desk do you really need your data on all day? Turning data off has a profound effect on battery life. On 3G turning data off takes power consumption down from 7.8% per hour down to 2.5% per hour and projected battery life from 12.9 hours to 39.6 hours, a savings of 307%! On edge It takes power consumption down from 3.1% per hour down to 1.9% per hour, or a projected battery life of 32 hours to 52.8 hours, a savings of 165%! As you can clearly see this is HUGE. I use Battery Defender to automate this. What I do is use their night time schedule to disable data but use this through the day. Like I said who needs data when at my desk. The unique thing about this ap is the moment the screen is on data is restored allowing you to still use the device. Perfect. I also use Data Enabler widget to manually turn off data. There’s another program called Juice defender that works well. Even in there balanced profile it is quite effective. I like the way it explains exactly what it is doing. This program turns data off and then turns it on and syncs once every 15 minutes allowing you to still be informed of new emails. Perfect. The numbers for Juice defender are very good. I got 2.65%/hr or a projected battery life of 37.7 hrs or an improvement of 292% (compared with 3G data on, sync on). It also turns data on when the screen turns on so data is there when you need it. Well kind of. I found it a little slow in enabling data. Slower than battery defender. But all in all it was quite good.

Sync off
Turning Sync off is a simple way to save a lot of power. This can be done in the Settings Account and Sync or my phone has an icon for it. If you don’t have one there are lots of widgets in the market place for this like this one. With Sync off power consumption went from 7.8% per hour (3G with data and sync on) down to 3.58% per hour or a projected battery life of 28 hours! A savings of 217%. This compares quite favorably with completely turning data off at 2.53% per hour. Wow. This was one I didn’t expect. Of course this also means you no longer get mail notifications :(.

Airplane mode
Airplane mode turns off all radios, all syncs and for all purposes should be the lowest possible power management. Interestingly enough the power consumption in this mode is (within error) the same as edge no data 2.1% per hour or 47 hours of battery life.

Bluetooth Standby
One of the things we can glean from Airplane mode is that bluetooth on stanby draws an insignificant amount of power. So don’t waste time turning this one and off.

Another thing we can glean from Airplane mode is that Android does a fabulous job of only turning on GPS when it’s needed. Now that’s not to say that programs don’t misbehave and turn GPS on and leave it on. This tells us again don’t waste time turning this on and off as the standby power is insignificant.

There are some more generic things I should point out. Keep your display brightness as low as possible. It takes a lot of power to keep the display on max brightness.

Keep an eye on your CPU. From time to time aps, and the OS itself run away. There’s a great program CPU Timelines that displays the CPU status in the notification bar. And when you drag it down you get a graph of CPU busyness over a period in time. Another ap called Quick System Info also display individual graphs for each CPU so you can see how well you are exercising the various cores of your phone! Nice! I’ve seen a number of programs that try and control the CPU clock speeds. One of the things quick system info shows you is the min and max speed your CPU is capable of. Android takes care of manipulating the CPU speed nicely minimizing CPU power consumption.

Another thing that is helpful is to know how much power doing things takes! So I profiled a few aps.

An excercise GPS enabled data logger with Bluetooth Heart Rate monitor support took 9.9% per hour for a runtime of 10 hours battery life. This runs GPS, CPU to log once a second, bluetooth connection to the heart rate monitor etc. Of that 7.8% of that is to run the 3G with data on so really 2.1%

WIFI Hotspot
Sharing your internet connection from your phone to other devices takes a reasonable amount of power. On top of running the 3G radio it also needs to run the WIFI and uses CPU power to encrypt the data. This took 11.4% per hour or a runtime of 8.8 hours.

Movie Playback
This pushes a lot of areas on the phone. The CPU, graphics etc. I was playing a full size encoded XVID AVI so lots to do in terms of decompression. This took 16.9% per hour or a run time of 5.9 hours. Again remember 7.8% of that is to run the 3G with data on so only 9.1%.

Internet Radio (CBC Radio Ap)
Internet radio sounds like a good idea but it draws a reasonable amount of power. The steady stream of data from the 3G radio is likely the biggest draw. And then CPU power to decompress. I measured 18% per hour (on very limited data so +- 22%) so would only be 5.6 hours of battery life.

No good engineer worth anything wouldn’t define the errors of the data. The battery percentage gauge is by no means a well honed accurate piece of instrumentation. It is however, what we have. So Given that it only gives the percentage in 1 point increments it means that the delta between two points in time could be off by as much as +-2%. Time is pretty accurate at 5 min increments. So as such I will ignore that. With that in mind it means that most of the data is roughly +- 10% of the measurement stated. So if I say for example it’s 7% per hour it could be anywhere from 7.7 to 6.3% per hour. By using a larger amount of time the data is more accurate but it also takes a whack more time. The majority of the data points used in this study are 8 hours or more (some are less but not many).

Here’s the raw data if you are curious.

July 19, 2012 - Posted by | Android

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: