yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] TNSMANI:
Your mobile signal is weak and it consumes a lot of battery. Your wifi router also doesn't seem to be ok. Your wifi was supposed to be on all the time. But it was on not even for half the time. The result was the device was switching between wifi and data, consuming a lot of battery. Given that your mobile signal is not great, it added to the issue.

Reset your router by switching off power for 10+ seconds and then restart. If the router is connected to any other devices, especially like printers, disconnect them before taking another dump. Also try to locate the phone where the mobile signal is better while taking the next dump.

Kernel wakelocks:

I don't know what it is. But it drains your battery.

This is BT. Switch it off for the next dump.

Location/scanning was on and it too drained the battery. Turn it off for the next dump.

Whoop caused a lot of wakelocks/alarms and drain.

Mi Push caused this drain.

Do you require this while sleeping?

Try to rectify as much of the above issues as possible and then post a fresh dump. Even the current dump was not an idle dump. It had over one minute of screen on time. It should be less than 10 seconds, if possible.
[BetterBatteryStats] PeQuEsan:
Provided that BBS is not fully working on Android 12 (lacks Kernel Wakelocs and has some other issues)... Anyone knows an alternative for non rooted phones?

I'm really disappointed with battery life in Android 12 (1h SOT less than in Android 11 in my Pixel 4 XL), but can't see what's going on.
[BetterBatteryStats] jonibonim:
Good day! Can you please tell me what else can be done for a better sleep, what to kill or block? I prepared a dump according to the instructions. Thank you in advance!
[BetterBatteryStats] TNSMANI:
This is not an idle dump:

The dump should be saved immediately on unlocking the screen and the screen on time should be as less as possible, preferably within 10 seconds.

There seems to be an issue with BBS since

This can't be correct. Uninstall BBS, reboot and reinstall BBS and give the necessary permissions via adb. Then take a fresh dump and post it here.
[BetterBatteryStats] Prototype18:
No stats collected on arrow os 12 poco f3 rooted . Only alarms show
[BetterBatteryStats] Mr_Happy:
Same here on op7t and latest lineage...
[BetterBatteryStats] Prototype18:
i think its broken in android 12.
[BetterBatteryStats] Mr_Happy:
Latest lineage for op7t is A11...
[BetterBatteryStats] Prototype18:
Try different versions. That has worked for me before
[BetterBatteryStats] Enxas:
Can someone explain what these stats that I have marked with red rectangle mean? I have looked at Help section, but it doesn't explain it anywhere.
[BetterBatteryStats] Meandi51:
Guys, after setting the flag for hidden_api_policy, there are most data available, except the kernel wakelocks.

Can anyone pls tell me if I did something wrong or if there any other steps to do in order to make it shown.

I am on A12 Proton Aosp rooted

Thanks so much for your assitance.
[BetterBatteryStats] TNSMANI:
AFAIK, there are three screen stats recorded in BBS:

Screen dimmed

Screen light

Screen dark

May be even bright too.

I am not sure which settings of the screen show up like this ie. exactly at what position of the brightness slider it is recorded as dimmed or light or dark. But dark means a lower setting than dimmed and dimmed means a lower setting than light.

The stats marked by you mean that the entire time the screen was on viz. 1 hour 10 minutes and 51 seconds, the screen was at the dark setting. The percentage shows the amount of battery drain that happened due to the screen setting. 5.6% is the actual drain which is rounded off to 6%.

The brighter the screen, the more is the battery drain.
[BetterBatteryStats] TNSMANI:
Please read the last two or three pages.
[BetterBatteryStats] Oswald Boelcke:
I think, the percentage doesn't represent the drain but the amount of time as a percentage the screen was on dark in relation to the overall time, for which the log was taken (here: From boot to current). 1h10' are 5.6% of 21h14'.
[BetterBatteryStats] TNSMANI:
I stand corrected. Thank you @Oswald Boelcke
[BetterBatteryStats] DiamondJohn:
Not talking from specific special knowledge. However, I note that my phone goes (extra) dim for a few seconds before the screen switches off. the states I have seen are Dark, Dim, Medium, Light & Bright.

