yashsingh1/xdaforums huggingface dataset:
[Android General] DB126:
Thanks. I do not need the enhanced security features in R2Mail2 as my current client (AquaMail) already sets a high bar for the real world exposures that I'm personally concerned with. Not surprised battery endurance improved following the switch as K9 s not known to be an efficient client. As for overall device efficiency my boring mainstream $100 USD mobile running stock (albeit rooted) Android 6.x rocks 0.2-0.3% per hour drain rates with all radios on, Google location services enabled, push mail active 7x24 and full priority notifications which briefly illuminate the display as needed. Aside from disabling receivers on a few poorly coded apps the only power management tool in play is Greenify for 'Doze on the Go' capability emulating what's already built into Nougat. No Amplify​ or other silly wakelock limiting. As you may recall I'm a minimalist prefering to leverage stock configs whenever possible. When additional actions are required (high bar) I go after the source in a manner that maximizes effectiveness while minimizing initial and ongoing efforts. It's the old 'enjoy your device more by managing it less' adage that not everyone subscribes to.

R2Mail2 appears to have a solid reputation, satisfied user base and decent support for those seeking a mail client with enhanced security features. Thanks for sharing! :)
[Android General] maybeme2:
Warnings popped up when I went to where I could delete the Google Play Services data. What will I need to restore after deleting that data?
[Android General] DB126:
1. Settings->apps->Google Play Services->Manage Space->Clear All Data

2. Reboot
[Android General] maybeme2:
Thanks for replying.

Yes I know that part. What I don't know is what important data am I deleting and what will I need to do after reboot to make the phone work as it used to?

In other words, what is in the Google Services data?
[Android General] DB126:
You may be re-prompted for permission to use Google Location Services and some indirect knowledge of past behaviors may be lost. Nothing that impacts day-to-day operations. Search/location history and app authorizations will remain intact.
[Android General] maybeme2:
Worked exactly as you said.

Thanks!
[Android General] nwlun:
how about leandroid? useful if i already have greenify?
[Android General] marcdw:
LeanDroid is good if you want to control network communications (data, WiFi) when phone is asleep.

GravityBox (Xposed) has a "Smart Radio" feature. Some Nougat ROMs have a similar feature built in now which I haven't yet tried.

I've used LeanDroid on and off since KitKat. It works quite well.

LG G3 D851, LiquidSmooth v4.1 ROM, MultiROM, Tapatalk 4.9.5
[Android General] ProudRed:
http://cloud.tapatalk.com/s/58d51f02298a9/BetterBatteryStats-2017-03-24_101654328.txt

After clearing cache
[Android General] DB126:
0.4% per hour is respectable. A bit of WhatsApp activity and a Tasker activity are the only notable items; neither are significant IMO.
[Android General] yzbrad99:
I have a Verizon Pixel XL Non-rooted running 7.1.1 (NOF27B) and i keep getting this wakelock from Google Play Services. From my understanding it is from Google Firebase Analytics.

Since I'm not rooted, I can't install a "Package Disable Service" app to turn off this (PackageMeasurementService) service in the Google Play Services app.

Is there any other way to disable Google Firebase Analytics without root? I hate the fact that i can't root or get rid of these wakelocks. Or maybe there is a way to figure out what app is using the firebase analytics, and then i will just uninstall it. Its driving me crazy.
[Android General] DB126:
On a rooted device apps using FireBase Analytics can be easily identified via their broadcast receivers using a tool like SD Maid or MyAndroidTools. Those same receivers can then be disabled but GMS will renable them after a period of time. I believe the same thing happens disabling the PackageMeasurementService (there are ways around this).

Without root I'm afraid you are SOL.
[Android General] peterlee928:
noob q's

what is firebase analytics

what is packagemeasurementservice

safe to disable both in 3rd party apps?

much thx in advance :)
[Android General] DB126:
- https://firebase.google.com/docs/analytics/

- packagemeasurementservice is 'safe' to disable within Google Play Services

- 3rd party apps?
[Android General] cristixperia:
So is safe to limit packagemeasurementservice?

I limited this service in amplify 2 days ago and until now I don't have any problem.;)

Google service - 0,6 seconds :laugh:
[Android General] DB126:
Err...think I said that it the post you quoted :confused:

Don't need a tool w/Xposed dependencies to pull this off. MyAndroidTools, SD Maid and a few others can easily handle disabling services (must be rooted).
[Android General] cristixperia:
I disabled all Google play services receivers with SD maid.:laugh:

