yashsingh1/xdaforums huggingface dataset:
[Android General] Tayx:
Hey guys, amazing thread! I have been rocking Resurrection Remix with Nougat 7.1.2 for a while now, but I always had around 2.5-3% idle battery drain, and at the end of the day my m8 was always in the single digits. I recalled that like a year ago I was trying out Amplify with Xposed and got like 0.2% idle drain with Marshmallow, so I decided to roll back to Android 6.0.1 (due to Xposed still not being available for Nougat) and test it.

Sadly, I got almost the same results with 6.0.1 and following all the steps of this thread (Greenify, Amplify, Power Nap, etc.). I just read in this thread that apparently Nougat is much better at managing wakelocks and idle drain, and you don't need so many battery management apps, so I facepalmed a bit. Either way, I did what the OP said in post #6 of leaving the phone more than 6 hours idle without turning the screen on, and here is the dump file: (I couldn't upload the file here, don't know why, so I'm sharing a Pastebin, I hope that's ok)

pastebin .com/ Wisk2bVU - (I had to put spaces in the link because this is my 2nd post here and I can't post links yet, sorry...)

I'm also going back to Nougat to test it with BBS and see the exact difference between them. I'll report back with the results when I have them ;)
[Android General] closee91:
May be a bad battery?

Sent from my LG D851 running Blisspop ROM

If I helped you out, hit thanks!!! :D
[Android General] Portgas D. Ace:
I guess the culprit is your screen on time of more than two hours ;)
[Android General] ram4ufriends:
Is there something I can do to improve battery life? I didn't see sync_manager in amplify alarms. Also xda application doesn't send notifications when it is greenified though I have slect allow GCM push. I get notifications from some other apps though which are greenified.
[Android General] Xanis:
[MENTION=5867207]vaisakh7[/MENTION] Hmm that's weird, because i always had screen on the first place in battery stats, but if you say everything is fine then ok. I'll see how many hours on screen i get this time. Thanks for help :)
[Android General] ZlatanIbra:
Greenify is good but android normally is smart enough to cache app memory, by constantly forcing apps to close android won't be able to work smartly.

So this is battery over performance
[Android General] v7:
Limit com.android.providers.calendar.intent.CalendarProvider2 to 7200 seconds.

Use alternate calender.

If you have sync disabled,you won't find SYNC_ALARM in Amplify.

Use Tapatalk instead of XDA App.

Tapped from my furious dogo ;)
[Android General] ram4ufriends:
Hmm...but I have the sync enabled and get all the mails...anyway thanks...anything else do I need to change?
[Android General] v7:
[MENTION=6294804]ZlatanIbra[/MENTION] Greenify doesn't force close apps.It "Hibernates" it.

Here's an excellent explanation from [MENTION=5141926]lioux[/MENTION]

Greenify-Working

Tapped from my furious dogo ;)
[Android General] v7:
ram4ufriends Doesn't android.content.syncmanager.SYNC_ALARM show up in your Amplify list?

Tapped from my furious dogo ;)
[Android General] ram4ufriends:
I swear I didn't see this yesterday :what:..I see that now..I limited that to 7200 now..would that delay gmail notification as well?
[Android General] v7:
Probably,Yes.

Tapped from my furious dogo ;)
[Android General] Javi22:
I am slowly following your guide, I just apply one change for day for finding possible troubles/battery drain (I advise everyone to do this.. Sometimes I've found that limiting some things actually cause more drain)

So I can't give feedback yet. But I've trouble regarding greenify and Google app, do you receive reminders?

I've tried and I won't receive any reminder I set. Even tried not deep hibernation...
[Android General] v7:
[MENTION=3723298]Javi22[/MENTION] Are you using Power Nap?If so whitelist Google App in Power Nap.

Tapped from my furious dogo ;)
[Android General] Javi22:
No mate, didn't disable services neither

Just amplify, but only limited net scheduler thing, nothing else