Also (which may actually contradict what I guess above ;)), my app TeMeFI can extract the screen brightness from the battery stats and draw it graphically. You can find the graph in the menu under:

Currently Running>Battery>Battery History Extras>Battery History Extras>AUTO-WIDTHx2>Graph Of Mapped Values [MAP]>No aggregation>Screen Brightness [BRIGHTNESS] Map
[BetterBatteryStats] harpin14789:
Please help I have attached my dump and screenshots
[BetterBatteryStats] TNSMANI:
This is not an idle dump. Please read the first page of this thread and post an idle dump.
[BetterBatteryStats] Meandi51:
I read those pages before, but I am not clear if there is a trick or if kernel wakelocks fail on A12 at all
[BetterBatteryStats] TNSMANI:
If you have used the command recommended in THIS post and still it doesn't show kernel wakelocks, then you can't do anything further. BBS has not been updated for Android 12 and these are workarounds using the older versions.
[BetterBatteryStats] J0shua-code:
Can please someone take a look at this

0bin - encrypted pastebin

0bin is a client-side-encrypted alternative pastebin. You can store code/text/images online for a set period of time and share with the world. Featuring burn after reading, history, clipboard.

0bin.net

snapchat accounted for the most no of wakelocks but the battery would discharge just about the same when I didn't have the app installed

Is my battery degraded (this is 4 year old phone) or is it something else
[BetterBatteryStats] anseric:
Hello!

I have a ~20% loss of battery overnight.

I didn't touch it for the entire night, but it still got like 3 mins of screen on time.

I don't get it.

BBS - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com
[BetterBatteryStats] TNSMANI:
Your mobile signal is one of the culprits. It is not strong and it varies from poor to moderate to good. It is usually a big drainer. You had the wifi off? Wifi will consume less battery than data.

As you said Snapchat is also one of the culprits.

Location/scanning was on and it will also drain battery.

The network stats are empty but some background uploads/downloads seem to have happened, which is normal.

The drain is likely to reduce if you can find a better place for keeping the phone where the signal is stronger. Likewise disabling Location/scanning will also reduce the drain. Nothing else seems to be jumping out as the cause.

If your drain doesn't reduce even after taking care of the above, then the battery is the culprit. Four years is a long time.
[BetterBatteryStats] TNSMANI:
Your mobile signal to was wavering between moderate, good and great. Find another place for the phone where the signal is better.

Please reset your wifi router by switching off power for 10+ seconds and then restart. If you have other devices connected to the router, especiall like printers, please disconnect them because your wifi signal is also not constant.

No kernel wakelocks are registered.

Your watch was connected? The BT signal was iffy. Switch off BT during sleep.

Location/scanning was on.

Facebook and Instagram were also draining battery.

Background downloads/uploads happened which is normal but since wifi signal was not strong such downloads/uploads happened via wifi and data. Constant switching between wifi and data will consume battery.

Probably because of AOD or notifications.
[BetterBatteryStats] xflowy:
is this app still being updated?
[BetterBatteryStats] Utini:
It seems like I do not have a lot of partial wakelocks but quite a lot of entries in "alarms" which results in my poor 50-60% deep sleep state.

Can anyone help me on what to do next? I attached also the detailed results from the top 3 processes listed under "alarms".

Thanks!
[BetterBatteryStats] Utini:
Here are screenshots from another day. Basically the same results.

Pixel 6 Pro Android 12
[BetterBatteryStats] TNSMANI:
Screenshots are not going to help. They may aid in diagnosis. What is required is an idle dump as described in the first page of this thread. In the screenshots, I see that you had used the phone for nearly 45 minutes. That will not do.

Please attach a dump as required.
[BetterBatteryStats] Utini:
Already working on the dumps :)

I had my phone off the charger tonight and deep sleep was at 94%.

Then while driving to work and sitting a bit in my office (45m total time) it fell down to 50%.

I also noticed that the "location" symbol is constantly displayed in the statusbar eventhough according to the permissiosn tab nothing is using location atm.

Since there are good deep sleep values during the night, the differences that come to my mind are:

Bluetooth connected while in car

Lower signal at work and probably more signal searching while driving

Different WIFI at work

Phone is moving (any sensors not allowing deep sleep?)