But I didn't see a improvement in battery life, so I uninstalled SD maid after 2-3 days.

Also I used Disable Service application from Google play. I disabled a lot of gms services but after that gms start to create issues, also I saw a little drain and I gave up at Disable Service application.Amplify is still the best.:)
[Android General] maybeme2:
I'm rooted android 5.1.1.

I don't see "Firebase Analytics" in Google Play Services. But I see

FirebaseAuthIntentService

FirebaseAuthService

Are these parts of FireBase Analytics?

Can they be safely be disabled?

Is there a list somewhere of all that can be safely disabled?
[Android General] DB126:
In the context of disabling services SD Maid, Disable Service and Amplify all have roughly the same capabilities (the Disable Service app is a subset of MyAndroidTools). What you disable is what matters; the tool used is largely irrelevant.

Randomly disabling GMS services is a recipe for disaster (meaning undesirable side effects that impact app/device functionality). Common refrain: go after the demonstrated drainers and ignore the rest. Then again, some people enjoy hunting ants with a shotgun; maybe you'll get lucky and hit the queen. Whatever floats your boat.

---------- Post added at 05:33 PM ---------- Previous post was at 05:28 PM ----------

- won't find "Firebase Analytics" in Google Play Services

- no info on listed items; therefore they should not be disabled

- disabling "PackageMeasurementService" should do the trick

- did you read the OP?
[Android General] maybeme2:
And the demonstrated drainers are........?

Just Google analytics?

(I read the OP. Hard to remember everything...)

But greatly appreciate your help. Learning on the jib.
[Android General] DB126:
Install BBS (Better Battery Stats) and monitor your device as advised in the OP. Look for items that delay/prevent sleep. Focus on the major drainers on YOUR device. Those items *may* be candidates for disabling/limiting.

FWIW - Google Analytics (aka FireBase) is not a major drainer. It runs every few days and triggers a brief parasitic activity that some find annoying. I disable PackageManagementService on a few devices due to their unique characteristics which addresses the issue; most I leave alone.
[Android General] maybeme2:
Davey126, I just wanted to really thank you for this excellent thread. I just re-read the OP and apologize for trying your patience by asking already answered questions. You're doing us all a great service. I did donate. Thank you!

One suggestion: it would be great to have your recommendations in some downloadable form or pdf so it can be printed for easier reference.
[Android General] DB126:
First and foremost all credit goes to [MENTION=5867207]v7[/MENTION] and the many other talented contributors who spent countless hours crafting/refining the OP and patiently responding to hundreds of questions over the past two years. I'm just a lurker who adds an occational comment.

To get the most from this thread you'll need to do some reading, try some stuff, make a few mistakes and (over time) learn the best solutions for your device, kernel, ROM, app portfillo and personal workflow.

My views differ from many in that I only make changes that are both necessary and supported by hard data. I do not use most of the tools/techniques noted in the OP yet give up very little in terms of performance, longevity, usability, etc on stock ROMs with minimal tweaks. Just the way I roll.

Keep in mind this is enthusiast thread (note the title) and thus a certain level of knowledge/familarity with Android and 'hardware' is assumed. You will need to do some homework if just getting started. Good luck.
[Android General] Bewildered Wolf:
What can SD Maid and MyAndroidTools do ? Can you explain a bit bro ?
[Android General] DB126:
My primary use is to block services and broadcast receivers. SD Maid can also perform a variety of granular housecleaning tasks. Both are powerful tools that can bork your device if misused. They will do exactly as you ask, often without confirmation. See Play Store descriptions and app help for more details.
[Android General] peterlee928:
here is a decent guide to myandroidtools

https://xdaforums.com/galaxy-s-advance/themes-apps/share-myandroidtools-guide-to-disable-t2869119
[Android General] Bewildered Wolf:
Was looking to that only. Thanks though brother.
[Android General] peterlee928:
here is another thread

discusses specific instructions

also utilizes myandroidtools

https://xdaforums.com/oneplus-3/how-to/guide-stop-google-play-services-t3549760
[Android General] Bewildered Wolf:
Thank you so much brother :)
[Android General] Blade2014:
Dear All,

Here I have attached the BBS file. Can you please check it and advice me as to what i have to restrict to achieve

less idle battery drain?

Thanks a lot...

http://cloud.tapatalk.com/s/58d75a39ad1cc/BetterBatteryStats-2017-03-26_105659309.txt
[Android General] peterlee928:
just as a fyi

u may also want to post on this thread

