[Android Q&A, Help & Troubleshooting] Deus.:
Hi guys,

I can see a lot of posts where somebody complains about battery drain; most of the time no information provided, therefore telling them what causes it is a sorcery or gamble.

Here I would like to share some general steps what can you do to find the cause of the issue, how can you see which app doesn't let your phone go into deep sleep.

1.) First, check your battery stat in Settings. It's very easy and shows you the basics of your battery usage, giving you the first step on your way to debug the consumption.

2.) I know you read a lot about logcat. It isn't accidental, the logcat contains all the invisible information your phone does and suffer from in the background since the last restart.

Collect this file as it is described here or here. Don't upload it, try to analyse it at your own first. To do it, open the generated file with an advanced text editor, for example with Sublime and search for recurrent patterns (you can see it on the right side of the screen) or continuous issues. Search ( not casesensitively) for the following keywords: error, crash, fail, fatal, permission, exception, "Caused by". Anything can be suspicious if that happens repeatedly because your phone won't go into deep sleep, therefore it will use battery power.

Based on your findings you can search on Google or on this forum for the reason.

Please note that the logcat can (not necessarily does) contain personal information, for example WiFi network name, location, etc, therefore I wouldn't recommend to upload it if that is not necessary. Really, first check it on your own. Get familiar with debugging, spend a few minutes with reading it.

3.) Use an app to see if your CPU cores are going into deep sleep. An amazing app to check it is BetterBatteryStats where you can see how much time was your CPU in awake status, how much in deep sleep, etc. This kind of tools usually show you which service used the most battery (if it is the Android system then you can be sure not an app from the Play Store, but maybe an Xposed module causes it), which Wakelock kept your phone awake. The wakelock's name contains the developer or the app name which you can use to see which application was the one that used most of your battery juice.

4.) Install and configure Greenify. This tool puts your applications into a hibernated status, the best result can be achieved if you have Xposed and you activate the Greenify module there (unfortunately on Nougat it doesn't work at the moment, even you activate it in Xposed the app cannot use Xposed functionalities). Read this article if you would like to get more information about this fantastic app.

5.) On a rooted phone you can use Amplify to see the wakelocks. DON'T block anything immediately, let it run for a day to collect some stats and based on the result, check which wakelock runs the most of the time and which was running the longest. If it was a sync wakelock (for example SyncLoopWakeLock), can be if you block it you won't get messages, or receiving messages will be delayed. Take care when you set the frequency of the run of the wakelock, first try with a smaller number and if you can see it doesn't cause crashes, all your messages arriving right on time, increase the number.

6.) In some cases, using Force Doze can help to put your phone in doze which can help you to save battery time. You can get more info about this app here.

7.) Use Tasker or similar app to automate things, for example turn off WiFi if you leave your home or workplace, turn off mobile internet when you arrive home and connect to your WiFi network, etc.

Let me know if I forgot something to extend the list :)

FAQ:

- Will you check my logcat?

- No.

- Do you guarantee I will find the reason of my phone's battery drain?

- No. The above steps can help you to find, but it isn't guaranteed.

- Can you tell me which app uses the most of my battery?

- No. Read the above steps to figure it out.