Wednesday, October 12, 2011

Getting the Most out of your Battery on an Android device

Editors note: this is geared towards the Galaxy S2, but has a good information for other handsets as well.

A lot of this will vary on a case by case basis depending on how you use your phone and what you have installed, so if you have any tips let me know and I will add it to the list.

If I am using my phone heavily, I don't mid that the battery life is not great but when my phone is just sitting there on its own, and the battery drains very quickly, it can be very frustrating.

Here are my current battery stats for your reference. I was able to turn a 12 hour phone with medium usage to an all day phone with the same usage. I have a custom kernel loaded that will allow me to under clock to 100MHz when my phone is sleeping by using Set CPU then it will scale up to a max of 1 GHz depending on what I am doing. This significantly helps the battery life.

When my phone is not sleeping it is usually using only 100MHz. I listen to a lot of books and music when I am riding the train or walking so most of the time it is only using 100MHz.

Even on heavy usage days I have been able to get a full days worth of use which is pretty amazing compared to what I was getting before.

The key to tracking down what is eating your Android phones battery like a ravenous battery sucking vampire Is CPU Spy and Betterbatterystats. You will want to look at "partial wake locks" and see what is keeping your phone from going into "deep sleep". Also under "other" compare that with "screen on" and "awake".

Here is the website for betterbatterystats where more info can be found but the image bellow gives you a general idea of the process.


If left alone my phone would have a "screen on" time of just a few min but an "awake" time of basically however long it has been since my last charge so my phone was never going into a "deep sleep". In the morning After 15 min my phone would have already lost about 5%. This is definitely not normal, and may not affect all of you.


By examining all of my running processes and ripping out all of the Samsung and Docomo included bloatware I have successfully been able to get my phone to go into "deep sleep" and was surprised to find that after letting it sit for an hour I still had 100% battery!!

Here are some helpful apps for tracking down your battery usage:
Also it is worth noting that in the newer phones it is not really important to use task managers. They have enough RAM that it is not really an issue. What is an issue is identifying what is always running and preventing your phone from sleeping or that keeps using your data connection. Go through the list of running apps and Google any running services and if you don't need them, use the paid version of Titanium Backup to freeze them.

Check under applications and running services to see what is always running and remove the offending applications.

I Froze these processes and it made a significant impact on battery performance
  • DRM Content
  • DRM Content Launcher
  • DRM Protected Storage
  • Fota Client
  • SyncmIDS
If you are using a SC-02C and don't care about all of the Samsung apps remove them. Download gscript and run this script to delete them. Make sure you check the box that it requires root access. Removing these will effect your ability to get OTA updates to if you are using a stock ROM it is better to freeze them rather than remove them. I am using a custom ROM so I don't care about OTA updates.

