yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] vickystarboy:
Phone is awake most of the time.. Should I post a dump?
[BetterBatteryStats] vickystarboy:
Awake
[BetterBatteryStats] TNSMANI:
Yes, if you want someone to help. Read the OP and take an IDLE dump.
[BetterBatteryStats] antoscara88:
hi, I attached the file dump, I left the phone all night with wifi turned off and data connection active. I have also received some whatsapp notifications, I hope they have not affected.
[BetterBatteryStats] strongst:
Franco Kernel manager and battery monitor for several hours as active processes... I would recommend to either change the kernel or better to go back to stock kernel and repeat the dump file with close parameters as you did now.

At the moment those processes are having an high impact on your battery life.
[BetterBatteryStats] Vordx:
Why did you make it 1 even when op mentioned to put it to 0 ?
[BetterBatteryStats] chorba69:
Hello battery experts.

I have to say right away: Sorry for not using BBS and using GSam and still writing here.

I haven't found a Community for GSam and it was more user-friendly for me so I installed it.

I hope you can help me anyways. Thanks.

So, I need some help with my new (like 3 weeks old) P20 Pro (single sim, no root).

I'm really happy with this phone now except for one thing. That thing is Standby drain.

I lose like 1-2% PER HOUR over night, doing nothing.

I left my phone last night on 25% and went to sleep.

Next morning, 7 hours later I was on 13%, losing almost 2% per hour.

In my opinion, that's just too much for doing nothing on the phone.

I'm not an expert reading those battery stats, but I dont actually see a problem.

There are no wake locks and the only apps that use the battery are Android-System, Kernel (Android OS) and Google Play-Services.

Huawei Health and Google Play-Services used the Sensor time a lot, but I don't know if the sensor time is important for the battery.

If you have a solution, please give me an advice.

My dad gets the same phone next week and I wanna get it done untill he gets the phone, so I can do the same.

Things I've done:

- wiped cache

- reverted to factory settings via standard recovery

- debloated (like 15-20 apps)

Screenshots:

Overview + Wake Locks

Battery Use

TOP 3 Battery Use Apps

Network + Sensor + Hold Time

Big thanks.
[BetterBatteryStats] strongst:
Sorry to say, but please post a dump file according to the instructions.
[BetterBatteryStats] chorba69:
Hi, a quick report from me.

Firstly, I'll upload the dump file but this time there is no need to check it.

Last night, I charged my phone to 100% as described and left the phone to "discharge" the whole night.

Today, 6,5 hours later, I was still on 100%!!

I think, the battery doesn't work the same at like 20% as it works when it's on 90+%.

I will do a test today and let my phone on like 20-30% and let it discharge to check, if it could be a low battery percentage problem.

So I would report tomorrow again, because I don't really have to charge the phone at like 40% if I know, that I'm not gonna use my phone the next day (because of work or something).

Here is the dump file, just to let you have a comparasion between today and tomorrow. Of course, if it's tomorrow going to be as bad as like 2 days ago.

Thanks for now.
[BetterBatteryStats] DB126:
Drain rates are often non-linear at lower levels (<25-30%). Charge your phone overnight; problem solved.
[BetterBatteryStats] TNSMANI:
Obviously, the percentage was stuck at 100% for some time. I am saying this because the screen on time was more than a minute before the dump was saved, there were background downloads by various apps totalling about 140 MB, there were various wakelocks and alarms etc. and so there is no way that the battery stayed at 100% in reality. You also have an older version of BBS and it doesn't show the details of the alarms. Please update BBS before taking another dump.
[BetterBatteryStats] MysteryIII:
I just checked the OP once again but it doesn't mention the hidden/undocumented APIs at all.

Until Android 8 they were always available afaik. Now with Android 9 they were deactivated with the ability to be reactivated with these ADB commands. And beside the security factor isn't it always better to have more APIs?

When you first start latest (beta) version of BBS on Android 9 it shows on first start a notice that there might be issues due to the deactivation of the hidden APIs and a link to a Android documentation site, where everything is explained including the reactivation. That's why.

As there is no hint for Android 9 in OP yet, I just suggested to add the hints that you might need to reactivate Usage Data Permission and how to get hidden/undocumented APIs back.

