[Droid X General] hecksagon:
Hello everybody! The purpose of this guide is to show you some free ways to greatly increase your battery life on the Droid X. First this guide assumes you have the Gingerbread kernel, root access, and are comfortable with ClockworkMod Recovery. If you have not installed a few roms, SBF’ed, or backed up your phone, learn how to and practice it a few times. I am not responsible if you fubar and have to SBF your phone. This guide is specifically written for the Droid X, but since the Droid 2 uses the same innards, you can probably use this guide interchangeably with that phone. Not all the steps in this guide only apply to the Droid X so I will say something on the steps that can be used on other Android devices.

First I'm going to start with basic things you do not want to do if you plan on saving battery. (All Devices)

Battery Saver Apps: Battery saving apps like Juice Defender are bad ideas. As I will explain later, many apps expect an always on data connection and prevent your processor from going into deep sleep when they are waiting for that data connection to come back on. Not to mention a battery saver is just another app and service that is running in the background potentially using battery.

Wipe Battery Stats: A Google developer has confirmed that the batterystats.bin does not hold battery calibration information. It holds information to compute battery usage information. The same information you see under “Battery Usage” in settings. Wiping this file just wastes your time.

Hungry Apps: Apps that use excessive notifications keep the processor from going into deep sleep. Facebook is the number 1 culprit here. Go into the app settings and turn of notifications. Use your back button to exit apps when you are done.

Automatic Backlight: On the Droid X, the Automatic Brightness setting is useless. Minimum brightness is too high by default. Either turn it off and set brightness manually or take the step I did that comes up later in this guide.

Wifi: Wifi when you are in range of a router uses less power than your 3G connection and is faster anyways. Wifi when you are not in the range of a router is a battery killer and should be avoided. Use your notification toggles if you have them. Get a widget if you don’t.

GPS: GPS should be turned off at all times unless you are actively using it. Nobody cares where you were when you posted on Facebook.

App killers: App Killers are good for hunting down and killing an app once in a while but are usually pointless. Android automatically loads apps into free memory for quicker starts. Why have your app killer wake up the phone from its idle, kill all of your apps to free up memory, and then have Android automatically reload most of those apps back into memory?

Bluetooth: Bluetooth headsets are best left in the car where you have your phone on a charger. If you need to use one off the charger, don’t forget to turn off your Bluetooth when you are done.

Charging: Charge as often as possible. Follow the same battery saving strategies you usually do when your phone is off the charger. It makes your phone charge faster. Keep in mind the mA rating on the charger. The stock one is 850mA. Do not exceed this rating. USB is ~500mA depending on other devices attached to the computer. The higher the rating, the faster the charge. Do not let the battery get very hot. Do not let your battery level drop below 10 very often. Low charge levels on Li-Ion batteries can damage them. Alternately, do not reputedly plug and unplug your phone once your battery shows 100. Android charges to 100 and lets it use up battery for a few percentages before it starts charging again. This is to prevent overcharging and damaging your battery. If you plug and unplug it repeatedly, it tricks Android into charging it more and more. Keep in mind that li-ion batteries lose capacity over time whether you use them or not. Replace them when they are no longer keeping you happy.

Step 1. Selecting a Rom

Liberty 3 forum topic: http://xdaforums.com/showthread.php?t=1368049

Really for the purpose of this guide the only rom worth picking is Liberty 3. This rom is based on Motorola code which is known for good battery life and has init.d support baked in. It also has the power toggles in the notification bar and has pretty good customization. The 2nd-init roms that have init.d will work too but have issues with battery life. From this point forward I am going to assume you are going to be using Liberty 3 but the steps should work the same for other roms as long as there is init.d support.

Step 2. Installing the Rom

Use CWM to install the rom like you normally would. Start up and follow the usual setup wizard. Once you are able to get to settings, click on Liberty Settings, then Performance, then Start-up Tweaks, then uncheck everything except "Enable start-up tweaks." These settings interfere with the next step and are going to be duplicated by the next step.

Step 3. Install jakebitesmod