https://xdaforums.com/showthread.php?t=1179809
[Android General] Sleep04:
hey guys, ive got an android one, seems that marshmallow drains my device very fast
[Android General] peterlee928:
have u tried directions in op

might also consider upgrading to n

may help

but fyi

xposed n/a for n

---------- Post added at 08:59 AM ---------- Previous post was at 08:55 AM ----------

thx [MENTION=5488402]Davey126[/MENTION]

wrt firebase

read that article

laymans explanation? :)

by 3rd party apps

mean not system apps

but i suspect the ans is

depends on the app

is packagemeasurementservice

generally ok to disable in other apps also?

much thx :)
[Android General] Sleep04:
guys how to transfer apps thats installed internally into external sd card?
[Android General] :
I have written this short shell script to disable Google Analytics (and Ads) in apps.

for apk in $(pm list packages -3 | sed 's/package://g' | sort); do
echo $apk

2>/dev/null (
# analytics
pm disable $apk/com.google.android.gms.analytics.AnalyticsService
pm disable $apk/com.google.android.gms.analytics.CampaignTrackingService
pm disable $apk/com.google.android.gms.measurement.AppMeasurementService

pm disable $apk/com.google.android.gms.analytics.AnalyticsReceiver
pm disable $apk/com.google.android.gms.analytics.CampaignTrackingReceiver
pm disable $apk/com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver
pm disable $apk/com.google.android.gms.measurement.AppMeasurementReceiver

pm disable $apk/com.google.android.gms.measurement.AppMeasurementContentProvider

# ads
pm disable $apk/com.google.android.gms.ads.AdActivity
)
done

It loops through all non-system apps and disables the components listed above. The process is safe and reversible (just use "pm enable" instead of "pm disable"). Another method to disable analytics and ads in certain apps is to simply block all Internet access for them. This is only useful for those which can work offline though.

If you are not familiar with shell scripts then just save the contents of the code above into a new text file (ex. disableanalytics.sh) and then use any terminal emulator to run it (or even run it from adb). Root is of course required.

From terminal:

su
sh /sdcard/disableanalytics.sh
[Android General] jlb1959.01:
context_manager_alarm_wakeup3694222, ..

any help here please,after 6hrs overnight,this alarm went off 4 times(6 hrs overnight).it was the only alarm beside 1 other(alarm collector)..

I'm on blisspop 6.4,vs985 ...appreciate the help..
[Android General] Blade2014:
Sure, will also do that
[Android General] DB126:
Much of the wake time was attributable to Kernel wakelocks which are not directly addressable (aside from changing kernels). See you are using Naptime; might try Greenify with 'doze on the Go' enabled to reduce sensor activity during sleep. Might work better than Naptime. I believe Force Doze also has this capability. Nothing else major jumps out; there's a bit of whatsapp activity...nothing significant.
[Android General] Arstoien:
Just fyi, naptime recently had a feature added to re-apply doze 1 min after having been woken up.
[Android General] Blade2014:
Thank you both for your kind advice. I shall do as you say and will post the result soon.

Thanks a lot
[Android General] deninter:
Freedomos 2.6.1. Franco kernel r16 naptime, tried also elementalex. I would like to improve SOT, any suggestions?
[Android General] yzbrad99:
Ok, so it's definitely a user app i installed from the Play store?

Also, is there anyway i can figure out what app is using the Firebase Analytics? If so, I'll just delete the app or keep it Greenified when I'm not using it. I'm determined to find a way to slow down the wakelock since i can't get root on this POS. I know the wakelock isn't big, but I'm too anal to give up.
[Android General] DB126:
I have no idea what app(s) utilize Firebase Analytics. Already addressed the situation for unrooted devices. The drain associated with this wakelock is small...especially relative to everything else associated with Google Play Services, much of which you can't see/control w/o root. Best move on.
[Android General] saifkhan9187:
Dear Check the BBS file.... using samsung note 5 nougat.....

One thing to remeber i turned on doze mode in greenify also doze on the go..i think it drain hell alot of battery....
[Android General] Portgas D. Ace:
ssp_wake_lock (): 2 h 13 m 3 s Cnt:(c/wc/ec)2151/67/1975 20.5%

lli_pm_wlock (): 2 h 2 m 56 s Cnt:(c/wc/ec)8553/690/0 18.9%

umts_ipc0 (): 1 h 17 m 8 s Cnt:(c/wc/ec)9345/349/9346 11.9%

bcm4773_wake_lock (): 31 m 7 s Cnt:(c/wc/ec)3772/0/3772 4.8%