Enviado desde mi HTC One mediante Tapatalk
[Android General] v7:
[MENTION=3723298]Javi22[/MENTION] Removing Google App from Greenify fixes the issue?

Tapped from my furious dogo ;)
[Android General] Javi22:
Yep, it does

Enviado desde mi HTC One mediante Tapatalk
[Android General] ram4ufriends:
Do you know by any chance what this is? It's on my top battery consuming everyday even though I don't listen to music.
[Android General] Phelicks:
No, the problem is in AppsOpsXposed, when I switch it off, everything is fine, but when it's working, Google Fit does not operate properly ?
[Android General] v7:
Related to notification sounds.

Tapped from my furious dogo ;)
[Android General] v7:
[MENTION=3723298]Javi22[/MENTION] Then probably the Greenify bug.I've mentioned it in the thread a few time.Let's wait for a fix.

Tapped from my furious dogo ;)
[Android General] DB126:
Ha - device was awake for 3-3/4 hours with Amplify and PowerNap being the primary culprits. Obviously they aren't suppose to behave that way. Found it ironic that two vaunted power saving apps show up and the biggest consumers. Likely a conflict between the two or a faux attribution of wakelocks to these apps.

Be interesting to see your results on 'naked' Nougat. Generally does a pretty good (albeit imperfect) job reining in rogue wakelocks and runaway background processes.
[Android General] Tayx:
Yeah, I thought so too, but I whitelisted everything correctly in Power Nap, and set the exact values in Amplify... So... No clue.

I was going to test Nougat with Greenify, but do you think it's better to try it "naked" first? (Also, are there any other apps that help improve battery life in Nougat without Xposed?)
[Android General] DB126:
I stopped using Amplify and most other 'power saving' apps long ago due to erratic behavior and questionable benefit. On Marshmallow I use Greenify for sensor management (doze-on-the-go) and to rein in a few rouge apps. Also MyAndroidTools to surgically deal with broadcast receivers and services.

My approach is simple: only go after items that are proven drainers (typically by preventing/delaying sleep) and ignore everything else. Most wakelocks are benign and a small amount of idle wake time typically does not amount to significant power consumption. Purests would be horrified that the goal isn't zero wakelocks and zero idle wake time but neither return enough benefit to warrent the effort.

As for Nougat, start naked and see where the data takes you.
[Android General] Tayx:
Great! I'll keep all that in mind. My objective is to lower that ~3%/h to something more manageable like 1%/h, because in a full day that can amount to ~25%, and that isn't negligible. I completely agree with you that there's a point where continuing to shave fractions of a percent is not worth the effort.

I'm going to leave the phone tonight with 7.1.2 naked and test it with ~7 hours. I'll report back tomorrow ;)
[Android General] Tayx:
Ok, I left my phone last night about 8 hours with naked Nougat 7.1.2, and I had 2.5%/h, pretty dissapointing.

Since 8 h 29 m 19 s

Level lost [%]: Bat.: -21%(100% to 79%) [2.5%/h]

Deep Sleep (): 3 h 51 m 42 s 45.5%

Awake (Screen Off) (): 4 h 37 m 21 s 54.5%