Any app in "do not disturb" or "do not sync" scheduler while at night

Attached are the dumps of both situations. Maybe you can find anything?

I will add another dump after my work day. But that will be from "unplugged to current" with several tasks done on the phone.
[BetterBatteryStats] TNSMANI:
Deepsleep night dump: screen on time high. Dump was not saved immediately after unlocking screen. Also the dump doesn't have kernel wakelocks. Since you are running the latest version of BBS which is not fully compatible with Android 12, please read three or four pages back and use the earlier version with the adb command. That said, I think that 0.7% drain for A12 with the current iteration is ok, given all the complaints of things not working great.

Your mobile signal was not great. It was good for some time and great for the balance.

Alarms:

This is causing drain.

Location/scanning is on and causing some drain.

Your email app.

Background uploads/downloads which is usual and not everyday occurrence.

Your deepsleep car dump is too short with more than 2 minutes of screen on. It also shows very poor mobile signal strength.

We don't analyse in use dumps since there will be too many variables. As a general rule, if you want better drain rates, you have to sacrifice some functionality. What you can sacrifice is something that you alone can decide. A12 doesn't seem to have stabilised yet especially on P6 and P6 pro.
[BetterBatteryStats] Utini:
That is weird. I woke up an instantly created the dump.

Regarding the ADB command: I already applied that one and force-restarted BBS.

