How To Identify Which Apps are Killing Your Phone’s Battery

It’s been two days now since I bought the OnePlus 3T and the battery drain is driving me crazy. It has drained by around 4% in the last 10 minutes and it would probably be dead in a few hours unless I charge it back. The wakelock detectors aren’t always helpful, so I went ahead and tracked all the running process in the phone to see which of those have been using more CPU.

The command to see all running processes in a unix system is top. Connect your phone to your PC and run the following command using ADB. In case you do not have access to your laptop right away, you can run this command on your phone using Terminal Emulator and without prefixing the command with adb.

adb shell top -m 20 -d 2

This command will connect to your phone and list down all running processes with the amount of CPU utilized by the process. The -m option will list down 20 processes and -d refers to the interval in which the command will be run. You can adjust these values as per your convenience.

To my surprise, I could see that com.google.android.music which is the package name for Google Play Music has been utilizing 25% of my CPU continuously even though it was not in use and with the screen being turned off. I just cannot afford to allocate a quarter of the phone’s CPU to a music app which is not running. Though I may have to cancel my subscription for Google Play Music, I had to uninstall the app. You can disable it if you’re not rooted.

This may not be the case with all devices – some of them using OnePlus 3T have reported that SwiftKey that comes in as a system app has been the culprit, but it didn’t seem to drain any battery for me. It’s been some time now since I uninstalled Google Play Music and the battery doesn’t seem to drain much.

Though the doze mode in Android 7 works pretty well by hibernating all network connections of apps when the phone has been idle for long, it doesn’t hibernate the apps when the phone is being used. You can also use Greenify to hibernate such problematic apps.