======================
Alarms (requires BATTERY_STATS permissions)
======================
com.google.android.gms (): Wakeups: 112 (13.2 / h)
Alarms: 18, Intent: com.google.android.location.ALARM_WAKEUP_LOCATOR
Alarms: 26, Intent: com.google.android.location.ALARM_WAKEUP_ACTIVITY_DETECTION
Alarms: 0, Intent: com.google.android.location.internal.action.ULR_BAROMETER_READ_ALARM
Alarms: 0, Intent: null
Alarms: 6, Intent: com.google.android.gms/.checkin.EventLogServiceReceiver
Alarms: 6, Intent: CONTEXT_MANAGER_ALARM_WAKEUP_56991
Alarms: 3, Intent: com.google.android.location.ALARM_WAKEUP_IN_OUT_DOOR_COLLECTOR
Alarms: 0, Intent: com.google.android.gms.common.receiver.LOG_CORE_ANALYTICS
Alarms: 10, Intent: com.google.android.location.internal.action.ULR_BLE_SCAN_ALARM
Alarms: 32, Intent: com.google.android.gms.gcm.HEARTBEAT_ALARM
Alarms: 1, Intent: null.INACTIVITY_TRIGGERED
Alarms: 1, Intent: com.google.android.location.ALARM_WAKEUP_SENSOR_UPLOADER
Alarms: 1, Intent: com.google.android.location.ALARM_WAKEUP_ACTIVE_COLLECTOR
Alarms: 4, Intent: com.google.android.location.reporting.ACTION_UPDATE_WORLD
Alarms: 1, Intent: com.google.android.location.ALARM_WAKEUP_SENSOR_COLLECTOR
Alarms: 0, Intent: com.google.android.location.ALARM_WAKEUP_CALIBRATION_COLLECTOR
Alarms: 1, Intent: com.google.android.gms.matchstick.register_intent_action
Alarms: 1, Intent: com.google.android.gms.measurement.UPLOAD
Alarms: 1, Intent: com.google.android.location.ALARM_WAKEUP_PASSIVE_COLLECTOR
Alarms: 0, Intent: com.google.android.gms/.checkin.CheckinServiceReceiver
Alarms: 0, Intent: com.google.android.gms/com.google.android.libraries.social.mediamonitor.MediaMonitorIntentService
Alarms: 0, Intent: com.google.android.gms.drive.ApiService.RESET_AFTER_BOOT

Here is the pastebin: pastebin .com/g7tpuQWP

Looking at the results it seems that Google Play Services is the main cause for the awake time. Do you know what is the best way to reduce drain with this results? What stuff should I block with MyAndroidTools?
[Android General] DB126:
Device was awake for 4½ hours which obviously isn't right. Google Calendar and WhatsApp are shown as primary culprits; hard to tell if that's accurate given BBS wakelock was 18m; normally only a few seconds while processing data immediatlely after wake. Starting to wonder if something is amiss with your device or kernel. Perhaps someone with more H8 experience could chime in.

Results are not reflective of Nougat (or Marshmallow w/modified doze) sleep performance. Something else is amiss. There is no point in limiting Google Services, etc. until the culprit is identified. Just masking symptoms and never getting to root cause.

In your shoes I would backup and wipe all partitions (at minimum system and data) then reflash Nougat and a basic GAaps package, eg: Open GAaps nano. See how it performs without your app portfillo/data. I realize this may be hard as your phone will be of limited use during the test. If drain rates remain high then your problem lies elsewhere.

BTW - same test could be conducted with a MM or even 'stock' ROM. Purpose is to establish a baseline which is often close to optimal performance levels depending how the ROM and included apps (in stock) are tuned.
[Android General] Tayx:
Yep, you're right, I just tried the settings from this guide -> https://xdaforums.com/galaxy-s-advance/themes-apps/share-myandroidtools-guide-to-disable-t2869119 , but ended up with a 99% wakelock of Google Play Services.

There is something I forgot to mention, I have tweaked some stuff with Kernel Adiutor (arteractive CPU gov, max 1574Mhz freq, MSM hotplug, I mention all my setup in this post), but nothing major.

I like your idea, I'm going to try a clean flash of the newest RR Rom with 7.1.2 and nano GAPPS, and see what the baseline is with that (without modifying anything kernel related). If that still doesn't change anything I'll go with Lineage, because I don't like the m8 stock Sense Rom, but if it comes to that... I guess I'll try.
[Android General] DB126:
Also possible you have a misbehaving radio, sensor or other hardware that is triggering prolonged wakelocks. Outlier for sure but should not be dismissed should issues persist with a clean ROM. Worth a quick test run on stock to eliminate the possibility of missing/mismatched binary (ie: hardware driver).
[Android General] Tayx:
Ok, I have tested 2.5 hours 7.1.2 (clean) with and without airplane mode on (I know I should have left them more time, but I just wanted some rough numbers). This are the results:

Airplane mode OFF -> https://pastebin.com/ifQjuVns

Level lost [%]: Bat.: -5%(100% to 95%) [2.1%/h]

Deep Sleep (): 1 h 3 m 36 s 43.8%

Awake (Screen Off) (): 1 h 21 m 35 s 56.2%

Airplane mode ON -> https://pastebin.com/wwb2Hau5

Level lost [%]: Bat.: -1%(100% to 99%) [0.4%/h]

Deep Sleep (): 2 h 26 m 43 s 94.1%

Awake (Screen Off) (): 2 m 51 s 1.8%

I'm going to try with a stock rom tonight, and see how that goes.

I would love to know how to reduce the amount of checks that Google Play Services makes, but I have no idea how.
[Android General] phonetech101:
Just thought I'd share this, 1% drop over 5hours using mircoG no greenify no natime or other doze apps. No AKT just a few alram blocks and wakelock triggers blocked still get all emails and sms fine no loss of "function"as some might say. A lot of trial and error to find exactly what to block and what not to, have some fun with it these things are unbrickable ?
[Android General] justjr:
You have localization history, background wifi and bluetooth disabled in the localization as well?

You can block receivers with MAT and SDMaid, see here: https://xdaforums.com/oneplus-3/how-to/guide-stop-google-play-services-t3549760

I would love to know what [MENTION=5488402]Davey126[/MENTION] recommend to block, I do only block the measurements and analytics receivers, scheduler caused me problems.

I'm getting about 0,4%h over night with my stock rom without a lot of tuning. Just this, greenify (donated long time ago) just the bad apps (cough.. facebook lite, instagram) and its doze on the go, amplify only some wake_up alarms that caused me drain, no wakelocks blocked, and so on. Xposed modules really make diference. I'm loving to stay stock now. I permanently tune and check results.
[Android General] DB126:
Google Play Services 'checks' are contributing to drain but likely do not make up the bulk of the difference between 0.4% and 2.1%. Need to run a BBS study to see what is driving the 1-1/2 hour (>50%) wake time when radios are active. I assume you have WiFi scanning disabled which can be a significant drainer.

---------- Post added at 10:26 PM ---------- Previous post was at 10:18 PM ----------

Pretty much the same deal with Open GAaps micro, Greenify (primarily to disable motion sensor wakes on MM) and a few troublesome services disabled. All radios enabled with full Google location services (except history) and no wakelock blocking. 0.15-0.20% per hour at rest; a touch higher when device is in motion. As with your device no loss of functionality. Haven't see the need to go the MicroG route but understand why some like that option.
[Android General] airiartev:
In my case the Keyboard Chrooma is using that weird service... Spying?
[Android General] DB126:
Part of Firebase Analytics. Worth stopping IMHO; I found it to be a battery drainer among other concerns. However, Google Play Services will automatically re-enable the service at boot and other periodic intervals unless a method like MyAndroidTools Xposed is used to prevent auto-reenabling.

Firebase Analytics provides developers with copious detail about how you use your device and apps. Google really does not want you to disable it as evidenced by the auto restart.
[Android General] phonetech101:
Yeah I hear ya, I change back n forth never stay on the same setup for very long. I just never seem to be able to get play services to stop with the drain and have tried multiple ways haha.
[Android General] justjr:
Oh yeah, I forgot to say firebase, I block measurement, analytics (google services) and firebase (play store) alone with MAT.
[Android General] phonetech101:
What apps best for stopping these firsebase Analytics? Don't like the idea of sharing data :/

---------- Post added at 03:51 AM ---------- Previous post was at 03:51 AM ----------