€: Just to make sure we are talking the same: OP=Opening Post or do you mean Opening Poster?
[BetterBatteryStats] DB126:
This is fairly common, varies across devices and can be influenced by purposeful design, poor component integration/calibration, elapsed time since the charge circuit disengaged (if on/off type), whether rounding is used when reporting charge level, sampling interval, age of battery pack and a handful of other variables. Primary reason why I advise starting idle endurance studies at ~95% and burning off at least 5-10% to get a more accurate picture of average hourly drain rate.
[BetterBatteryStats] IronTechmonkey:
I can testify to this personally. I had a device which, after some time of certain usage and charging patterns would stay at 100% for an oddly long time and then toward the middle of the charge drop precipitously. The overall battery life was only mildly degraded but the graph of reported charge percentage over time had changed. In my case I think it was because the phone was routinely fully charged in the evening and then bumped back to a 100 in the morning. The same thing has not occurred on other devices which have not been charged in that manner, but to your point there are many other factors which influence that.
[BetterBatteryStats] trinidude4:
The OP (original poster) said to use 0 in this post:

https://xdaforums.com/showthread.php?t=1179809&p=77305270

I was getting the API error on pie but didn't want to use 0 since it wasn't recommended. At your suggestion, I used 1 and I haven't seen an error message since. The difference between 0 and 1 from the documentation is:

0: Disable non-SDK API usage detection. This will also disable logging, and also break the strict mode API, detectNonSdkApiUsage(). Not recommended.

1: "Just warn" - permit access to all non-SDK APIs, but keep warnings in the log. The strict mode API will keep working.

I'm not sure if it really would be a big deal disabling strict mode API completely, but using 1 seems like a good compromise and at least I'm not getting the annoying popup anymore.
[BetterBatteryStats] antoscara88:
good day, as you suggested I returned completely stock, android 9 with pacht March 2019. I have attached the dump file.
[BetterBatteryStats] strongst:
As you can see, it's only 2,8%/h and not over 4.
[BetterBatteryStats] antoscara88:
yes, but it is still a lot, in six hours I lose about 15% that in air mode it is a lot. Also I noticed, via cpuspy, that my cpu never goes deep sleep but remains active at 307 Mhz.
[BetterBatteryStats] strongst:
That's true and also visible in the dump file. 2 kernel wakelocks are visible. Do you have any apps installed besides the ones that comes with the stock rom? Or is your device really completely stock?
[BetterBatteryStats] antoscara88:
In addition to the pre-installed apps I have whatapp, messenger lite, greenify, kernel auditor, bbs ... Can I start the phone in temporary mode and check if there is a battery drain ?. How do I block those two kernel wakelocks?
[BetterBatteryStats] strongst:
Lol, that's not completely stock as mentioned before if you're running greenify, kernel Adiutor etc...

Please go COMPLETELY STOCK then make a new dump file.

Blocking wakelocks when other apps are running and you don't know if they are coming from a roque app is useless.
[BetterBatteryStats] pjadec:
Kernel problem or usb problem

9-0022 (): 7 h 30 m 44 s Cnt:(c/wc/ec)0/0/0 100,0% ??? I don't know what it is

6a00000.ssusb (): 7 h 30 m 44 s Cnt:(c/wc/ec)0/0/0 100,0% usb port problems fixed by reboot, probably
[BetterBatteryStats] Pablo.x:
I've just make a little dump file because I think I'm facing same bug as other users.

In 1 hour, 40min awake, and there's apparently no wakelock or process that may make it happen.

Any help would be appreciated...
[BetterBatteryStats] pjadec:
Make a new log because here's too much screen on time. Thats make difficult to analyze log

Screen On (): 5 m 6 s
[BetterBatteryStats] Oswald Boelcke:
Even if you are probably facing the same issue (not necessarily a bug) like other user, "little" dump files or screenshots aren't of any help.

I suggest to provide an idle dump in accordance with the instructions in the OP and to post it here (personal request: as txt-file).
[BetterBatteryStats] Pablo.x:
Okay, I'll try it then.

Edit: I've posted a zip that contains that .txt
[BetterBatteryStats] antoscara88:
No I keep restarting and restoring the phone but that kernel wakelock always stays. I do not understand how to solve them.
[BetterBatteryStats] strongst:
Do you have really installed the stock rom without any 3rd party app? New dump file available?
[BetterBatteryStats] pjadec:
Sorry. It's usb connector problem. probably dirty or something else

You have to clean usb port with something

Have you try restore factory image. No restore backup because something is corrupted or hardware problems.
[BetterBatteryStats] antoscara88:
good morning, now I have uninstalled everything, I left only WhatsApp, the dump file was generated in airplane mode.
[BetterBatteryStats] pjadec:
Still same drain USB port otg or dirty port
[BetterBatteryStats] Pablo.x:
I've just record this dump tonight.