Since then I can see all stats except kernel wakelocks (which can't be fixed atm).

Thanks so far. I will try to make another (more correct) dump.
[BetterBatteryStats] Reaper1337:
Did you have any luck fixing this issue?

My S21 Ultra on Android 12 has the eris drain and I dont know whats causing it
[BetterBatteryStats] Utini:
Hey hey,

I did two more dumps and they are attached to this post.

Dump #1 was during the night and my screen was woken by a telegram msg. So I instantly created a dump then.

Dump #2 was right after Dump #1 from ~08:00AM to 12:30AM.

It is really weird because on both dumps I have high deep sleep states. So deep sleep actually seems to work.

Could it be that it just takes a longer time on my phone than it normally should to get my phone into deep sleep after the screen is off?

Because during a work day I end up with several short usages of my phone that cause wakeups (call, whatsapp, mail, putting it into my pocket or from my pocket onto the table). If I need like 5-10 minutes to get into deep sleep after screen off, then this could accumulate over a high non-deep-sleep state during the day?

Otherwise I have no idea what is causing my only 60% deep sleep during a work day.

Oh and I force stopped "Alarmdroid" and will probably use the stock clock app. Alarmdroid wasn't updates since 1 year and I actually only use it because I like its widget.

Thanks again!
[BetterBatteryStats] TNSMANI:
Your first dump:

Drain is reasonable. Mobile signal is also ok but not very good (bad signal drains a lot).

The system took upwards of 15 minutes to quieten all the apps, finish the background work to get to sleep. The shorter this duration, the better it is for the battery.

Again, your email was causing wakeups.

Location/scanning also consumed some battery.

I don't think anything else behaved badly.

The second:

Almost a shorter version of the first one, considering the lesser duration.

Regarding in use drain, there are too many variables. Most of the time it will be the screen and partial wakelocks which are necessary for the proper functioning of the phone. Too many short usages will definitely affect the drain since every time the phone has to get back to sleep. And if your mobile signal is not very good during travel and at the office, that will cause a lot of drain.

Reduction of drain depends on usage patterns. Everyone can not achieve the same since usage varies. So try to get the best for your scenario and don't worry too much about the drain.
[BetterBatteryStats] Utini:
One again thanks for your quick insight!

Is there any way to figure out what takes the system 15 minutes to quieten all apps and to shorten that duration? Because 15 minutes seems like a lot and at work I will most definitely use my phone every 15 minutes. This means it won't be even able to quieten all apps at all.

Bad signal:

I use dual-sim and WiFi during the whole day. I disabled "Keep mobile data active when on WiFi".

This should already be the maximum that I can do to decrease battery drain due to low signal because since I am on WiFi, my phone won't rly on any of my 2 SIMs for data. Meaning it only needs to care for signal strength in regards to phone calls.

Would it make sense to manually switch to 3G on both SIMs when on WiFi (e.g. with Tasker)?

It is also weird that I even have bad signal.. but I guess it won't be due to a hardware (SIM) fault?

Location/Scanning:

I have Wi-Fi and Bluetooth scanning off in the options?!?!

Regarding location: Generally location is enabled system wide but no app should be using it frequently.

Can you see an app in the dump that uses it frequently or do you mean you would recommend to disable location system wide whenever not in use?

Regarding E-Mail wakeups:

I guess this is normal? It has to check frequently with the servers? I use two accounts in fairmail.
[BetterBatteryStats] Oswald Boelcke:
I'm using FairEmail for years, and I have never experienced any negative effects on battery respectively battery drain.

eu.faircode.email (): Wakeups: 68 (7,6 / h)
Alarms: 36, Intent: poll
Alarms: 21, Intent: keepalive:1
Alarms: 9, Intent: watchdog
Alarms: 2, Intent: alarm

Above numbers are from a "0.3%/h" idle dump. The dump is available in this post.
[BetterBatteryStats] Utini:
In regards to that, I guess that my stats from the several dupmps I made are normal then?
[BetterBatteryStats] Oswald Boelcke:
I'm sorry I didn't look at your dumps, and I think it's not necessary because @TNSMANI did that, commented well, and he's the real expert; much better than I am.

I just wanted to share my experience that I didn't observe any negative impacts by FairEmail over years. However, it's certainly advisable to look into FairEmails really multiple settings as some of them can increase battery drain but Marcel (aka M66B) indicated those well and just assess if you need to have those enabled/activated.
[BetterBatteryStats] TNSMANI:
I don't know. Usually it is the apps and the system that work in the background and if either of them is badly coded, it takes time to complete its job or it refuses to go to sleep. If you are prepared to invest time on this, you may uninstall all the third party apps and reinstall them one by one, constantly checking which one when installed takes a longer time to settle.

There you are wrong. It is not mobile data I am talking about, it is the signal itself (for calls or data). The constant search for signal, switching to a better cell, staying connected etc consume battery. That is why the answer below is important.

Definitely yes since 3G signal consumes lesser battery. If you have 2G, it is even better. 4G consumes more battery even when the signal is excellent when compared to the other two (improvements in technology always come with a cost).

Rarely. Do you have constant full bars in the indicator? If you have full bars for atleast the majority of the time, the drain will be less.

It is always advisable to enable Location only when required if you are particular about drain. I did not find any specific app using it frequently but it being enabled constantly will definitely affect the drain rate irrespective of any app using it or not.

Yes, the checking is normal but can't you reduce the frequency of the checks? Ofcourse it depends on your requirements. If you are not particular about having the mails instantly, reduce the frequency. And I don't think that you need it to check during the night when you sleep.

Once again, it all depends on what you want from your phone and what you are prepared to sacrifice.
[BetterBatteryStats] Utini:
Heyhey,

Signal Strength 3G/4G:

So now I have to evaluate what will be more battery efficient:

Run Tasker in the background to switch to 3G (or 2G) whenever I am on WiFi and the signal strength is low

Do not have Tasker consume battery in the background and have Android constantly set to "Prefer 4G" but also "Allow 2G"

Additionally 2G/3G means I won't have VoLTE and there for lower call quality.

Did you try such a solution with Tasker already? Cause I believe the Tasker battery drain is noticable and there for the total saving might not be as much.

I now also wonder: If my 4G signal is bad, maybe switching to 3G will also result in a better signal in case there are more/better 3G towers in my area? :S

Regarding fairmail:

Hmm I need to check. I should actually use "Push" service since those are two gmail accounts. How ever, I use my own SMTP server so maybe I did something wrong in the configuration that is now causing push + frequent checks. I guess I will continue this troubleshoot in the fairmail thread :)
[BetterBatteryStats] TNSMANI:
@Oswald Boelcke

Saw your post after posting my reply above. Thanks for the insight.

@Utini

If you compare the Fairmail readings from your dump and the one from Oswald Boelcke, you can see the difference. It is not the total number of alarms, but the number for the components viz. yours has Intent: keepalive:2 which had 17 alarms but his has none. So his advice to look into the various settings of the app may help you.
[BetterBatteryStats] TNSMANI:
Tasker will have its own drain which you will have to evaluate for your scenario. I don't use it.
[BetterBatteryStats] Utini:
This is what I could find so far on battery drain 3G/4G/5G.