mount -o rw,remount -t yaffs2, /dev/block/mtdblock /system
rm /system/app/BuddiesNow.apk
rm /system/app/BuddiesNow.odex
rm /system/app/Days.apk
rm /system/app/Days.odex
rm /system/app/DigitalClock.apk
rm /system/app/DigitalClock.odex
rm /system/app/DualClock.apk
rm /system/app/DualClock.odex
rm /system/app/EmailWidget.apk
rm /system/app/EmailWidget.odex
rm /system/app/FactoryTest.apk
rm /system/app/FactoryTest.odex
rm /system/app/FTM.apk
rm /system/app/FTM.odex
rm /system/app/FTS.apk
rm /system/app/FTS.odex
rm /system/app/GameHub.apk
rm /system/app/kieswifi.apk
rm /system/app/kieswifi.odex
rm /system/app/Kobo.apk
rm /system/app/MiniDiary.apk
rm /system/app/MiniDiary.odex
rm /system/app/ReadersHub.apk
rm /system/app/ReadersHub.odex
rm /system/app/SamsungIM.apk
rm /system/app/SamsungWidget_News.apk
rm /system/app/SamsungWidget_News.odex
rm /system/app/SamsungWidget_ProgramMonitor.apk
rm /system/app/SamsungWidget_ProgramMonitor.odex
rm /system/app/SnsAccountFb.apk
rm /system/app/SnsAccountFb.odex
rm /system/app/SnsAccountLi.apk
rm /system/app/SnsAccountLi.odex
rm /system/app/SnsAccountMs.apk
rm /system/app/SnsAccountMs.odex
rm /system/app/SnsAccountTw.apk
rm /system/app/SnsAccountTw.odex
rm /system/app/SnsDisclaimer.apk
rm /system/app/SnsDisclaimer.odex
rm /system/app/SnsImageCache.apk
rm /system/app/SnsImageCache.odex
rm /system/app/SnsProvider.apk
rm /system/app/SnsProvider.odex
rm /system/app/SocialHub.apk
rm /system/app/SocialHub.odex
rm /system/app/TwCalendarAppWidget.apk
rm /system/app/TwCalendarAppWidget.odex
rm /system/app/AnalogClock.apk
rm /system/app/AnalogClock.odex
rm /system/app/ChocoEUKor.apk
rm /system/app/Dlna.apk
rm /system/app/Dlna.odex
rm /system/app/HelvNeueLT.apk
rm /system/app/KiesAir.apk
rm /system/app/Microbesgl.apk
rm /system/app/Microbesgl.odex
rm /system/app/MusicHub_U1.apk
rm /system/app/PanningTryActually.apk
rm /system/app/PanningTryActually.odex
rm /system/app/PostIt.apk
rm /system/app/PostIt.odex
rm /system/app/PressReader.apk
rm /system/app/SamsungWidget_StockClock.apk
rm /system/app/SamsungWidget_StockClock.odex
rm /system/app/SamsungWidget_WeatherClock.apk
rm /system/app/SamsungWidget_WeatherClock.odex
rm /system/app/SecretWallpaper1.apk
rm /system/app/SecretWallpaper1.odex
rm /system/app/SecretWallpaper2.apk
rm /system/app/SecretWallpaper2.odex
rm /system/app/SpeechRecorder.apk
rm /system/app/SpeechRecorder.odex
rm /system/app/Tasks.apk
rm /system/app/Tasks.odex
rm /system/app/wssyncmlnps.apk
rm /system/app/wssyncmlnps.odex
rm /system/app/Zinio.apk
rm /system/app/FactoryTest.apk
rm /system/app/FactoryTest.odex
rm /system/app/HTMLViewer.apk
rm /system/app/HTMLViewer.odex
rm /system/app/lcdtest.apk
rm /system/app/lcdtest.odex
rm /system/app/MobileTrackerEngineTwo.apk
rm /system/app/MobileTrackerEngineTwo.odex
rm /system/app/Protips.apk
rm /system/app/Protips.odex
rm /system/app/ReadersHub.apk
rm /system/app/ReadersHub.odex
rm /system/app/SevenEngine.apk
rm /system/app/signin.apk
rm /system/app/signin.odex
rm /system/app/VoiceToGo.apk
rm /system/app/syncmldm.apk
rm /system/app/syncmldm.odex
reboot

Here are some general best practices for saving your battery. After getting your phone to a point where it has acceptable battery life, then you can take a backup and slowly add back some of these functions, such as Latitude or GTalk, and see how your battery life is effected.
  • Disable latitude in Google Maps
  • Disable auto sign in for GoogleTalk
  • Turn off any unnecessary syncing
  • Set your screen brightness to its lowest settings
  • Turn off WIFI when you are not using it - constantly scanning for wireless networks will drain your battery and keep your phone from going into deep sleep for as long as it can. But if you have WIFI available use it as it uses less power than the phones data connection.
  • GPS - This is debatable, even with GPS "disabled" it is still on so there are no power savings to be had by disabling it. You are only disabling applications from using it so if your are conscious of what is using your GPS then you can leave it on. When you see the notification in your task bar, it is in use. Any other time it is powered on just not in use.
  • Disable auto screen rotation - when you don't need it always have auto screen rotation disabled.
  • Use a black background rather than a live wallpaper. OMLED screens turn off the black pixels and since OMLED screens use a lot of power this can make a lot of difference. Here is my background.
This is the actual image being used for the wall paper, pure black.

No comments:

Post a Comment