I had a very good (so strange) deep sleep.

Although I don't know where does those 40mins awake come from, and it has my cpu at 1.59GHz on those 40mins...

Let's see if this one it's okay.

Thanks everyone.
[BetterBatteryStats] TNSMANI:
Once again it is a "little dump file" with hardly 3 hrs and with a screen on time of more than a minute. Patience is the key. Read the OP again and post a proper idle dump.
[BetterBatteryStats] antoscara88:
via the franko kernel app I had that wakelock locked, but the battery consumption was the same. you can check it yourself with the first dump file I sent you.

I think there is something that keeps the CPU active, because it never goes into deep slepp.
[BetterBatteryStats] githyanki:
We have asked you not to do any wakelock blocking. It can cause strange behaviour and have the opposite effect than what you are trying for.
[BetterBatteryStats] DB126:
As previously stated USB port (hardware) issue keeping device awake. Since it is not sleeping CPU goes about it's normal business. A beating heart does not cause insomnia.
[BetterBatteryStats] antoscara88:
now everything is completely stock, there is no blockage. the block was in the first dump file I sent. Now I try to blow the USB port with compressed air. however, the phone is recharged with any cable, but the PC can only connect with one, the others do not work.
[BetterBatteryStats] Oswald Boelcke:
That's an issue with the cables and not of the device or the PC.
[BetterBatteryStats] antoscara88:
yes I know but maybe the two problems are connected
[BetterBatteryStats] deitrich:
Hey! does bbs work with android 9?

Wysłane z mojego SM-G950F przy użyciu Tapatalka
[BetterBatteryStats] pjadec:
Probably both are usb related problems.

https://xdaforums.com/pixel-xl/help/unknown-wakelock-pixel-awake-100-time-t3793400

Try booting up in safe mode and see if the wake lock persists
[BetterBatteryStats] Vordx:
App keeps crashing in background and when tapping on "share to" it crashes again.

Galaxy note 8 , Android pie. App has all the permissions granted using adb.
[BetterBatteryStats] SwordOS:
I'm getting "no stats have been collected yet error" in the summary page and in every other page except alarms and cpu states.

I have no root but I used adb to make the app work

what should I do?

samsung galaxy s10 exynos

Inviato dal mio SM-G973F utilizzando Tapatalk
[BetterBatteryStats] DB126:
Or a damaged/worn USB port that will only 'mate' with cable that has an appropriately malformed connector. Damaged ports can fail to properly acknowledge cable removal leading to perpetual kernel wakelocks.
[BetterBatteryStats] Pablo.x:
I think this time I was able to get a good dump.

Also, phone did not go into deep sleep mode, so it's the best scene to analyse IMO. :highfive:

Thanks to everyone again.
[BetterBatteryStats] DB126:
- good dump :)

- no bad app actors (although some are more active than need be)

- appears a hardware fault/glitch or dirty/failing/stuck sensor is blocking sleep

- warranty item IMHO
[BetterBatteryStats] Pablo.x:
Warranty got expired a few months ago...

In addition, I send it on warranty for a battery replacement on christmas.

I didn't face any problems like those after that, they started a few weeks ago.
[BetterBatteryStats] TNSMANI:
Dump is good.

Mobile signal is not great, it is good most of the time but no so good for some time.

ivooks app generated a lot of alarms, location seems to be on, do you require location to be on while the phone sleeps? Xiaomi Health app also generated some alarms, Whatsapp, Instagram etc also contributed. Background downloads by Spotify etc. of about 10 MB also happened. Significant Motion Detection sensor was awake for more than 4.5 hours, anything you have enabled that can be a cause of this? Widget Update alarms numbers are also significant, can you reduce them?

Apart from these I am not able to comment further. These may not account for the total period of no deep sleep but this is the best I can do. Let the others/experts also see the dump.
[BetterBatteryStats] Pablo.x:
Well I will take a look to all that you've commented.

I think motion detection is used for ambient display, so I'll see if that's the culprit of all of this.

Thanks a lot! :good: :fingers-crossed:
[BetterBatteryStats] wickedpygmy:
Yes I have this too. I emailed the developer yesterday. Looks like a problem with the new Exynos S10.
[BetterBatteryStats] AlemanSantos:
Hi, I'm having 1.8 drain per hour, did this log last night, already disabled location, on oreo didn't need to but pie is another thing, maybe anyone can tell me what other thing is affecting my stand by stats? First log with bbs, I think I did it right, not from 95% though
[BetterBatteryStats] strongst:
WhatsApp and spotify downloading a lot in the background, I hope you did not hear music?

