Search results for

All search results
Best daily deals

Affiliate links on Android Authority may earn us a commission. Learn more.

Android customization - improve battery life, use ADB logcat to find battery hogs

In our pursuit for better battery life, our Android customization post this week seeks to use the ADB logcat to hunt down problematic apps that are eating up your battery.
By

Published onApril 2, 2015

Last week on our Android customization series, we took a few moments to look at the built-in Android tools in an attempt to hunt down rogue apps eating up your battery. We continue that pursuit for battery life perfection this week, taking a little bit more advanced look at identifying battery killing apps.

Warning: This week’s post is not intended for beginning Android users. While we encourage you all to expand your abilities, maybe even to give this project a go, we will be using Google’s ADB developer tools, which are not exactly made for your everyday Android experience.

Before we get started

Today we have a whole bunch of requirements, luckily, there is a great chance that you have everything you need kicking around. First, you will need a computer with a functioning Windows, Mac or Linux operating system. From there, that computer must have a functioning USB port. Doesn’t sound too bad so far, does it? Lastly, as far as hardware goes, you’ll need the USB cable that goes to your Android device.

Aside from the super obvious stuff above, you are going to need to have the Android SDK and appropriate drivers for your Android device installed on your computer. If you are unsure how this is done, rest assured, we’ve got you covered:

Use Logcat to watch your system

The idea is pretty simple here today folks, logcat is a tool that watches all of the system level actions on your device. While this list may be a little overwhelming at first, it is a low level developer’s tool after all, it shouldn’t take long for you to recognize your apps and how they are taking up the cycles on your device.

Once you have the Android SDK and ADP setup and running, you are likely already connected to your computer, but let’s start with those steps anyhow.

Nexus 9 HP Chromebook USB cable

Connect your Android device to your computer.

Turn on the necessary settings for your device, including USB Debugging, which is found in your Developer Options.

Fire up a command prompt on your computer.

Now, you will either have to CD (change directory) navigate to the location of your ADB.exe, or, find it in your platform-tools folder and open the folder in a terminal/command window.

Enter the command adb devices and hit enter. This step isn’t actually required, but it is a simple way to make sure your PC and your Android device are talking.

Enter the command adb logcat and hit enter.

Sit back and watch as your device pumps out its actions to your computer screen.

ADB Logcat CMD Windows

Now that you have your logcat, what’s eating your battery?

There is no easy solution here. Logcat is designed to catch actions as they happen, this means you will need to spend some time connected, allowing your device to do its thing. As you watch the log, you will soon begin to identify your apps, especially if they are misbehaving.

Our results

ADB Logcat Pogoplug WiFi off

If you recall, we’ve been hunting down poor battery life on our Nexus 9. Although we still have to figure out the real culprit, we learned something extremely valuable. We were able to determine that, as anticipated, two of our favorite customization apps, Pushbullet and Zooper Widget, are very well behaved apps. They do keep the device awake a bit here and there, as is expected with this level of use, but certainly are well behaved enough that uninstalling them is not required. At least this is true when you are connected to WiFi!

That’s right, the moment we turned off WiFi, as we have been doing frequently in an attempt to reduce power consumption, activity for both services ramp up. Again, the actions Pushbullet and Zooper Widget are taking are not strenuous on the battery themselves, but they are frequent, preventing your device from entering and remaining in a sleep state, thus, killing the battery faster than would be expected. Do we uninstall the apps or just keep WiFi turned on? Not sure yet, but we are pleased that we have something to work with.

What’s next

I hope that you were not expecting magic here today folks. There is no doubt that logcat is a bulletproof method to see what your device is doing in the background, but it is now up to you to determine if all of your apps’ actions are justified, or if you need to do a little uninstalling.

Every once in a while you can repair an app without full un-installation. Make sure you’ve got the app data backed up, if applicable, then head into the App section of Settings, try hitting the Clear Cache and/or Clear Data buttons. Clearing data will reset the app to an empty state, wiping all of your saved game data or requiring you to log back into the service.

Android clear app cache

While there is no guarantee that wiping an app’s data will fix it, you should find it is at least worth trying before giving up and uninstalling completely.

Final thought, do keep in mind that there are some apps that you just cannot fix. We’ve named and shamed some of these apps before. In the end, you may choose to live with the battery drain, if the app serves a purpose well enough for you. Worst of all, you may find that the Android operating system itself is sapping all your juice. If you are like me, you are just sitting back praying that Google pushes out a fix soon, or are considering some of those custom ROMs out there instead.

Next week

Android ADB shell

As we continued the process of hunting down apps that are eating up our battery, our Android customization post this week took to logcat to see what is going on. To get to logcat, we needed to use ADB, and you know what, ADB has some other cool features as well, let’s take a look at a few next week.

Did you manage to find any rogue apps in your logcat today? Will you uninstall them? Can you uninstall them?

You might like