[OnePlus 3T Guides, News, & Discussion] nhshah7:
Everyone talks about the incredible battery life on the OP3T. I had some good battery life in the first couple weeks of having the phone, then it seemed like it had gotten worse around the time I installed 3.5.4, then continued when OOS4 hit. Friends of mine with the OP3T however, didn't have the same problem. I was essentially having constant drain to the point where my phone, whether the screen was on or off, dozing or not, would drain approx 2% per hour at baseline. Far worse than it should. Even more frustrating, the standard android battery page in settings showed me that my phone was being used most by Android System and Android OS (not even play services!). Here are some screenshots of my battery life and some stats:

View attachment 4000134View attachment 4000135

View attachment 4000136View attachment 4000137View attachment 4000142View attachment 4000143

View attachment 4000144View attachment 4000145

Being the standard XDA user, I decided to figure out what the hell was going on with my phone, so I installed the usual apps. My go to battery stat apps are: wakelock detector, betterbatterystats and gsam battery. These apps are fantastic for determining what is killing your battery, usually in the form of wakelocks. There is an incredibly helpful guide to understanding wakelocks here. These apps in my past experience had all required root to my knowledge, but I gave them a shot anyways. Since I am on stock OOS 4.0.1 without root or TWRP, I found that I was able to grant the necessary permissions by using adb commands to grant battery stats to each app despite not being rooted.

adb -d shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS
adb shell pm grant com.uzumapps.wakelockdetector.noroot android.permission.BATTERY_STATS
adb shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS

I then spent about a week obsessing over my battery life and literally checked these apps, especially GSam's "Rate of Change" (always showed AT LEAST 2-5% drop per hour, at MINIMUM) and "Other" graphs to try to figure out if my phone was sleeping properly, etc when I changed settings. Android OS and kernel were both at the top of the multiple lists of apps using data in GSam and BBS, but when I would click on each process, it wouldn't actually tell me what was driving their high utilization. I looked through these two processes and noticed for example that NLP was high so I disabled location on all apps except google now. I even disabled location services completely (with no subsequent change in battery life). What was frustrating to me, though, was that my battery wasn't draining due to wakelocks. The wakelocks I had were appropriate. Google now set off thousands of alarms (*alarm*), but this didn't seem to be the reason for my battery drain. I also changed pretty much any setting with anything to do with battery life, hoping that it would fix my issue, ie disabling pocket mode, disabling ambient display, disabling google backup, setting my exchange email account to poll every 60 mins instead of push email, removing extra apps, uninstalling screen filter apps (ie lux dash, twilight), using greenify, turning on aggressive doze mode, etc. Ultimately, I performed a factory reset because I thought maybe the upgrades from 3.5.3 to 4.0.1 caused some trouble. I only installed the essential apps I would use every day, but soon after realized that my battery life was unchanged after the reset.

Then yesterday, I came across something about apps utilizing more CPU time, etc. GSam and these apps list the stats for CPU time by app, but my interest was piqued. I opened GSam and looked at the CPU usage graph and realized that my CPU was constantly being utilized and wasn't coming down to 307 mhz very often. I installed a couple random CPU apps from the play store but nothing gave me the information I was looking for. They just confirmed what I noticed in GSam, that my CPU was never really off. Next, I figured hey, I do it on Windows, why don't I try to use ADB to look at my CPU usage real time by app/process. A quick google search and some futzing around and I was in business with the following ADB command (NB: hit ctrl+c to exit out of the loop):

adb shell top -m 20 -d 2

This command brought up the top 20 processes using my CPU and would refresh every 2-3 seconds as long as the command was still running. When I would shut my phone off and let it "idle", I found the two unsuspected culprit applications that were CONSISTENTLY eating up 2% and 1% of my CPU: textra(see 4/30 update below) and swiftkey. I uninstalled textra and switched to google messenger. I tried switching my default keyboard to google keyboard, but had the same issue, so ultimately had to disable swiftkey (can't uninstall it without root as it's a system app). After that, I was in business. My phone went from 2+% drain per hour while idle/dozing to 0.7%/hr (according to gsam). Overnight, I only lost 2% battery over 5 hours while I was sleeping. This used to be at least 6-7% before. I'm almost at 24 hours since discovering this, and my battery life is MUCH better even with heavy use.

View attachment 4000130View attachment 4000147View attachment 4000149

Thanks for reading, hopefully this is helpful to others in tracking down some rogue or crazy app that is driving you crazy. Cheers!

Edit 1/12, full day 2: battery life went crappy on me again. Looks like inbox was the culprit this time, consistently in the top 3-5 processes. Wiping data seems to have fixed it for now (not sure what changed, wiped cache first and closed out of inbox properly prior to wiping data).

Edit 4/14: gboard keyboard began doing the same thing for me last month that swiftkey used to do. Went back to swiftkey and seems the issue is resolved and swiftkey no longer drains better like crazy.

Update 4/30

Update 5/24:

Googlequicksearchbox alarms were driving me nuts, with thousands of alarms resulting in HOURS of kernel wakelocks. I realized this had only been going on since I upgraded to OOS 4.1.3. My work-around was initially to disable the google now feed but apparently removing the google now widget from the home screen (regardless of whether on nova, OP launcher or google now launcher) stops the alarms and significantly improves battery life. Wow.