3/4 of the time your device was on lowest frequency, not deep sleep. Maybe a custom rom issue or a custom kernel issue.
[BetterBatteryStats] AlemanSantos:
No listening or music download of course, I'm going to restrict Spotify on background, about WhatsApp, I dont know, will check again tonight, thanks
[BetterBatteryStats] IanHodgson:
Just left my phone for 6 hours plus then taken BBS dump because I noticed battery usage increasing. And indeed, over the 6 hour period when I didn't touch the phone, it was awake screen off for nearly an hour, and WiFi was on and running 100% of the time. Can anyone take a look at the dump file for me to find possible reasons? Thank you so much.

Ian
[BetterBatteryStats] TNSMANI:
Your screen on time is nearly 10 minutes as against the expected seconds. Save the dump as soon as you unlock the screen.

Mobile signal was not very great and it will contribute to the drain.

While the awake(screen off) time may be more, the drain was 0.6% per hour which is ok for Pie.

Wifi on and running usually doesn't affect the drain much.

Were you connected to any other devices since 'audioin' wakelock was held for more than 9 minutes?

Are there any other devices on the same wifi router? You have high number of 'qpnp_fg_memaccess' kernel wakelock? May be a printer? Something like that is keeping your phone awake. Disconnect all other devices and take another dump.

Location also seems to be on. Do you need it while the phone is sleeping?

Switch off Ambient Display as it will drain battery or atleast while taking another dump.

Whatsapp, Facebook lite also drained battery. See whether you can control them.

After taking necessary corrective actions for the above, take another dump duly observing the instructions in the OP.
[BetterBatteryStats] Anilexis:
Same problem, same galaxy s10 (exynos)
[BetterBatteryStats] akira888:
Same here! Thought I was the only one lol. Bought the app last night then refunded within a few mins lol
[BetterBatteryStats] DB126:
Give GSAM a whirl. Output are a little different but yields similar info if looking for culprits. Might have to give a few permissions via ADB if not rooted.
[BetterBatteryStats] akira888:
Already granted all three required permissions! Still doesn't work on S10...
[BetterBatteryStats] SwordOS:
I always used gsam on my s8, but on my new s10, as soon as I give it the adb permissions, it freezes and glitches and then stops working. I also wrote to the gsam developer but I'm still waiting for his reply.

As of today, both bbs and gsam don't work on the s10 exynos

Sent from my SM-G973F Galaxy s10

using Tapatalk
[BetterBatteryStats] akira888:
Same here!

Neither works on S10
[BetterBatteryStats] antoscara88:
Good morning, maybe I solved my problem since yesterday my phone goes quietly in deep sleep but I don't know if there is still the wakelock 6a00000.ssusb, I honestly don't even want to look to avoid ruining something xD. However, I believe I have solved this procedure, which I found on the internet:

Go to Settings -> Apps & Notifications -> App Info (See all X apps), and tap the three dots in the top right corner, then tap on “Show System”. Now, in the app list, find and open External Storage, and tap on the Storage section. Clear the Cache and Data. Go back to the app list, find Media Storage and repeat. Your PC should be able to transfer the files to your computer. I'm not sure this was the right cure, but now the phone goes quietly in deep sleep, it's since Wednesday that I don't load it, I'm currently at 46% charge.
[BetterBatteryStats] DB126:
Nice find! This solution hadn't crossed my mind for awhile as it hasn't reared its head on more recent Android and GPS releases. Glad it worked.

BTW - don't worry about wakelocks. They are not evil unless associated with an undesirable outcome.
[BetterBatteryStats] koekoek91:
Same here on my S10+ Exynos.

I'm getting amazing battery life in terms of SOT but idle drain is pretty bad and I wanna find out why.

Let us know if you receive a reply from developers.
[BetterBatteryStats] SwordOS:
still haven't received a response sadly

Sent from my SM-G973F Galaxy s10

using Tapatalk
[BetterBatteryStats] kasth:
Hey guys!

I have a Mi A2 without root so i'll have to to grant some permisions on ADB:

adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS

adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.DUMP

adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.PACKAGE_USAGE_STATS

The question is: how can i revoke these permissions if i want to remove BBS?

Oh, i'm on Android 9.

Thanks!
[BetterBatteryStats] SwordOS:
just uninstall bbs and you will be asked for those again, so I think that is the easiest way