MAT??
[Android General] justjr:
MyAndroidTools, try the link I posted on previous page to a simple guide.
[Android General] phonetech101:
Oh derr sorry that was stupid of me, haha thanks mate.
[Android General] zulfi984:
This is my new ROM XenonHD for 7.1.2 a clean flashed yesterday.. Without any tweaks.. I enable 3G+Wifi+Location and and not I touch my mob for 9+hours.. i have mistaken many times on BBS log.. i think this will be the correct measurement.. Thank You to everyone for my responses..
[Android General] airiartev:
I really liked Chrooma but this has been the last bug to unnistall Chrooma... I unninstalled and now that service, doesnt appear, now Google Play service isnt active so many times and now the standby is even better. That measurement service of Chrooma used to use like a 60-70% of the play services usage.

Now I am on Swiftkey, a keyboard that I dont like and whose main app is bad developed, laggy and lack of options. I need specially one, to turn of that prediction bar.

But at least I dont have the chrooma weird service and battery drain.

In a OnePlus3T

---------- Post added at 12:30 PM ---------- Previous post was at 12:29 PM ----------

MAT needs root?
[Android General] DB126:
Certainly for more advanced functionality. I have no unrooted devices so can't comment on it's usefulness in that environment.

---------- Post added at 12:34 PM ---------- Previous post was at 12:17 PM ----------

Log is good! Device was awake for ~45 min and rather active during those times. Despite that still a bit surprised at the 17% loss over 9 hrs but don't know much about the device (eg: battery capacity).

There appear to be many small contributors to wake time including much Facebook (lite) and Google search box activity. WiFi was off during sleep so any network activity ran through the mobile radio which is generally less efficient.

Unfortunately, I am traveling the next two days with limited time so could not dig deeper into the log. Hopefully another contributor can chime in with suggestions. Your options are somewhat limited on Nougat (no Xposed) but you should be able to curb much of the drain through some simple actions.

Will take another look when I get back if needed.
[Android General] cbx572:
No restart
[Android General] DB126:
Huh, what? The detail is overwhelming.
[Android General] airiartev:
I created this thread to advise about Chrooma wakelocks and battery issues. Share to those that have chrooma installed, maybe it could help them

https://forums.oneplus.net/threads/...st-of-the-play-services-battery-drain.530984/
[Android General] zulfi984:
okey no problem.. u can take ur time.. finish your busy time..
[Android General] Tayx:
I do, I have all the localization stuff turned off (localization history, background wifi and bluetooth scans). Last night I restored my backup because I needed to use the phone today, but just to check, I decided to leave it all night in airplane mode to see my ideal idle drain, which seems to be around ~0.2%/h.

Airplane mode ON

Level lost [%]: Bat.: -1%(100% to 99%) [0.2%/h]

Deep Sleep (): 6 h 11 m 28 s 99.2%

Awake (Screen Off) (): 2 m 29 s 0.7%

Logfile -> https://pastebin.com/eAjQz4BT

Following the guide that you posted, [MENTION=5188092]justjr[/MENTION] , I got this results: (the same as always...)

Airplane mode OFF

Level lost [%]: Bat.: -8%(100% to 92%) [2.4%/h]

Deep Sleep (): 1 h 33 m 40 s 46.3%

Awake (Screen Off) (): 1 h 48 m 42 s 53.7%

Logfile -> https://pastebin.com/p43jenLL

Also, [MENTION=5488402]Davey126[/MENTION] , of those "few troublesome services disabled", are there any of them that may be causing trouble for me too?

Thanks to both of you for the help, I really want to get under 1%/h idle drain ;)
[Android General] justjr:
It seems like on first log WiFi was off and on the second WiFi was on, isn't that right? I might be misreading the log, please [MENTION=5488402]Davey126[/MENTION] can confirm?

If that's the case I don't think you can compare the logs correctly.

Also you disabled net_scheduler? I do not recommend it, curious to know which broadcasts receivers Davey block.