Jakebitesmod forum topic: http://rootzwiki.com/topic/3435-mods-jakebitesmods-v18-for-d2-ota-gb-kernel-all-roms-mods/ (Please consider donating to this developer as this script helps a lot of people.)

Jakebitesmod has some good scripts to optimize many things in Android. Pretty much anything that speeds up Android can have a small improvement on your battery life. We are specifically going to use his script to under volt the processor and set the governor at boot without using an app. Copy the linked file to your SD card and boot into CWM again to flash this. Restart your phone like normal.

Step 4. Configure jakebitesmod

Open Terminal Emulator and type “su”. This should prompt Superuser for root permission. Allow the permissions and move on. Type “modcentral”. This should bring up a little text menu of things to do. The menu option we are gonna be looking for is “1”. Read the safety issues and if you want to move forward press “Y”. From here we are going to select “1”. This option will leave you with the stock processor speeds but change the voltages on the processor to lower settings. This is generally safe because lower voltages should only cause problems with freezing and crashing, but should not physically be harmful to the processor. Voltage also makes much more of a difference on power than clock speed so this should save us a good chunk of battery. Push “Y” to continue and set the voltages and speeds at boot. Press enter a couple times and it should tell you it succeeded. Yay. From here we want to go to menu option “3”. Governors control when the processor jumps up or down in speed based on some magic formula that takes into account how much work your processor is expected to be doing. Personally I agree with jakebites and I chose interactiveX. It jumps up in speed fast enough not to appear like the phone is laggy and drops back down fast enough to save battery. It also automatically drops down to the lowest speed while the screen is off. After you have made your choice push “Y” and enter a few more times. Once we are back to a menu we can just hit the back button and exit the Terminal Emulator.

Step 4. Adjusting the Backlighting (All Devices)

The Droid X’s backlight settings is a real pain. The lowest brightness setting it will dip down to is 20. This is way too bright for darkness. You know what I mean if you have browsed at night in bed. Luckily there is an app for that. Download “Custom Auto Brightness” from the Market and install it. It ends up being called LogGraph in the app drawer for some odd reason. Open this and hit you menu key and then select “Preferences”. Select calibrate sensor and follow the directions on the screen. Then go to check brightness range and follow the directions on the screen. Then back out to the main screen and make sure “Demonstrate….” is checked. Push the left “Select sensor reading” and observe the line on the graph move. These are the levels of light the ambient light sensor are going to report at. So say you have the sensor reading slider set to 10. You move the bottom slider to a value of 2. This means that your backlight will be at its lowest level when your sensor says the light in the room is at a level of 10. You can adjust these to what you prefer, but for the best battery savings turn your readings at 1 and 10 to a value of 2. This will keep your backlight nice and low while you are in a dark room but still let your backlight jump up while you are outside. Once these are set head back into the preferences and make sure that all of the checks are enabled except “Foreground mode” and “Bypass hysteresis”. Once that is done hit the back button until you close the app and then turn your screen off and on. If you brightness is way lower than it was before you are golden. If not double check the guide.

Step 5. Install Your Normal Apps (All Devices)

The next steps require your normal apps to be installed and signed into those apps like normal.

Step 6. Set Your Sync Times (All Devices)

Install the app “AutoSync Account Activator” from the Market. Open and accept the agreement. Now you should see some apps listed. I get “Google” and “Facebook” but yours may vary depending on what you have installed. The process should be similar for each app. First off, click on “Google”. The first page called “Connections” lists you connections. Click on connections you would like your account to be able to sync on. Cellular is an obvious one but really you should have your wifi on and have it activated in this while you are home. The next screen, “Periodic Sync”, controls how often your apps sync. Unless you use your Google Calendar often, set that to “1 day”. Contacts should also be “1 day”. Gmail should be set accordingly to how often you care about your email. Others may show up. Set them to according to your judgment. Just keep in mind the more often you sync, the more battery you will use. If you do not use the service at all you can select “No period”. If you have one set to no period you should also set it in the next page to “Always off”. All of the rest should be set to auto.

