BatteryFu is an Android application I wrote to save battery life (and data) on my HTC Dream (G1). After trying JuiceDefender from the market, I was quite disappointed at how bloated it was and how it actually ended up using memory and battery on my device which went against what it's supposed to accomplish.
So I wrote BatteryFu as a proof-of-concept to see if a lean and mean battery saver would work. And boy, does it work! I can get almost 4 days of battery life under normal usage (using conservative settings).
UPDATE: BatteryFu is now open source. Get the source at: https://github.com/tobykurien/BatteryFu
- Very lean app: It uses no memory or background services (unless you use the "Data while screen on" feature). This is important for my HTC Dream as I am running Froyo and it needs every byte of RAM it can get.
- Night mode: This disables activating sync while you are asleep, hence extending your battery life even more and preventing e-mails from disturbing you at night. Also saves you data on your data plan. You can configure the night mode start and end time (by default it is 10pm to 6am).
- Data when screen unlocked: allows you to continue to use your phone as normal by enabling data then you unlock the screen, although this will adversely affect battery life. Warning: task killers can stop this feature working.
- Data while charging: allows you to plug in your phone to a charger and receive updates, tether, etc.
- New modes: Travel mode, Offline mode, Online mode, etc.
- Widget: a home screen widget that allows you to toggle BatteryFu by clicking the icon, or open the settings screen by clicking the text.
- Very handy notification icon that allows you to toggle BatteryFu modes even while within another app.
- APNdroid support for toggling mobile data. This is recommended for CDMA users on pre-gingerbread devices, or any users having an issue with mobile data toggling.
Search the app market for "BatteryFu" to install it (or scan the QR code above). Do not install or move app to SD, as this may cause problems. Once installed, you will need to configure it (although default configuration is OK). Make sure that you leave the Android mobile data setting enabled (Settings > Wireless & Networks > Mobile Networks > Data enabled), otherwise BatteryFu will not be able to establish a mobile data connection.
Set the Sleep time (which is the time period it uses for activating your sync connection, i.e. check for e-mail every XXX mins/hours). I highly recommend using 30mins or more. Anything less and you might actually have more battery drain than usual. This may seem counter-intuitive, but consider that when not running BatteryFu the phone does not need to constantly initiate an auto-sync connection and re-sync all your content (unless you have poor cellphone reception).
Also set the Connect time which is the amount of time it keeps the data connection open during sync, before closing the connection again. Note that connect time does not affect sleep time, so if you use 15 min sleep time with 5 minute connect time (not recommended!) then your data connection will actually be on for 20 mins per hour.
You can also enable Night mode and set the start and end times. BatteryFu will not activate the data connections during night mode.
After you close the BatteryFu screen, if it has been enabled, it will close the configured data connections (mobile and/or Wifi), and then wait out the "sleep time" before re-enabling them. It then starts sync and waits for the "connect time", after which it disables the data connection(s) again.
If you would like to donate (any amount), you can do so using PayPal:
- Argh! My 3G settings are messed up! Please fix!
Yes, this is how BatteryFu works. It disables your 3G/GPRS APN by renaming the "APN Type" field to "batteryfu_disabled". It will revert the APN Type when connecting for data. Please disable BatteryFu before uninstalling it, as Android does not provide a way for the application to clean up after itself. If you uninstalled it without disabling it first, you can re-install it, disable it, then uninstall it again, or else edit Settings > Wireless & networks > Mobile networks > AccessPoint Names. Go through each APN and change APN Type to "default,supl" (or "Internet" if it is a selection list) instead of "batteryfu_disabled". Alternatively, when in the APN list, press menu button and select "Reset to default".
- When I start BatteryFu, I get an "APN Error" message saying something about APN's and CDMA I don't understand. I never got this before! Please fix!
The error message is the result of an APN test that was added to BatteryFu v1.20, which attempts to detect phone settings that are incompatible with BatteryFu (which could also be something trivial like another app that has disabled your APN before BatteryFu was started). Previously, BatteryFu would look like it was working, but it wouldn't save you any battery because it was unable to disable your mobile data connection. This resulted in a lot of negative comments on my app. Now it lets you know that it won't work (which also means that it never actually worked before).
What can you do to fix this? My recommended way to get around the problem, is to install the APNdroid application from the market, and then tick the option to use APNdroid in BatteryFu (Mobile data options > Use APNdroid app).
Alternatively, if you understand the process, you can do this manually: If your phone has only one APN, and it's APN Type is set to "Internet + MMS" (or "default,supl,mms" or just "mms"), then BatteryFu will not disable it, since it is needed for MMS. In this case, change the type to "Internet" (or "default,supl"), then make a copy of the APN and set the copy to "MMS" so that you can still receive MMS. BatteryFu should now work (in theory, I have not been able to test this - please let me know if it works for you).
- What if I want to surf the web? If I manually activate my wifi/3g won't BatteryFu close it?
Yes it will, when it begins it's next sleep cycle. So please disable BatteryFu (by using the toggle widget for example) when you want to use the web (or use the Data while screen on feature). When disabled, BatteryFu will automatically enable your data connections before exiting. You can then re-enable BatteryFu when you are done to get back into power saving mode.
- Can you show some indication of how much battery was saved?
No this it actually impossible, because what would it compare the amount of battery saved to? Compared to a phone not running any software? Compared to the phone when it gets 10 calls at 2 mins per call, plus a weather widget updating every 15 mins? Instead, I will try to give an indication of expected battery life based on current usage, in a future version (e.g. you have 3 days and 2 hours of battery life left).
- Hey, this thing isn't saving me any battery! Does it work?
Yes, it most certainly works, however constant use of your phone will obviously out-weigh the battery saving, i.e. it will not save you battery if you are a heavy user of the phone. If you use a battery widget that displays percentage battery remaining, you will see that while the phone is not in use (with BatteryFu enabled), battery use is minimal. So BatteryFu saves you battery while the phone is asleep.
If you get an APN error message when starting BatteryFu, then BatteryFu is incompatible with your network settings and is thus unable to disable your mobile data connection. In this case, you will see little-to-no battery saving. See the related FAQ on what you can do to fix this.
Moving BatteryFu (and other constant-use apps) to SD card can also cause extra battery drain, as the SD card must be switched on constantly. Keep BatteryFu in the internal memory.
- Data while screen on isn't working (or only works sometimes), why?
You probably have a task killer (or your phone is low on memory) so the service is getting killed. This will stop the feature from working. You will need to open BatteryFu and close it again to get it to restart the service. If you don't have a lock screen, you will need to untick the "Wait till screen unlocked" option.
It is not recommended that you use this feature - rather use the widget or notification icon to toggle BatteryFu as-and-when you need to use the internet. You will see more battery saving this way.
- What is this "DNS fix" and why does it require root?
The DNS fix is an experimental feature that is an attempt to fix Android bug #2207: 3G reconnection issue. See similar bug reports for APNDroid. It requires root access to your phone because it needs to set some system properties that are not possible to set otherwise. Note that if you are on Android 2.3.X or above, you will not need this feature and it will be disabled.
You must have a rooted phone to enable this feature. You should get a prompt asking for root access to the dnsfix.sh script after configuring BatteryFu. Please grant BatteryFu access and tick the "remember" checkbox, otherwise the prompt will popup during a sync and the phone screen might be off at the time.
For those without a rooted phone, I have found a work-around for Android 2.2: disable BatteryFu, toggle mobile data off and on (the data should then connect after a few seconds), then re-enable BatteryFu.
- Why doesn't BatteryFu work reliably across all phones and networks?
The biggest problem for BatteryFu is that Android does not provide a method to switch off mobile data (this was finally added in Android 2.3.X so BatteryFu should work reliably on those devices). This means that it needs to resort to back-door methods, which in this case is to disable your internet APN (in a similar way to how APNDroid does it). This method works for some GSM network configurations, but not others (and reportedly not for CDMA), and is also prone to an Android bug (see DNS fix workaround).
I have added the option to use APNdroid to switch mobile data as it has alternative ways to switch data that will work for more networks and devices. If mobile toggling is not working on your phone, please try installing APNdroid. BatteryFu will then automatically use it.
- What is the optimal configuration for BatteryFu?
There isn't an optimal configuration that suits everyone. I recommend the following for outstanding battery life for the average user though: enable toggling of mobile data, enable toggling of wifi, 1 hour sleep time, 3 minute connect time, disable "data while screen on", enable "night mode" from 10pm to 6am, and I also recommend setting your phone to use only 2G networks for additional battery saving. With moderate use and these settings, you should only need to charge your phone every 2 or 3 days.
Known issues (v1.37)
- Bug: Widget becomes unresponsive on some devices. Only work-around is to remove and re-add the widget. Rather use the notification icon than the widget (it works better).
- Moving BatteryFu to SD card can cause errors and extra battery drain (due to the SD card having to be switched on constantly).