edit: ops, 1st log wifi off, 2nd wifi on
[Android General] Tayx:
Yes, I clarify on the beggining of the post that the first log is with airplane mode ON, but I'll edit the post just in case someone else misunderstood.

The only thing i wanted to know from the first log (airplane mode On), is my ideal battery drain. The second log is for you guys, if you can help me find out how to reduce the battery consumption to something more manageable.
[Android General] justjr:
Hmmm, better wait Davey take a look, he knows a lot more in regarding reading the log. But it seems that Google Play is the gret offender.

What I also do here is to disable apps I don't want booting with the system using SDMaid, it's a little hard to use, but enable developer/advanced stuff on options, and check them AppControl tab that will appear. I don't know if it will affect idle battery drain thought, maybe.
[Android General] :
Does Micro G affect any login services etc? I really want to disable Google Play Services due to battery drain.
[Android General] phonetech101:
Login service's such as? I haven't had any issues what's so ever for logging into anything. Just give it a go mate :) always revert back to gapps if ya unhappy for any reason.
[Android General] Callliope:
What are the disvantages of micro g apps? I want to get push notifications to apps and be able to acces gmail/gmaps/gplaystore and drive
[Android General] Hiji56:
Same crazy leak on my note 4 too(

It's not depend on kernel or rom build. For my only after Google play and services update and only after I adds an google account. It seems to me that after some action GS fall in loop with watchdog and time reset.

If i wipe GP and GS date, wipe Dalvik/ART cache, only then my phone find rest. I think only way to find stable GP and GS build and prevent it auto-update by luckypather...

Or find that crazy app that call GS-_-
[Android General] jackyaway:
Hi! My phone lost 7% of battery during night. Can you help me to analyze this log and try to solve the problem? Thank you. http://cloud.tapatalk.com/s/590ab4a54eae5/BetterBatteryStats-2017-05-04_064722073.txt

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[Android General] Portgas D. Ace:
You could try to install microG instead of Google Play Services. It will enable (most) functionality like location, push notifications and so on. Since some days, it has even become more easier to install since a Magisk module is available for it (see second linked thread).

Check here:

https://xdaforums.com/android/apps-games/app-microg-gmscore-floss-play-services-t3217616

https://xdaforums.com/apps/magisk/module-nanomod-5-0-20170405-microg-t3584928
[Android General] skyline72:
Hi all,

I had recently changed to the Mi Mix and revisit this thread since the days of G4.

Had charged to 100% and reboot and left it there until I just woke. It had fallen 11% which is quite a lot.

Attached is my log file from BBS.

Any advice would be greatly appreciated.
[Android General] DB126:
Looks like WhatsApp in combination with a dicey mobile signal are the primary culprits. Drop it into airplane mode for a comparitive assessment. If there is a dramatic improvement you'll need to work on those items.
[Android General] CounterC:
Same here, any info? Couldn't find anything.
[Android General] marcdw:
You'll have to check on that yourself. Portgas just posted a couple of links you can check out.

If you insist/rely on using Google apps then it's probably best to stick with Google Play Services.

Check a compatibility list though. Some things like YouTube apparently work fine. Some, like Hangouts, do not.

Push notifications are fine. Might be an app or two that might not work right.

https://shadow53.com/no-gapps/alternatives/

LG G3 D851, PAC-MAN LP ROM, MultiROM, Tapatalk 4.9.5
[Android General] ProudRed:
http://cloud.tapatalk.com/s/590fd82dcf923/BetterBatteryStats-2017-05-08_075457436.txt

http://cloud.tapatalk.com/s/590fd9175ff69/logcat-2017-05-08_075457567.txt

New device , please have a look if everything is normal. If something can be tweaked.. kindly inform.
[Android General] DB126:
1% loss over 7+ hours (0.1%/hour rounded) with <4 min wake time is outstanding. Not worth the time to peruse the log further. Enjoy!
[Android General] iroshan:
Can somebody help me with this log. Probably my battery is old now,

Is there anything I can tweak?

Thanks in advance.