Sent from my SM-G973F Galaxy s10

using Tapatalk
[BetterBatteryStats] kasth:
Simple solution. Thank you very much!
[BetterBatteryStats] GialanG:
I have the same problem like others using S10/S10+. BBS can't collect the data. It looks like no app has been able to do it so far.
[BetterBatteryStats] chamonix:
Just so that you guys get the info that I had given by mail to two users reporting the S10 issue:

I can not tell for sure because I have no access to an S10 bit it seems that Samsung has applied different policies/settings than Google. I have had a similar report about missing data, with less details but a screenshot showing that the battery info service could not be reached. In your logcat I see the details about that:

03-12 07:33:55.534 I/BatteryStatsProxy(21980): retrieving parcel

03-12 07:33:55.534 W/BatteryStatsProxy(21980): Unable to read statistics stream

03-12 07:33:55.534 W/BatteryStatsProxy(21980): java.io.IOException: read failed: EACCES (Permission denied)

The cause of all this is Google trying to restrict apps from using private apis and I suspect that Sansung has enforced stricter settings or came up with another attempt to fix things: the private api can still be called but the data returned (a parcel) can not be read. I can not exclude that this is a bug, or a creative non-standard way to restrict access. What I don't like about this is that Samsung (once again) deviates from the default way of doing things.

Of course this is only speculation as I have only Pixel devices for my testing but I will definitely try to get my hands on one S10 to confirm and potentially look for a workaround.
[BetterBatteryStats] chamonix:
BTW looking into android Q beta 1 on my p2xl as the stats can not be read either. Will confirm if the issue is related once I have the logs (no laptop at hands atm)
[BetterBatteryStats] chamonix:
OK, false alarm. I updated to the latest build from hockey-app and now bbs runs on Q b1 :)
[BetterBatteryStats] koekoek91:
Thanks for the info.

I hope you'll be able to fix this.

Im willing to help testing on my S10+ Exynos if needed.
[BetterBatteryStats] SwordOS:
I can also test on my s10 exynos

Sent from my SM-G973F Galaxy s10

using Tapatalk
[BetterBatteryStats] githyanki:
Are you using the latest version from hockey app?
[BetterBatteryStats] koekoek91:
That's this one right?
[BetterBatteryStats] koekoek91:
[MENTION=1330150]chamonix[/MENTION] not sure if anyone has reported this already but alarms and CPU states are actually being collected on S10+, the rest of the stats aren't.

V2.5-302 is the latest version from hockeyapp correct?
[BetterBatteryStats] SwordOS:
I can confirm that alarms and cpu states data are collected on my s10 exynos

Inviato dal mio SM-G973F utilizzando Tapatalk
[BetterBatteryStats] chamonix:
Yes it is the latest version and yes I am aware of the problem introduced by Samsung but do not have a fix atm
[BetterBatteryStats] koekoek91:
I know.

Just reporting that alarms and CPU stats actually are collected ;)
[BetterBatteryStats] chamonix:
The reason for that is that these stats do not come from the battery info services that does not deliver any data on the s10
[BetterBatteryStats] DiamondJohn:
FYI: Doze visualization

The following app I built has a new feature which graphically presents your doze history. You can see the history over time of your phone switching between deep, light and their respective maintenance windows.

It also shows your doze settings, lets you compare it to a number of other profiles I found over the net (and a very aggressive one I built myself), also lets you set it to one of the others (make a nandroid before of course...)

======edit==============

forgot the link: https://xdaforums.com/showpost.php?p=79135309&postcount=74
[BetterBatteryStats] nico933:
I think I got the problems

Seems to be related with last version of gcam (6.1) a lot of people are reporting to have this error fi they are running the same Rom of mine
[BetterBatteryStats] methuselah:
Long live Samsung's anti developer policies. Sometimes bixy and now battery stats
[BetterBatteryStats] Gold_Phenix:
Where i find latest version BBS?

Wysłane z mojego LG-H850 przy użyciu Tapatalka
[BetterBatteryStats] :
Read op ... https://xdaforums.com/showpost.php?p=15869886&postcount=2
[BetterBatteryStats] joakimbo:
Anyone seen this wakelock before? *job*/PhenotypeAdaptiveSync:com.google.android.gms

It's killing my battery. This is on OP6 with custom kernel and xXx nolimits.
[BetterBatteryStats] DiamondJohn:
whoops...forgot the link https://xdaforums.com/showpost.php?p=79135309&postcount=74