Android OS battery drain – And how to solve it

Bought a new Android smartphone recently. After playing around with it I was absolutely not amused. Not at all. The battery life time was terrible. Only last one day. If at all. My last smartphone had a 2600mah battery. New one is equipped with a 3000mah battery. Should run 5 days with decent usage or even longer as both run the same Android 5.0.1 version and I got 4 days of usage with the old one. I noticed that even when the phone was not used at all the battery drain was like a slightly slower discharge:

Screenshot_2015-09-26-13-33-32

Biggest culprit was “Android OS”. What the heck!? I started my research and found out that I’m not alone with this shit. Android 5.x is full of battery drain issues. The Google bug tracker has plenty of them, here is just one of the most similar ones for the reference:

https://code.google.com/p/android/issues/detail?id=93639

Many advises I’ve read are like: “Make a factory reset”, “Wipe your cache”, “Disable GPS”, “Root your phone”, “Install Greenify”. All I can say is that most of them were not really noticeable. I can tell you what helped me the most and my battery stats are enhanced big time as you can see:

Screenshot_2015-10-02-17-23-08

I get now 5-6 days with normal (for me) usage. This includes Bluetooth always on, GPS when running, mobile data enabled whenever required, mail sync, Twitter, SMS, calling, Internet and some specific apps like my own smart home app. No chat or messenger though. What helped the most was to calm down the wake ups through “Google Play Services” and “Google App”. What I did was this:

  1. Disable “Google Play Services”, “Google Now”, “Google Contact Sync” and “Google Calendar Sync”.
  2. Reboot device
  3. Enable “Google Play Services”
  4. Reboot device
  5. Open Play Store
  6. Fill out account information
  7. Update apps incl. “Google Play Services”
  8. Make sure Google synchronize your stuff at least one time before you potentially stop the sync of your data!
  9. Enable “Google Contact Sync” and “Google Calendar Sync”

I tend to disable the option to sync all my data to Google and have restrict options in terms of what to disclose. As far as I understand the issue the “Google Play Service” runs in circles if the sync can not be processed at least once. As the service also tries to access your location the continuous wake up calls are very expensive. Should be an easy fix but unfortunately the issue is only marked as low priority.

If you are aware how to completely get rid of the “Android OS” in the battery stats please share your knowledge – as there is still room for improvement 🙂

Update: After some more testing another big optimization in terms of battery duration is to get rid of “Google App”. Using “Google Play Services” 7.5.71 decreases the battery about 3-5% in 12 hours in standby mode. Latest version 8.1.x on the other hand drains 12-18% in the same time if Google App is installed:

battery_drain_results

Update 2: There was a bug in the Android version I’m using that enables the enhanced Wi-Fi option “Scanning always available” after reboot and other circumstances. Disabled the option and activated Google App (again) and under normal condition I get now great standby times and the drain is gone. Worth to mention that the “Show cards” function under “Search and Now” was disabled though.

Update 3:

Intel Atom SOC is maybe not the best choice for an Android phone. New phone with Android 7 and a different processor looks far better. Of course, there is again one culprit that sucks battery like crazy. This time it is Bluetooth. But as there is a huge open attack vector it is a good idea to disable Bluetooth right now. Some battery stats with everything enabled except location and Bluetooth:

And the same device with Bluetooth activated for around 3 hours:

So, the final advice: Don’t use Intel SOC. Always update to latest available versions. Search and disable battery suckers. Hope for an Android version that don’t suck battery.

Status of my smart home project

I can’t really say that I’ve finished the project but it’s pretty far. The new UI is responsive, completely developed from a mobile first approach and looks nice on a smartphone, a tablet and with a normal desktop browser.

In addition I spent a lot of time to make everything flexible. This includes not only i18n (most of the UI is available in German, English and Spanish) but also 90% of the information and options are based on config files.

The system is actually a visualization/control system for a home automation bus system. Spent quite some time on points like security, ease of use and simplicity. And a bit on modularization but I guess this area needs some more refinement.

smarthomeconnect_homecontrol

Some labels will be renamed in the near future. The section “Switches” for example includes currently “Levels”. What it really does is to create and visualize/control any kind/amount of areas, such as floors, garden or single rooms. And then everything which is related to this area can be viewed and controlled, such as lights, sockets, thermostats, valves, … It’s technically possible to add the shutters to the “Levels”, but currently it feels more natural to put them in an own section. Time will tell if this should be changed.

The only completely custom module is the “Device” section. In this section the system is able to show any kind of device that is currently “on”  – means, the system can ping it. This section includes smartphones, tablets, notebooks, PCs, TVs and stuff like a Wii (not my XBox as the Xbox prevents a ping). This means that the system is somehow context aware. I have some hopes that the system can become really smart. Because it is most likely that somebody is at home if the TV is on. Or a laptop. Or a smartphone. Let’s see how this can be used. Best is that this information are available nearly for free and without beacons or any kind of unnatural manual registration.

So what’s next? I still want a always on speech control. And more sensors. But I think first comes some fine tuning and enhancements all around 🙂

Android offline speech recognition

Released today the OXAndroidDemo app on GitHub. As this app uses Android speech recognition features, it’s worth to mention that with Android >= 4.3 the speech recognition no longer requires the Google online service. Simple install the language files.

Goto “Settings” → “My device” → “Language & input”

Make sure to select “Google” and click the gear. Next step is to select “Offline Speech Recognition” and download your favorite languages.

Enjoy the faster and more anonymous speech recognition.