yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] DB126:
Charge rates are best monitored via an inexpensive USB dongle/gizmo that encompasses charger, cable and device (battery pack) performance. As for "right" values that varies by device (which you didn't identify), battery level, temperature, etc.

BBS probably isn't the best tool for monitoring charge rates; try Ampere (free): https://play.google.com/store/apps/details?id=com.gombosdev.ampere
[BetterBatteryStats] Unknowx:
thanks, i have an op7 pro .. i will try to use it.what should i keep an eye on?
[BetterBatteryStats] DB126:
Err...nothing unless experiencing a problem/symptom as device handles the details. Plug, charge, play. Rinse and repeat as needed.
[BetterBatteryStats] stanvv89:
Thanks a lot. Removed Huawei Health app, but unfortunately same results overnight. Will give it another try tonight, else I'll just ask if they can replace it for a new one.
[BetterBatteryStats] unrafa:
May have to do with significant motion sensor

Disable double tap to wake

Disable rise phone to wake

In Google options, disable anything that may consume battery, like Google location history , Bluetooth scanning WiFi offline scanning, and fitness

If it doesn't work a full wipe should .

Also disable things about google maps, it makes use of significant motion sensor (bug)

Use maps only when needed
[BetterBatteryStats] DB126:
Absolutely push for a new device or factory refurb if still under warranty. The cost of providing post sales service is baked into the purchase price. Resist turning knobs and dials, disabling core apps/services, doing handstands every time you use the device or otherwise depreciating the ownership experience unless you have no other resolution path. With a reasonably modern device there is no need for such actions if all is working as it intended. Device swaps are relatively painless if done by a responsible/skilled service center. In contrast, XDA lemonade is a double edge sword that can delight or disable. Choose your poison wisely.
[BetterBatteryStats] viro18:
Hi is there a way to stop this

*job*/com.asksven.betterbatterystats_xdaedition/com.asksven.betterbatterystats.services.UpdateTextWidgetService

Causing JobDelays?
[BetterBatteryStats] githyanki:
Are you using the BBS widget on your desktop?
[BetterBatteryStats] tuman18:
Hi guys, could someone help to learn why my phone lost its charge so quickly. It's like 4%/hour with turned off screen and basically not performing any tasks

I can't post links or attachments so I pasted my log here https://pastebin.com/27fv96Dr
[BetterBatteryStats] DB126:
Lots going on (Facebook Lite, Verizon Messages, Blue Mail, YouTube just to name a few) along with a full array of radios & sensors that remain enabled. That said, 4% remains a bit high even with all the activity. My guess is battery health is contributing to excessive drain but is not the sole source.

There are plenty of tips in this thread on reducing power consumption. Start with identify big consumers which are easily surfaced via built-in battery app (be sure to investigate options in overflow [3-dot] menu). Consider disabling WiFi and Bluetooth scanning. Blue Mail is a notious power pig; might switch over to pull vs push mail. Same for Verizon Messages; nice app but demands a lot from your device.

In the end you have to decide if reducing overnight drain by a few percentage points is worth all the tinkering. Alternatively, plug in while sleeping and call it a day.
[BetterBatteryStats] tuman18:
Thanks, I will try your recommendations!
[BetterBatteryStats] viro18:
No... I even tried clean flash (lineage-16.0-20200120-nightly-mido-signed) + (NikGapps-core-arm64-9-20191225-signed) | (open_gapps-arm64-9.0-nano-20200117) | (MindTheGapps-9.0.0-arm64-20190615_031441) same result :(
[BetterBatteryStats] Eversmile23:
Help-- 'Since boot' not geting registered by xdaversion of BBS App.

I removed the Google Play version of BBS and installed the latest xda version, but I observed the reference point 'Since boot, is not showing. I uninstalled this version and installed version 2.4-262. Then also, same thing is observed. What is the prooblem? I am attaching the BBS dump. Plz suggest some action to get rid of the problem I said and how I can further improve my battery standby time (from dump, I see it is 0.9% per hour.)
[BetterBatteryStats] DB126:
Airtel app is biggest offender keeping device awake and engaging Google Play Services. Try freezing that and observe.

'Since boot' reference point is uninteresting from an idle study perspective. Recognize you may want that for other reasons. Not sure why it's not working.
[BetterBatteryStats] Eversmile23:
Also 'Screen off' & 'screen on' references not showing, I checked ig just now after 5hours 50minutes of inactivity of my mobile(during yhe night). Is it due to specific model of my andtoid and version of android?
[BetterBatteryStats] DB126:
Not sure why references are not showing (I don't use BBS). Perhaps another member can comment on that aspect.
[BetterBatteryStats] curiousrom:
Screen Off to Screen On Missing - BBS Settings

Post # 1 of this thread > If you need help > "...enable watchdog processing in BBS settings."

You need to follow the instructions of the "If you need help" chapter to create a proper dumpfile of the battery usage @ idle test.

Important:

Disable Ambient Display if you have that so the screen does not turn on when you receive notifications during the idle test.

Create a BBS shortcut on the desktop for quick access.

Discharge the battery to 95% or less. That's because on many devices the battery discharge faster from 100 to 95% and that skews the results. On some devices like my Galaxy S5 it's better from 92% or less. A trick: charge to 100%, disconnect the device & reboot.

Clear Recent apps, do not touch or move the phone for at least 6 hours, then turn on & quickly capture the dumpfile + logcat via the Share icon because if you wait too long to capture the dumpfile the screen on will eat the battery, some apps will wake up & may start syncing, etc & that will skew the battery usage @ idle test.

In the attached dumpfile you can see: Other Usage > Screen On (): 9 s 0.0%.

After that you can make screenshots or check the other BBS panels.

Post #2 How-to and FAQ: "14. Q: Why is 'screen off' reference not being created?

A: You have to enable the watchdog for that reference to be created"

I use Screen Off to Current & it works fine as you can see in the screenshot.

That's on a Galaxy S5 G900M LineageOS 16.0 klte build 2020-01-23, BetterBatteryStats xdaedition version: 2.5-341, with Wifi, Data & Sync enabled (Gmail, WhatsApp, Reddit, etc), apps auto-update disabled in Play Store. Notice the Reddit notifications in the screenshot.

I also attached the dump file made before taking that screenshot:

Statistic Type: Screen Off to Current

Since 6 h 31 m 35 s

Level lost [%]: Bat.: 0%(23% to 23%) [0.0%/h]

I'm pretty sure is not really 0% discharge as there are no decimals except for the %/hour so maybe it's from 23.9 to 23.1% for example but still it's less than 1% of battery usage in 6 h 31 m of idle time.

I also attached my BBS settings. You could copy bbs_preferences.txt (without renaming the file) to /sdcard/Android/data/com.asksven.betterbatterystats_xdaedition/files/Download/ then in BBS > Settings > Advanced > Import/Export > Import.

You can see on the status bar that the battery is showing 20% & the BBS stats are from 23 to 23%. That's because in the BBS > Settings > Auto refresh is disabled so I can open BBS minimize it then open GSam Battery Monitor & take some screenshots then go back to BBS & capture the dump file with the stats unchanged and check Kernel wakelocks, Partial wakelocks, etc without having the annoying refreshing between each panels which changes the stats every time.

If I don't make screenshots immediately of GSam after opening BBS like in the attachment, the screen on will eat the battery and change the stats in it.

***
[BetterBatteryStats] jukyO:
Hello,

Now all stock, kernel, and no any addons from magisk.

Please see attached logs, what drained battery 9% overnight?

Thanks in advance!
[BetterBatteryStats] TNSMANI:
I see two issues. One is Location. Switch off Location and wifi and BT scan. I don't think that you require Location to be on while sleeping.

The second is the 'pocket' sensor being awake the entire time. Did you keep the phone face down? Disable it and check again.

Let the others also chime in.
[BetterBatteryStats] jukyO:
Thanks mate!

I have flip case and pocket mode turned on. Now I have disabled it.

WiFi and BT scanning was off.

Now I have switched off location.

Let's see next overnight.
[BetterBatteryStats] jukyO:
Here is new set, disabled pocket mode and location. Still 7% in 8 hours.

Thanks in advance.
[BetterBatteryStats] TNSMANI:
The Location related alarms and wakelocks are gone. But 'pocket' sensor was still active all the time. I don't know why. Plus the significant motion detector sensor was also active for 5+ hrs.

I see that you had disabled the data connection. Any particular reason why? Your wifi was connected and running for just 1+ hrs. What is your setting for wifi? Not always on? I am at a loss to explain your drain and am asking questions at random. How old is the battery? When did you last have a clean flash of the ROM? Is it possible for you to do a clean flash now?

Wait for others also to comment.
[BetterBatteryStats] jukyO:
Thanks. Well this is weird.

I did not disable data connection, all is kept as is.

Wifi setting screenshot is attached.

Battery is old as a device, bit over one year.

I did not do clean flash for 5 months at least.

Maybe this is the problem?
[BetterBatteryStats] Oswald Boelcke:
Just an assumption due to your SS that shows "Intelligently select the best WiFi", your statement that you didn't disable data connection but the idle dump only showing 1+ hrs of WiFi.

Maybe you have a poor WiFi network, and your device is permanently searching for WiFi networks?
[BetterBatteryStats] jukyO:
My WiFi router is Mikrotik, and mobile is 2 meters from it overnight. So I would not say it is WiFi network problem.

See screenshot, 31 dbm.

I'll try to disable this intelligent stuff and see how it goes.
[BetterBatteryStats] TNSMANI:
Reset your wifi router (switch off, wait for some time, then switch on). If this also does not work, you can try a clean flash.
[BetterBatteryStats] jukyO:
I'll switch off wifi on mobile and keep mobile data only overnight.
[BetterBatteryStats] TNSMANI:
Usually mobile data consumes more battery than WiFi. However since it is only a test, go ahead.
[BetterBatteryStats] Eversmile23:
Is there any room for improvement?

Dear OP,

I made the battery drop to 94% and left my android at one place overnight and took the below attached dump. After taking dump, I took some screenshots which are also I am attaching. As per my setting the first screen appeared as 'from screen off' to 'current', I changed it -- 'to screen off' (i.e. to get data from 'screen off' to 'screen on'). The screenshot attached with file name starting as '1st......' seems strange. Then I tried to get data by changing the reference points - from 'Custom' to 'Screen on/Current'.(I had made a custom reference point when battery reached 94%, cleared all running apps).

My question : Is there any scope of improvements to increase the deep sleep from 95% to say 98%? Another thing, why BBS does not show 'kernel wakelocks'? It was showing, say 2/3 years back.Do I need to do some specific operations/command to get these?
[BetterBatteryStats] curiousrom:
Re: Is there any room for improvement?

Screen Off to Current was perfect & you should have captured the dumpfile right away.

I see in your dumpfile "Screen On (): 1 m 23 s 0.3%" and that's too much time before capturing the dump file.

The problem is not only the battery usage of the screen in that 1 m 23 s period, it's also some apps that woke up & can do some activities like syncing, etc which can also use some battery power & skew the battery usage @ idle test.

See the post 1 page back Screen Off to Screen On Missing - BBS Settings and do the test again.

In the dumpfile attached to that post you can see "Screen On (): 9 s 0.0%".

Also before starting the test you can set GSam with the delta icon (triangle) to Since Screen Off instead of Since Last Unplugged as you can read in your screenshot.

About the missing Kernel Wakelocks data I can see in your logcat:

E/Reading ( 7006): Notification [m_name=No stats have been collected yet] is not of type NativeKernelWakelock

Which I can't explain as I don't have anything similar in my BBS logcat.

Maybe you could try using the BBS settings attached to that post?

***
[BetterBatteryStats] jukyO:
Turned off WiFi.

Now my battery lasts for so long, almost 2 days now!

Did not get any logs, but I believe this is why battery drain when on WiFi is high, see screenshot. What do you think?

I will enable this and observe the results.
[BetterBatteryStats] DB126:
Very well could be. This is not a generic Android flaw; it all depends how the kernel (usually hardware specific) handles network switching and if the WiFi components can operate in a low power state while still being responsive to environmental conditions that facilitate transparent switching. Unfortunate this setting is buried in developer options; shows a bit of arrogance on Google assuming that automation that works most (but not all) the time is right for everyone. Also part of the always connected mantra as Google doesn't want to miss a moment of your life. But I digress ....

Glad you found the culprit; happy day.
[BetterBatteryStats] jukyO:
Thanks!

I'll test overnight and report back.
[BetterBatteryStats] Eversmile23:
I am posting three nos dumps, one is taken quickly after screen on (on 30th Jan). Another two nos (on 31st Jan), after I uninstalled/freezed some apps like 3C Toolbox Pro, Tatasky, S photoeditor, Slides, Some weather apps, Airtel app, Giphy, Eset antivirus, HTC Service pack, Google News etc. In both the cases, I had some xposed modules, Gravitybox modules, Greenify activated. No Optimising app or mod like L speed or FDE-AI is activated. Optimising mod 'Boost' (HTC's System inbuilt) is freezed.

Should I use any mod to further improve my standby time?

In BBS, I still did not get the reference 'Since boot', even after enabling 'Watch dog'. Why? Do you suggest any removal of apps? My app usage in the Screenshot of GSam Battery monitor app always shows more than 90%.Why is it so?
[BetterBatteryStats] jukyO:
Guys, here logs from 9hrs overnight with Wifi on. 8% in 9 hours. Let me know if there is anything unusual.

Location is off, pocket mode off.
[BetterBatteryStats] DB126:
Overall reasonable; kinda what you'd expect from A10 and underlying HW. WiFi appears dicey despite strong signal; might be a congested channel or other interference. Viber was restless while doing nothing (aside from 6M download) as are most social apps. Personal choice if you want contain that or retain the convenience of always updated everything while sleeping.

---------- Post added at 02:24 PM ---------- Previous post was at 02:12 PM ----------

TMI - narrow your query and provide a relevant log. No one is going to spend 30+ min digesting your obsession with every app known to man plus 3 more. It's a phone.
[BetterBatteryStats] jukyO:
Thanks!

How to automatically switch off sync overnight? Tasker only or?

I'll try to change a WiFi channel to some other.
[BetterBatteryStats] DB126:
See if disabling WiFi, moving your phone/AP or switching channels helps. Not much benefit clobbering sync as doze keeps most apps at bay.
[BetterBatteryStats] jukyO:
No Wifi, 5% in 9 hrs.

If anyone interested, log attached.
[BetterBatteryStats] DB126:
0.6%/hr idle drain with only 16½ min of wake time over 8½ hours and <4 min of high CPU use. Not going to get much better given app portfolio without making serious concessions. Even 0.8% hour with WiFi enabled is quite reasonable for that device. Declare victory...happy day...move on. :)
[BetterBatteryStats] jukyO:
Thanks for info!

Yes, this is it on stock.

Will try bit of xXx ROM tweaking now ;)
[BetterBatteryStats] DB126:
fwiw - don't expect further analysis of incremental logs, etc as the 'problem' has been addressed. Battery optimizers tend to be an obsessive lot with no material gain other than hitting a number. Good luck.
[BetterBatteryStats] jukyO:
Of course, did not plan to do more logs.

Thanks for everything!
[BetterBatteryStats] DSF:
Can i disable BBS monitoring without uninstalling the app?

I simply wish to use it only sometimes. I am not rooted

Thanks!
[BetterBatteryStats] inincognito:
Need help figuring out what is causing drain

I ve attached a dump from boot. I left it overnight for about 9 hours. I have figured out that google quick search was causing drain so through app ops I disabled location, stay awake, and auto start. I disabled high location accuracy for location. This reduced the wakelocks but made battery drain even worse. At this point I could use some help.
[BetterBatteryStats] mrjuniork:
Please refer to the OP for thorough instructions on how to take a proper dump. You had more than 1h of screen on time. No way for an accurate analysis.

Once done, get back with a new dump and then I'm sure you will get constructive feedback.

Good luck :svetius:
[BetterBatteryStats] DB126:
Oi - we still believing these ^^ actions are relevant to containing drain? Yep, sun revolves around the earth which is clearly flat ...
[BetterBatteryStats] viucorp:
Hello

Hello, can someone look over my logcat and dump file please, you can find it in the link bellow !

https://drive.google.com/open?id=11sR-wEMYyj5erFdYASjuwJ1HnE85vv6V

Thank you very much!
[BetterBatteryStats] DB126:
Reasonable (0.9/hr; 22 min wake time over 8+ hours) given device, ROM and app portfolio. WhatsApp did it's annoying backup thing yielding a 375 MByte (!) network transaction. Looks like you might have a Fitbit attached which was curious about your sleep activities. And all of the other social apps were busy keeping tabs on the latest cat exploits. In a nutshell, performing like any other mainstream device owned by someone who doesn't dwell under a rock. No action required - enjoy your Pixel.
[BetterBatteryStats] viucorp:
I have whatsapp bachup and a xiaomi mi band 4 that (the fitbit thing), thank for the reply!
[BetterBatteryStats] Eversmile23:
How does my device perform?

Here I am posting a BBS dump. Do I need something to do? Or, is it perfect as far as idle battery drain is concerned?
[BetterBatteryStats] DB126:
It's fine given hardware and ROM base (Android 6.x). Enjoy your device.
[BetterBatteryStats] Eversmile23:
Why does not BBS work on my newer device Vivo Z1 Pro? Some compatibility issue appears like this -- "Detected problems with api compatibility. Visit g.co/dev/appcompat for more info." (Screen shot attached)
[BetterBatteryStats] Eversmile23:
Thank You.
[BetterBatteryStats] curiousrom:
Detected problems with API compatibility

Could you edit your post & type or copy/paste the exact error you get please: Detected problems with API compatibility?

Otherwise your post won't come up in a thread search for the next user with a similar problem.

And users can search the thread with the error instead of having to open your attachment & type it.

BBS works even if you get that api compatibility error.

Searching the page #1 with api returns this in the How-to and FAQ post #3:

In the linked post the BBS dev says:

Now I am also a GSam user & in Enhanced Statistics for Android Pie and Later they say:

On Android Q and later, run the following ADB command:

adb shell settings put global hidden_api_policy 1

On Android P, run the following ADB command:

adb shell settings put global hidden_api_policy_p_apps 1

That's what I did on rooted Galaxy S5 G900M LineageOS 16.0 klte & both BBS & GSam work fine w/o a "Detected problems with API compatibility" in BBS.

Before I did what [MENTION=1330150]chamonix[/MENTION] said I was also getting the api error as you can see in the attachment even if the S5 was rooted. And after running the adb commands of GSam I'm still not getting the popup.

***
[BetterBatteryStats] viucorp:
Thank you for the info, do you think I could do something to get more SOT ? getting between 3-4 hours max.

Or what your advice for improving my pixel?

cheers!
[BetterBatteryStats] DB126:
Power use and battery longevity (so called SOT) are primarily influenced by user activity level, panel brightness, battery capacity and battery health. Secondary factors include signal strength, location settings and overall SOC efficiency. Everything else, including governor/scheduler tuning and other silly tweaks popular on these boards are largely immaterial on a relative basis.

Looking for more SOT? Make sure your battery is healthy, hardware GPS isn't active (unless needed), extraneous radios disabled and turn down the panel brightness. The last item almost always has the greatest impact of items under your control. Good luck.
[BetterBatteryStats] ToucherCD:
Hello, could you look my dump file? It was on airplane mode before I sleep, but I think it did drain too much.

Before that, I got 1%-2% drain over night.

Thank you!
[BetterBatteryStats] githyanki:
Screen On (): 1 h 43 s 8,7%

Please create a dump with 6+ hours and less than 1 minute screen on time for analysis.
[BetterBatteryStats] curiousrom:
Proper Dump File & Screen On

That's right, your "Screen On" should be just a few seconds.

See Screen Off to Screen On Missing - BBS Settings

Also the major point of BBS is to check the battery usage @ idle. Unless you always use your device in Airplane Mode it's better to test with cellular data and/or WiFi enabled otherwise you won't spot apps using data or syncing in the background.

***
[BetterBatteryStats] pjadec:
This is my old tablet Lenovo TAB2 A10-70F and battery drain is very good. Then also wifi and bt is off. This is only example
[BetterBatteryStats] SingularityHRT3:
Device seems to be always awake. I even updated to an another ROM, yet. Couldn't find any wakelock issue (no data is sensor section). The following dumpfile are with DT2W on (1st and 3rd) and off (2nd).
[BetterBatteryStats] xenius123:
Can someone please check my dumpfile? Losing way too much batter it seems when its just in sleep?

Ive disabled doze with the adb command:

adb shell dumpsys deviceidle disable

Thx!
[BetterBatteryStats] DB126:
Invalid dump for idle study; >1 min screen on time. Read OP for guidance on creating a proper BBS dump.

That said, disabling doze is foolish (some dude with 72 hr SoT suggest that). Not going to invest much time analyzing the performance of a crippled ROM.

---------- Post added at 12:54 PM ---------- Previous post was at 12:41 PM ----------

Yep. No obvious culprits albeit several suspects. Boot device into safe mode (Google for instructions) before leaving overnight to see if behavior improves. If no love try a factory reset (you'll loose all personal data). If yes you will need to cycle through disabling/uninstalling apps until the offender is found. Social apps and custom dialers/messengers are often the bad boys. Good luck.
[BetterBatteryStats] xenius123:
Well it helped getting my notifications on time... Instead of getting them when i unlock my phone.
[BetterBatteryStats] DiamondJohn:
Doze has "maintenance" windows where things will be checked periodically and allowed to run, which can be configured. However, I dont think that applies to calls and SMS; unless there is something seriously wrong with your phone. I have modified my doze for extreme times between maintenance periods (I do not use social media etc) However,my SMS and calls come in on time;or at l least it appears that way.
[BetterBatteryStats] xenius123:
Calls and text seems fine. Talking about whatsapp,messenger,gmail etc. Is there a guide on how to modify doze? But it seems alot of oneplus users have this problem with way too aggressive dose on oneplus devices.
[BetterBatteryStats] githyanki:
You can exclude certain apps from doze with normal Android. Not certain how to do it with oneplus, but in settings, go to apps and notifications, special app access, battery optimization. Change to show all apps and find your app.