Pages

Friday, January 28, 2011

Battery Tips for Android

Having had a great battery life with my phone initially and then dropping to less-than-a-day battery life, I spent some time reading the advice and trying some of that out. I have to admit that having a very good battery life initially happened because I had immediately disabled all the Location and Network functions after I got the phone. I did not have data on my plan so I did not need the networking. Also, there was not too many applications nor widgets installed and active.
After adding a whole bunch of applications (and, the worst of all - a whole bunch of task managers that are real battery vampires) and adding the data plan, the battery on my phone lasted only a few hours. The main reason for this was identified in being LauncherPro. With having that as my default home, the battery would be drained in a matter of a few hours. I noticed the system also got terribly slow. Applications would crash and the performance was just a pain. I haven't figured out where the conflict was - whether it was some of the widgets or background services - but removing LauncherPro and bringing back the default (Tw) launcher and home screen seemed to bring things back to (the new) normal.
Then I monitored the CPU and battery usage and haven't really found any further good suspects to eliminate. However, here are some tips that make sense to me, in general, so I added them to my phone practice:
  • Set the screen brightness to minimum. Possibly, use widget as a switch between brightness off (indoors) and auto brightness (outdoors). Widgetsoid's slider shows the actual percentage amount while the default slider for brightness does not. I found out my brightness was at 7% instead of 1% so I finally managed to set it to minimum.
  • Use Autostarts to actually disable startup items rather than kill them after they are started.
  • Remove widgets that consume CPU but are not absolutely necessary. I used to use widgets as mere shortcuts to the full application so replacing the widgets with actual shortcuts helps. Found Widgetsoid, a great widget app that consumes very little CPU/battery and allows access to most options I need.
  • If using Launcher Pro, do not use updating icons (Gmail mail count, SMS count, etc.). I decided to switch back to the default TwLauncher for peace of mind.
  • If disabling location finding via GPS, you might as well disable the same using cellular network.
  • DO NOT use task killers unless you really need to. There are several wonderful applications that will display the CPU usage and even monitor it over time (I recommend Usage Timelines, SystemPanel, & Android System Info). Use this for a period to identify hogs and eliminate them. Then stop monitoring and leave the application management to Android. That's why it's there.
    Note: If you keep killing apps, they tend to get started by certain events. There is an app that can show you all the event hooks in the system (I think it is Austostarts that does this, as well). So, you save battery by not killing those apps.
  • Uninstall the applications you are not using but that keep starting themselves every now and then. Different events will trigger different applications so, if you don't need them, the best option is to uninstall. Keep the apk package handy if you ever need them later.
In regards to network, my preference is to turn the network on only when I need it. Usually by using widgets to start the 3G connection and auto-sync. Then I let the apps update whatever they need to and/or use the Internet and then disconnect when I'm done. Also disable background network traffic as I hope applications will understand this and not send network request when network is offline. Still need to monitor usage for a bit longer to confirm how this affects battery life.
Edit: Although I disconnect 3G when not using it, I don't go into trouble of disabling the whole background communication. Things seem to work well. One observation I'd make is that it would be good to uninstall the applications that are not really used as there tends to be a lot of services and applications running in the background and, sooner or later, they *do* consume power and CPU cycles because they *are* checking and doing something. Monitoring the CPU usage displays that clearly.
Edit, 2011-01-28: After applying these tips, my phone has been alive and well on a single battery charge for 5 days and 5 hours and the battery is still at 15%. I have used it as I would normally - phone calls (over 42 minutes), taking photos, uploading to Facebook, checking emails in the morning and sometimes during the day, checking the web site for train schedule, checking GPS location, browsing online maps, missed calls, SMS messages, etc.
I still use widgets for 3G traffic, calendar, todo list, Financisto, and 8 Widgetsoid switches and indicators.
After finding how to rearrange icons in the application launcher, I started utilizing application shortcuts instead of numerous widgets for running the apps. Some of the apps I'm actively using are now located on the first two screens of the app launcher and others are accessible by tapping the widgets.
There is over 250 applications installed on the phone. It takes eternity just to list them. Use Android System Info for checking installed packages, uninstalling, etc.
2G network is being disabled overnight with Tasker and turned back on in the morning. The phone is also being used as a wake-up alarm in the morning with Alarm Clock Plus.
Before this session, I've depleted the battery completely and then recharged fully without turning the phone on in the meantime.
And, at the end, the phone is Samsung Galaxy S. :)
Edit 2011-01-30: The battery made it to 7 full days!

Update: Check out related post - Zeam Launcher improves battery life on Android.

1 comment:

SoftVision said...

Hi, I find it astounding that you get 7 days of battery life with your SGS. I have a SGSL GT-I9003 (the newer LCD version) which has a bigger battery. I'm on the stock ROM and kernel and I can barely push past 36 hours. I intend to monitor apps for CPU usage but I don't think I'll see any surprises. Thanks for the tips though. :)