radio-interface (): 22 m 33 s Cnt:(c/wc/ec)6063/152/0 3.5%

-> several kernel wakelocks, maybe a different kernel solves the issue. The ssp_wake_lock wakelock seems to be common for some rooted Samsung devices, but I haven't found any possible solution yet.

Beside this, the two Facebook apps (FB itself and FB Messenger) seem to drain some juice. You could use an alternative client (such as FB Lite, FB Messenger Lite or Metal for FB) or live with the drain. As the above stated kernel wakelocks dominate the current battery drain, it's hard to tell to which amount the FB apps drain battery.
[Android General] zilan:
Hello, i owned xiaomi mi5 and i faced battery drain cause by app package measurement (from Bbs logs) can i use this script for my xiaomi mi5 to disable the measurement things? I run the script through EXKM since new ver exkm support script manager. My question is, is it safe to run it on my mi5?

Before, i was use my android tools to disable package measurement, but i notice every my phone reboot there are measurement service that switch back on, i dont know why.. see my screenshot, the ones that i mark is switch back on when i restart my phone. And i must disable it again..
[Android General] Portgas D. Ace:
Check this thread for a possible solution in case you are using Xposed.
[Android General] DB126:
Confirmed this does work - keeping PackageMeasurementService from being re-enabled on reboot. Been using for several months w/o issue.
[Android General] Bewildered Wolf:
What should be done according to that thread ?

Log and Blacklist app ? What is that code in that Op there ?
[Android General] zilan:
No, iam on Nougat and didnt use xposed.. btw, i also found that nlpcollector wakelock drains my battery, how to disable it?
[Android General] TNSMANI:
Read post #7 in that thread. It will give you some idea.
[Android General] Portgas D. Ace:
This could be limited by using Amplify, but without Xposed - no Amplify. I am not sure if there actually is any measurement that can prevent this without Xposed.
[Android General] zputnyq:
as far as I know it could be run on boot, but I'm not sure where I should put it [emoji4]

Could you please show where I should put the script to so it will run on boot?

I'm on kitkat 4.4.2

mtk 6572
[Android General] DB126:
4+ hours is obviously excessive. Such undesirable behavior can usually be rectified by clearing Google Play Services cache+data and then rebooting. The wakelock will still be present but total time should be reduced to a fraction of previous values (perhaps a few min). Also note the presence of a wakelock is meaningless while the device is awake.
[Android General] Oswald Boelcke:
Use AppOpsXposed (see OP) for that.
[Android General] maybeme2:
I'm new at using MyAndroidTools and am still learning so this makes me wonder if it is a waste of time to bother disabling package measurements if it is true that they just renable themselves on reboot.

I am rooted (Nexus 5) and have xposed installed but would prefer not to use the xposed version of MyAndroidTools because it is not granular and blocks the entire app.

Could someone explain please?

Does disabling a service in MyAndroidTools just work until the next reboot? Or app restart? If so, it's not worth the effort.

Is this also true when disabling a service in Google Play Services?

Confused.......
[Android General] DB126:
- PackageMeasurementService is integrated into Google Play Services

- Google Play Services re-enables a large number of internal components on a regular basis (including PackageManagementService)

- MyAndroidToolsXposed can block the automatic re-enabling of components
[Android General] cristixperia:
I use amplify for limit "packagemeasurementservice" and working great.
[Android General] maybeme2:
Thank you.

So, using MyAndroidTools without the xposed version is temporary and illusory unless the xposed version is used to also blacklist the apps. Correct?

What happens when you start and use the app? Is PackageMeasurementService re-enabled again.

Does Greenify help? Or replace MyAndroidTools xposed?

Thanks.
[Android General] DB126:
- not "illusory"; works as designed/intended

- Google Play Services is not an app that you can "start and use"

- Greenify and MyAndroidTools do not overlap (do entirely different things)
[Android General] -Happy Feet-:
Since view Days 2 Wakelocks draining my Battery.

I can't find anything about this at Google.

BleScanner_WakeLock and UlrDispSvcFastWL

Hier can i stop this? Is a Part drin Google Play Services.
[Android General] javitolopez69:
There is no solution to wakelock without root
[Android General] maybeme2:
Rooted Nexus 5 running stock 5.1.1

Xposed installed.

I need help. Suddenly my battery is losing at a ridiculous rate. I recharged it to 90% 2hrs ago and it went down to 80%during 2hrs of sleep. Lost 10 % during 2hrs of sleep!

Here is what BBS shows.

What is PowerManagementService and how do I block it?