Step 7. Observing What You Apps Are Doing and What to Do About It (All Devices)

This step is subdivided for the benefit of your eyes.

XDA Edition BetterBatteryStats forum topic: http://xdaforums.com/showthread.php?t=1179809 (The link is at very bottom of 2nd post. Please purchase from the developer on Market if you use this more than a few times.)

A. This final step will ultimately probably figure out why you were getting bad battery. Android’s power management relies on what are called “wake locks”. Wake locks are things apps can create to tell Android’s power management to prevent the phone from going into deep sleep. Deep sleep is a state your processer goes into to basically shut itself off. A good example of a wake lock is when you are playing an mp3 and your screen is off. Normally when your screen is off your device wants to get into deep sleep asap. The audio service creates a wake lock to prevent your processor from entering deep sleep, because this would stop the mp3 playback. Most of the naughty apps out there use wake locks to keep data connections alive and use them to keep updating and keep notifications going. They tend not to give up that wake lock when they should and keep your phone from going to sleep. Apps that shut off your data connection, like Juice Defender, will cause even good behaving apps to freak out and keep their wake locks active while they wait for the data connection.

B. To look for these wake lock hogs we have a couple apps to get. The first one is from the link. It’s the XDA Edition of BetterBatteryStats. The second is CPU Spy from the Market. To use BetterBatteryStats just dump it on your sd card, use a file explorer to open it, enable Unknown Sources, and install it. Then open it, plug in your phone, unplug your phone, and use it like normal for a few hours. When you are ready, open the app, click on the first drop down, and select “Partial Wakelock”. Make sure the second drop down says “Since Unplugged”. Whatever apps are listed at the top are the apps that are keeping your phone from sleeping. My top 3 are DownloadManager (I was using Market and turned off my screen.), PowerAMP scan, and the PowerAMP service, but only the DownloadManager used any significant time. CPU Spy can be used to see how often your processor is going into deep sleep. Once you find your bad apps, you can look around in them and see if there are any settings in there to either turn off notifications, increase the time between updates, or anything else you may think is keeping the app busy.

C. If there is nothing there you can change, you can consider preventing it from starting. If you do not have ROM Toolbox Lite, download it. Open it and click on “Auto Start Manager”. Then scroll the screen sideways to get to the menu that says “Applications”. Click on apps and you will see two actions that we will be looking at. They are “boot completed” and “connectivity changed”. Apps like games, media players, internet radios, Facebook, etc, do not need to be started at boot and do not need to be started when connectivity has changed. Unselecting these will keep apps like Facebook from starting when you turn your phone on and when you switch from 3G to wifi.

D. If you ultimately can’t figure out why an app is keeping its wake lock for so long you may have to consider if the app is worth the lost battery life. Unfortunately there are just those apps out there that are poorly written. Consider sending an email to the developer explaining your problem and ask what you can do to fix it. If they don’t replay politely give them some poor feedback with a good explanation in the Market. They may look into the problem and correct it.

In Closing...

Thanks to everyone for reading, or at least skimming, my guide. I really hope this helps and saves time for a lot of people. If there are any issues anybody runs into I’ll try to help and explain the best I can. I apologize for any mistakes, errors, or bad sentence structure. If anybody has anything to add I will definitely consider adding it as long as it is free, easy to do, and produces results. If I broke any forum rules please notify me before deleting this topic. I’ll be happy to fix the issue.

About wake locks: http://xdaforums.com/wiki/Wakelocks

Li-Ion batteries: http://en.wikipedia.org/wiki/Lithium-ion_battery#Battery_charging_procedure

Batterystats.bin information: http://www.androidcentral.com/wiping-battery-stats-doesnt-improve-battery-life-says-google-engineer

(Edit 1: Added instructions to delete default init.d scripts installed with Liberty. They seem to conflict with jakebitesmod's voltage settings. They didn't want to stick through reboots. All of the script's functions are duplicated by jakebitesmod anyways.)

(Edit 2: Turns out that deleting the init.d scripts isn't needed. Instructions updated.)