Link: https://mybroadband.co.za/news/smar...-4g-and-5g-and-one-drains-it-much-faster.html

I might do a test on my own and post the results here. This is probably also very phone/hardware/modem specific.
[BetterBatteryStats] Utini:
@TNSMANI "WiFiConnectivityManager Schedule Periodic Scan Timer" has a lot of wake ups. But as I said, WiFi Scanning is turned off. Any ideas what is causing this then?
[BetterBatteryStats] TNSMANI:
The alarms related to it are 0.

Where did you find it having a high number?

I f it is having a high number, I think that the wifi scan found in Location setting relates to scans related to location. Switching it off might stop location related scans but not scans related to wifi itself (not sure if I am making sense).

If your router is having issues, then there may be a high number of scans. If you have doubts, reset the router by switching it off for 10+ seconds and restart.
[BetterBatteryStats] Utini:
Well, every scan option is off. I found the high number while browsing the BBS app yesterday. And I have seen it high before but e.g. right now I dont. Weird. Attached is a screenshot of my scan settings.

Also I had the idea to enable AOD in order to wake my device less often to check for new notifications. The idea was that it always takes a longer time after screen off to get my device into deep sleep. So by waking my screen less often, there is less waiting for going again into deep sleep. Also I read in several threads that the drain from AOD is so low that it can't even be measured. Well, for tonight it was quite a high battery drain while the phone was left alone. Attached it a dump with "doze_time_tick" causing 1 wakeup per minute. What the hell? :D

Btw, I also disabled lift to wake now. Lifting the phone will now activate AOD (even with AOD disabled) instead of the whole screen. No idea if that still wakes up the device from deep sleep. But I thought it was a nice finding to share.
[BetterBatteryStats] Utini:
@TNSMANI just like I got from 0% deep sleep to 60-90% deep sleep with a reboot, I know got back to 0% deep sleep after another reboot.

Attached is a 15min dump (from unplugged to current) which shows that Proxyhandler is causing a partial wakelock for 15 minutes.

If I change the dump to "from boot to current" it will show the same for 2h during 2h screen off.

Can you somehow figure out why Proxyhandler is causing the constant wakelock?

I use dual sim (e-sim and physical sim). Also I cant seem to connect to any private dns anymore (Settings - Network - Private DNS - e.g. cloudflare).

Thanks!
[BetterBatteryStats] redhonker:
Hi,

I have Samsung Galaxy S21. It used to work. But I think it stopped working after Android 12 upgrade.

"no stats have been collected yet"

Reinstalled but does not help. It has all the permissions

What could I do?

Thanks
[BetterBatteryStats] TNSMANI:
Please read a few pages back for a workaround.
[BetterBatteryStats] redhonker:
Android 12 workaround

adb shell settings put global hidden_api_policy 1

https://stackoverflow.com/questions/55970137/bypass-androids-hidden-api-restrictions
[BetterBatteryStats] Utini:
Alright, I bought my Pixel 6 Pro in Germany and live in Austria.

Austria is a neighbor country of Germany but the Pixel devices aren't being officially sold in Austria.

I have like 60% deep sleep while screen is off in Austria and 40% awake.

Now I have been in Germany for 3 days and I am at like 90% deep sleep and 10% awake while screen is off.

Today I am back in Austria.. and also back again at 60/40 deep sleep/awake.

Could this be because my device is not officially registered at my carrier in Austria?

Any way to troubleshoot this further?

Thanks!
[BetterBatteryStats] mrjuniork:
Having less deep sleep in Austria than in Germany might have something to do with carrier coverage. Depending on how well the coverage is present in the area of your residence, it might really influence the drainage of your battery, since weaker reception does drain the battery noticably more.

And no, this has nothing to do with the device not being sold in Austria. The basebands are basically unified in both countries, so no issue there.

You might consider a more thorough analysis by taking a dump with the app.

Check the OP for thorough instructions and come back with the outcome of it.

Btw, nice purchase 👌🏼