Also I have my wifi set to never be on during sleep but it seems to have stayed on during the last 2 hrs of sleep according to Gsam battery.

I would appreciate any advice. Thanks.
[Android General] Portgas D. Ace:
Please refer to post #6 about how to produce a proper log file that we can analyze.

For PowerManagementService, this has been discussed several times, please use the search function on this thread.
[Android General] maybeme2:
Thank you for the quick response.

Will do tonight and send log.

(I did search PowerManagementService in the thread but the only result I got was my question about it. Must be doing something wrong).
[Android General] kk-ftp:
Hi Guys! Followed the original post (majority of it bar the limiting the sync wakelock) and these are my results. I leave sync on, 4g on (uses less battery than wifi for me) and twilight app overnight. I'm using the superman rom (mm).

I do prefer to get bbm/whatsapp/emails as push rather than pull. My battery drains roughly 0.9-1.7/hr on most days.

Is it possible for me to make this better?

Thanks for all your help in advance. I've attached amplify wakelock Screenshots. I use accubattery as battery monitor and deep sleep monitor.
[Android General] DB126:
Average per hour drain over the course of an undefined period is a rather meaningless measure as it depends how often the device was active, in what conditions (signal strength, panel brightness, etc), what app(s) were being used and numerous other variables (hardware, kernels, roms, governor tunings ...). That said, any <5% should give you a full days use with room to spare.

See post #6 for details on creating an idle log which is the starting point for identifying additional savings opportunities (if any).
[Android General] kk-ftp:
Ok thanks. Will do.
[Android General] Portgas D. Ace:
Oh, it seems that the kid got a new name :D

"PowerManagementService" was formerly known as "PowerManagerService".

Here is an old reply from me about this:

https://xdaforums.com/android/general/guide-extreme-battery-life-t3095884/post67313471#post67313471
[Android General] maybeme2:
OK, below is my log.

It's a rooted nexus 5 running stock 5.1.1 with xposed, Greenify, amplify.

Lost 22% overnight untouched!

Location and Bluetooth are always off because I don't use them.

Wifi is "set" to never on during sleep, scanning off, but obviously is on during sleep.

I would really appreciate help.
[Android General] maybeme2:
One more from amplify in case it helps.
[Android General] Portgas D. Ace:
CmaSystemUpdateService (Google Services): 10 h 31 m 58 s Count:249 98.9% -> check this reddit page for a possible solution

bam_dmux_wakelock (): 18 m 57 s Cnt:(c/wc/ec)510/0/0 3.0% -> check this thread for more information

Alarms: 12, Intent: CONTEXT_MANAGER_ALARM_WAKEUP_332140 -> use Amplify's regex function to tame this alarm (should eb described in post #4)

Alarms: 37, Intent: com.tripadvisor.tripadvisor/com.tripadvisor.android.lib.tamobile.helpers.tracking.TrackingAlarmReceiver -> limit this one to 9999999 with Amplify
[Android General] DB126:
As the drain started rather suddenly try this before taking stronger measures: clear Google Play Services cache+data and reboot. Better?
[Android General] zilan:
This script is works to disable package measurement service, however nlpcollectorwakelock still there. Do you have script to disable nlpcollectorwakelock issue?

I have been searching and found 2 thread :

https://xdaforums.com/google-nexus-5/general/script-google-play-services-battery-t3059585

https://xdaforums.com/nexus-6/general/script-reduce-google-play-services-t3171224

Does this script block nlpcollectorwakelock and still reliable to use on nougat? And which one is safe?

Please someone confirm.. thanks
[Android General] DB126:
Pretty sure Google Play Services wakelocks can not be disabled on Android 7.x sans Xposed. Using hardware only GPS services will dramatically reduce the number of nlpxxx related wakelocks but you'll loose some functionally. Power consumption will likely drop a bit as most modern devices intelligently cycle the GPS radio on/off as needed. Despite being tagged 'battery friendly' Google Location Services often draw more power as they remain active 7x24 and have the ability to wake the device from deep sleep in some situations (albeit infrequently but broadly mischaracterized due to misunderstanding of how wakelocks actually work).
[Android General] maybeme2:
I had already done that twice and rebooted twice with no help. (I've been reading this thread...)

I "think" this started when I the disabled the system update service (GooglePlayServices) because I got tired of Google's annoying "system update available" notice. That's what the Reddit piece said. So I think re-enabling that will probably resolve it. I'll work on it later today.

Thanks everybody for sharing your knowledge and expertise. Truly appreciated!