yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] niix:
Wakelocks could not be read from /sys/kernel/debug/wakeup_sources, even with root

Hello everybody,

I have a problem with betterbatterystats and I'd be thankful if anybody could help me with this.

The problem is that I can't access kernel wakelocks even if I am rootetd and the app is installed as system app I can even access network, cpu states but not kernel wakelocks.

My battery consumption I think is a bit high but I can't find anything abnormal in alarms or partial wakelocks, so I reckon the problem must be in the kernel wakelock but I get "Wakelocks could not be read from /sys/kernel/debug/wakeup_sources" in the logcat.

Here a part of the dumpfile:

===================
General Information
===================
BetterBatteryStats version: 2.1.0.0_B4
Creation Date: 2015-09-05 09:48:04
Statistic Type: Unplugged to Current
Since 7 h 29 m 10 s
VERSION.RELEASE: 4.4.4
BRAND: motorola
DEVICE: condor_umtsds
MANUFACTURER: motorola
MODEL: XT1022
OS.VERSION: 3.4.42_by_percy_g2-g1a41007
BOOTLOADER: 0x5009
HARDWARE: qcom
FINGERPRINT: motorola/condor_retaildsds/condor_umtsds:4.4.4/KXC21.5-40/46:user/release-keys
ID: KTU84Q
TAGS: test-keys
USER: jenkins
PRODUCT: cm_condor
RADIO: MSM8610BP_1034.307.26.02P
Rooted: true
SELinux Policy: Enforcing
BATTERY_STATS permission granted: true
XPosed BATTERY_STATS module enabled: true
============
Battery Info
============
Level lost [%]: Bat.: -7%(92% to 85%) [0,9%/h]
Voltage lost [mV]: (4142-4148) [-0,8%/h]
===========
Other Usage
===========
Deep Sleep (): 6 h 45 m 17 s 90,2%
Awake (): 43 m 53 s 9,8%
======================================================
Wakelocks (requires root / system app on Android 4.4+)
======================================================
AudioMix (1013): 48 s Count:29 0,2%
AlarmManager (Sistema Android): 28 s Count:468 0,1%
wake:com.whatsapp/.AlarmService (com.whatsapp.WhatsApp): 12 s Count:15 0,0%
*sync*/gmail-ls/com.google/48f30ed42e65a86de96e7bad149d7d25@gmail.com (com.google.android.gm.Gmail): 12 s Count:2 0,0%
AlarmManager (Google Play Services): 11 s Count:240 0,0%
backupdb (com.whatsapp.WhatsApp): 6 s Count:25 0,0%
AudioMix (com.whatsapp.WhatsApp): 5 s Count:84 0,0%
AlarmManager (com.whatsapp.WhatsApp): 3 s Count:77 0,0%
GmailProviderProviderChangedBroadcastWakeLock (com.google.android.gm.Gmail): 3 s Count:4 0,0%
BBS_WAKELOCK_WHILE_SAVING_REF (com.asksven.betterbatterystats_xdaedition.BetterBatteryStats): 3 s Count:2 0,0%
fullsync (com.whatsapp.WhatsApp): 3 s Count:5 0,0%
*vibrator* (com.whatsapp.WhatsApp): 3 s Count:22 0,0%
RILJ (Telefono): 2 s Count:61 0,0%
ConnectivityService (Sistema Android): 1 s Count:469 0,0%
ActivityManager-Launch (Sistema Android): 1 s Count:42 0,0%
================
Kernel Wakelocks !!! wakeup_sources !!!
================

I would like to post a logcat but i don't know how as the log is too long and xda doesn't allow me to post links...

If you tell me how I will be happy to provide anything you need!

Nicola
[BetterBatteryStats] gabrielsamuel:
Someone should please give me a link to the battery stats app
[BetterBatteryStats] shaggyskunk:
Links can usually be found in the OP - In this case - Post #2

http://xdaforums.com/showthread.php?p=15869886

Sent From my SM-N910W8 Running SlimRemix v.4.0
[BetterBatteryStats] j1gga84:
I think it was asked a hundred times before but I search a possibility to keep BBS installed as a system app after a dirty flash (update) of my custom ROM. After every update I have to install BBS again.. I know from KK that it was possible to keep BBS installed with a file in init.d folder I think but I did not find a way yet to get it work under LP :confused:

many thanks and regards
[BetterBatteryStats] drezz2:
Hello, use BetterBatteryStats version: 2.0.0.0, and I've noticed that the BT column is most of the time to 1, sometimes changed to 0, but 90% of the time Mark 1, even if the disabled BT (the graphic marks also) is a failure?

the "Scan" column what mean?
[BetterBatteryStats] toketin:
Hi, if i've installed BBS as system app, now how can i uninstall it?

Thanks!
[BetterBatteryStats] shaggyskunk:
Depends on how you installed BBS - If you installed it in System Priv-App - Delete it there and SD card as well - Reboot

Sent From my SM-N910W8 Running SlimRemix v.4.0
[BetterBatteryStats] toketin:
Thanks, but on /system/priv-app i don't have BetterBatteryStats' dir :/
[BetterBatteryStats] shaggyskunk:
How did you install it as a System App?

Sent From my SM-N910W8 Running SlimRemix v.4.0
[BetterBatteryStats] toketin:
When i launched BBS i pressed on Install System app, i've seen that i've a com.asksven.betterbatterystats_xdaedition.apk on /system/priv-app. Is this the one that i have to delete?
[BetterBatteryStats] shaggyskunk:
Yes and also check /sd for BBS - Delete and Reboot

Sent From my SM-N910W8 Running SlimRemix v.4.0
[BetterBatteryStats] Wi1son:
Titanium Backup?
[BetterBatteryStats] flipmode_11:
G'day, keep up the excellent work and updates.

Could you please implement a feature for preserving and saving statistics after reboot? It renders the application useless if you cannot compare to cumulative statistics against 5th Stupid, 6th, 7th Sept for example, and look at an hourly breakdown.

So you only need store hourly totals and daily totals.

I would donate again and again, as I can never engender what day it is, let alone what graphs looked like, mAH and other usage from several days (or 1 day) ago.

Appreciate it mate!

---------- Post added at 12:07 PM ---------- Previous post was at 11:45 AM ----------

Wow! Version 2!!!

Could someone please list +ve / -ve of installing it as a System App??

I should probably have a list saved somewhere listing all apps I've made System Apps.... Should I restore factory...

Thank you
[BetterBatteryStats] danicadanica:
font bug ? aosp 4.2.2

it used to show before but when i changed to b5 it doesnt show what wakelock/alarms it rise pls consider this
[BetterBatteryStats] incisivekeith:
I have the latest apk installed. The 2x1 widget doesn't show any bars and it's stuck on the "since boot". I have the Samsung S6 Edge on Att.
[BetterBatteryStats] IronTechmonkey:
I had the same thing happen with BBS 2.1.0.0_B5 on a Moto E XT1511 running an unoffical CM12.1/L5.1.1 but it does not occur in the stock L5.0.2 on the same phone. Which of the 5 beta versions of 2.1.0 worked for you?

[EDIT - I've tested installations of multiple versions of BBS performed in different ways and always get stats no collected for partial wakelock (which is the main statistic I want - that is THE stat needed when testing ROMS). If this is not already a known issue I can log and provide more details.

[Back in Moto E XT1511 stock and partial wakelock stats look good.

Another thing - in the problematic scenario in CM12.1 L5.1.1 the boot (as in boot/unplugged) option was missing - there was only unplugged... for what that is worth.

Could the presence of SuperSU be a factor in all this?
[BetterBatteryStats] LuketaD2:
Great app! I've been using since my first Android!

Thank you very much!
[BetterBatteryStats] BretAB:
Hi,

Could the developer or someone else knowledgeable please take a look at the following post. It only has two threads :

http://xdaforums.com/apps/betterbatterystats/alternative-to-installing-battery-stats-t3189333

It seems that method of getting BBS to work on Lollipop is relatively easy to implement and simply works. I greatly appreciate your interest and assistance.

Regards . . .
[BetterBatteryStats] m1trand1r:
That thread has only two posts lol[emoji14]
[BetterBatteryStats] BretAB:
I see you corrected my question: I incorrectly said ". . . post has only two threads." You said, ". . . thread has only two posts . . ." Thank you for the forum etiquette/terminology correction.

Ok, even if there are only two posts in that thread, could someone please address the question? Here's that thread again:

http://xdaforums.com/apps/betterbatterystats/alternative-to-installing-battery-stats-t3189333

That fix for BBS doesn't appear to be discussed in the thousands of posts in this current thread we're in.

Thanks again . . .
[BetterBatteryStats] MulchShake:
I've been having an issue where my phone has periodic high battery drain while it should be on standby. I don't use any social apps or games. Phone is a Nexus 5 running stock 5.1.1 and rooted. This is a screen grab to show the battery drain. Thank you for any help you can provide.
[BetterBatteryStats] drezz2:
anybody knows?
[BetterBatteryStats] Rinoceros:
Why are people too lazy to read the first post instead of posting screen shots in FULL resolution?

If you post a screen shot, post them as attachment and not in your post.

I will never look at screen shots and probably neither anyone else without a proper dump and attached as described in the FIRST post

Re submitting your screen shot as a reply to your own post will not help you and is bothering others.
[BetterBatteryStats] j1gga84:
I don't know but is there a script for LP that prevents bbs to be deleted from system after a ROM update (dirty flash)?

Regards

Sent from my GT-I9100 using german Tapatalk 4
[BetterBatteryStats] lcmazza:
Screen On Time different from reported by powermanagerservice.display

My SOT does not match the kernel wakelock powermanagerservice.display I don't know what data is correct and if I'm actually having battery drain. Could anyone help me? Thanks. :highfive:
[BetterBatteryStats] Adywizard:
If you're talking about CM and other aosp based and similar ROMs then yes, there is a script.
[BetterBatteryStats] j1gga84:
Yes I am talking about that ;)

Where can I find it?

Regards & thanks

Sent from my GT-I9100 using german Tapatalk 4
[BetterBatteryStats] Adywizard:
https://www.dropbox.com/sh/e7lvqxz5ggisilr/AABgzQZ7LXul_-98pMBJq8TZa?dl=0

Place that file in system/addon.d folder

Chmod 755

Rename .apk to BBS. ?
[BetterBatteryStats] maigre:
I've been running the latest beta XDA version for a few days. I want to go to a paid version, or at least pay chamonix for his valuable work. This is sort of a silly question, but others must have done this a lot, so here goes — what do I do? Do I install the play store version over the beta? But I'd rather have the beta in that it's more recent. Do I uninstall the beta, then buy and install the paid version? Install the paid version over the beta, then install the beta back over the paid version? Something else?

I've read through here a little and done searches, but haven't found this particular scenario. There are almost 30,000 posts, after all. And I could just do a trial and error thing, but it could end up being more time consuming than I'd prefer. Better to just give chamonix the cash.
[BetterBatteryStats] Christiancs1969:
Buy pro use beta. That what i do
[BetterBatteryStats] maigre:
I bought the play store version and installed it. Now, I have both the current B5 and the play store version installed. Not much point in that. I don't want them both active at the same time. No harm in just deleting the play store version, I suppose. Is that what people here are doing? Or disabling it? Anything else?

Strangely, at least to me, now that I've installed the play store version, the XDA version is now in /data/apps, even though it was in /system/priv-app moments before. They both seem to run fully, even if they're no longer system apps. I'm removing both and starting over again with the XDA version.

chamonix, some instructions for uninstalls in the OP or the following one would be much appreciated by more than just me, I'm sure. I did see the flashable uninstaller, the script of which I've read through.

---------- Post added at 10:35 PM ---------- Previous post was at 09:43 PM ----------

Continuing my conversation with myself...

I uninstalled both the play store and beta XDA versions. Then, I rebooted and reinstalled the XDA version. But I never got prompted to install it as a system app. So I deleted it and wiped the caches. Reinstalling after that didn't get the prompt to make it a system app, either. So I just put it into /system/priv-app manually and rebooted again. Seems to be OK. I suppose I could have used TiBu to make it a system app. Probably the same thing. If there's something about this that's going to sabotage my BBS installation, please let me know.
[BetterBatteryStats] 777.300:
Thanks for the tip and script.

I am a little confused by you last sentence: "Rename .apk to BBS"

What exactly do you mean with that?
[BetterBatteryStats] sarbe:
Rename the file to BBS.apk
[BetterBatteryStats] timmytutone:
Just to make sure... you're saying to rename "82-BBS.sh" to "BBS.apk"?
[BetterBatteryStats] Adywizard:
Nope, you have to rename BetterBatteryStats_xdaedition.apk to BBS.apk which you can find in system/pri-app folder.
[BetterBatteryStats] Aroch925:
I keep getting this the reboot to install BBS as a system app. Any ideas?
[BetterBatteryStats] maigre:
It's by design. From post #3 of this thread:
[BetterBatteryStats] chamonix:
I guess you all have noticed that I have been pretty inactive in the last months. I have had a heavy peak in my day-job and had to set some priorities in order to keep my work-life balance at a healthy level. Now the good news is that that period is ending and I am ready to start where I left of, in time for the soon-to-be-release Android 6 version.

I have started sorting/prioritizing issues/requests and will resume working on the next Beta drops in order to reach a release candidate soon.

If you have opinions on things that should be included into 2.1 please feel free to comment on the issues on github: https://github.com/asksven/BetterBatteryStats/issues

The backlog as well as planning for the next drop can be found here: https://github.com/asksven/BetterBatteryStats/milestones

Please keep in mind that I work in time-boxes so the backlog may change a lot over time. If something is important to you please leave a comment: even if the issue is currently in the backlog I may lower priorities and would prefer to to that taking community feedback into account
[BetterBatteryStats] sachin.r.fulzele:
Which file is responsible for battery capacity ? Please help...
[BetterBatteryStats] atrix4nag:
This is my idle log. drain is 1% per hour. its normal, but when I start using the phone, the drain becomes too hight.. main cluprit is gms.

Any thing i can improve or just leave it as is...
[BetterBatteryStats] TheNML:
Working great, good job! :)
[BetterBatteryStats] maortrol:
Try this:

1- Install BetterBatteryStats with the apk file.

2- Open BetterBatteryStats and press "Install as a system app".

3- Reboot device.

4- Install AGAIN BetterBatteryStats using the apk file.

5- Finally, open BetterBatteryStats, and it should work fine now.

You're done. ;)
[BetterBatteryStats] Mikulec:
I can confirm that these steps work for me every time after flashing new rom.
[BetterBatteryStats] qwerty22:
chamonix,

please to add the Alarms deteails for Samsung Galaxy S5.
[BetterBatteryStats] xda_renato:
it work

i can confirm too. but for me i needed one last reboot because it show me 2 icon of BBS. everything is working fine now :good: thanks
[BetterBatteryStats] skupr:
Hight battery drain, please help!

Hi!

Since some time ago my phone (Highscreen Boost 2 SE) occasionaly starts draining power and heating very much.

I've made BBS dump according to instruction:

So, the top drainers are the following kernel wakelocks:

ipc0000001e_sensors.qcom

ipc_rtr_q6_ipcrtr

Searching this thread, whole forum and googling did not really help - although some people have similar problems, I did not found any solutions.

Maybe someone explain what these wakelocks are and who generates them?
[BetterBatteryStats] bailey boy:
Someone Help me?

Okay, I cannot seem to get the XDA version to work.

Steps taken:

Updated BusyBox Binaries

Installed .zip in recovery to make BBS a system app

Rebooted and installed the latest XDA BBS .apk

Open BBS -

BATTERY_STATS not granted

DUMP not granted

SELinux: Enforcing

This shouldn't be because I'm rooted, right?
[BetterBatteryStats] ek69:
All I do is download the apk, then open it to install, then open the app (it will ask for root access, I'm using SuperSU) then click the button "install as system app" then it will say install as system app was successful in a pop up and tells you to reboot for it to work.
[BetterBatteryStats] bailey boy:
OK...

I uninstalled all the apps and ran the recovery uninstall for system app install.

Then, ran the companion apk and rebooted.

Then ran the BBS xda apk and installed it as a system app and then rebooted and !voila!

Thanks.
[BetterBatteryStats] maxmax20:
Hello guys,

can anyone help me with my question if the following wakelocks are normal in the alarm section of BBS ?

They seem a little high for me. And how can I stop them ?

The Nexus4 is fresh installed with CM12.1

Thanks a lot,

Mark
[BetterBatteryStats] hernanrojasm:
Hi... I use supersu to install better baterry stats as a system app. then I could notice my phone never go to deep sleep again, so I tried to uninstall the app using "system app remover", the process was successful. A the end I want to reinstall BBS without system integration but even the process ends correctly I can not find or open the application. During the installation process I can notice that the Samsung S4 tell me, do you want tu "upgrade the existing app", but the point is I don't have the app.... I'm trying to (re) install it!!

Any idea about how to full reinstall the app?

thank you in advance.
[BetterBatteryStats] IronTechmonkey:
Not that I'm an expert but it is hard to tell what is going without the stats for "partial wakelocks". Also, you could try reducing the size of your pics so they dont take up the whole page even though that wont fix anything on the phone;).
[BetterBatteryStats] chamonix:
What exactly is missing? a logcat as well as details would be helpful.
[BetterBatteryStats] qwerty22:
Samsung Galaxy* + Lolipop problem: Wakeups without Alarms

com.google.android.gms (): Wakeups: 2 (17,1 / h)
android (): Wakeups: 1 (8,6 / h)
com.whatsapp (): Wakeups: 1 (8,6 / h)

View attachment BetterBatteryStats-2015-09-20_104106309.txt

View attachment dmesg-2015-09-20_104108415.txt

View attachment logcat-2015-09-20_104106410.zip
[BetterBatteryStats] chamonix:
Does compatibility mode help? Could you also please attach the output of 'dumpsys alarm' run with su?
[BetterBatteryStats] qwerty22:
Logcat with BetterBatteryStats debug information:

View attachment BetterBatteryStats-Wakeups_without_Alarms_2.zip

Additional please attention to partition "Alarms" on "Boot to Current" dump. Wakeups is less then "Unplugged to Current" dump.

Sorry for my English
[BetterBatteryStats] qwerty22:
Output: "Can`t find service: alarm"
[BetterBatteryStats] chamonix:
What about api mode for alarms?
[BetterBatteryStats] qwerty22:
Without API (by default)
[BetterBatteryStats] chamonix:
I saw that in the dumpfile. Does switching to api mode make things better?

Update

Logcat says:

09-20 11:16:48.714 E/ServiceManager( 257): find_service('alarm') uid=0 - PERMISSION DENIED

Thanks Samsung!

Your phone does not give access to dumpsys info. Due to that BBS falls back to API but unfortunately API mode does not provide as much info as dumpsys does. Find a way to run dumpsys alarm and BBS will use that as a source for more precise data.
[BetterBatteryStats] qwerty22:
Set to "Alarms using API", Reboot phone - no effect. "Accessing Alarms in API mode as dumpsys has failed"

---------- Post added at 03:18 PM ---------- Previous post was at 03:16 PM ----------

Patched BBS is work normaly:

com.google.android.gms (): Wakeups: 4 (2.0 / min)
Alarms: 0, Intent: ALARM_WAKEUP_ACTIVITY_DETECTION
Alarms: 0, Intent: com.google.android.intent.action.GCM_RECONNECT
Alarms: 0, Intent: ALARM_WAKEUP_LOCATOR
Alarms: 1, Intent: com.google.android.gms/com.google.android.libraries.social.mediamonitor.MediaMonitorIntentService
Alarms: 0, Intent: com.google.android.gms/.lockbox.LockboxAlarmReceiver
Alarms: 2, Intent: com.google.android.intent.action.SEND_IDLE
Alarms: 1, Intent: com.google.android.gms.gcm.ACTION_CHECK_QUEUE

com.whatsapp (): Wakeups: 1 (30.0 / h)
Alarms: 0, Intent: com.whatsapp.action.UPDATE_NTP
Alarms: 0, Intent: com.whatsapp.messaging.MessageService.CLIENT_PINGER_ACTION
Alarms: 1, Intent: com.whatsapp.alarm.CLIENT_PING_TIMEOU

Logcat:

09-20 13:44:58.686 I/AlarmsDumpsys( 8698): getAlarms: SDK=21, RELEASE=5.0

View attachment BetterBatteryStats-Wakeups_with_Alarms.zip
[BetterBatteryStats] chamonix:
2.1RC1 is up. As the probable M release date approaches we need to get ready so RCs will focus on bug fixes
[BetterBatteryStats] chamonix:
You main cause of drain is maps related to location. All main wakelocks refer to that, mostly in the high counts.

I guess you use Latitude and maybe places for some automatic checkins

Now if you don't use Latitude turn it off by logging out. If you use it / need it there are only three options / actions:

- make sure your maps version is up-to-date

- check the settings about caching and make sure it's wifi only, turn off auto checkins

- test an alternative latitude updater like 'altitude' and set latitude in maps to manual
[BetterBatteryStats] chamonix:
Wake or wake_rx? In the second case you should see incoming traffic, be aware that the target address must not be the phone so be careful about filtering too much.
[BetterBatteryStats] ManUtd07:
Sorry, just want to make sure I understand you correctly. I should charge to 100%, take off the charger and then create another dump file? Or, should I charge to 100% and let the phone just sit for a little while and then create the dump file? Thanks for the help, I really appreciate it.
[BetterBatteryStats] jeremysherriff:
Idle for 8 hours while you sleep would be ideal..
[BetterBatteryStats] tomsi191:
i am not signed in on latitude and anyways maps only account for 5mins out of 30mins difference between screen on and wake,where are the rest coming from?

also any ideas about the huge consumption spikes?
[BetterBatteryStats] karthiks:
Thank you. I do want to use them and not having them on seems like an overkill. Will the kernel have an effect? I am running Siyah 2.6.9

Also Cell Standby is at 27% of usage over a period of 24 hours when the OS is at 25%. I am not in an area with bad signal or anything. Problem with radio?
[BetterBatteryStats] ole12:
Could someone please take a look at my bbs dump file.

The android system is the top user, and cpu cpy shows that it use 1000mhz almost more than 100mhz or 200mhz.

I use checkrom v5, together with latest siyaj kernel and KI3 modem.

The reason i ask is before i could use the phone about 2 days with medium use, now it lasts almost 1 day with medium use.

http://db.tt/loKzEhcG
[BetterBatteryStats] sohebq:
When I sleep, My phone awakes :D

Thanks to everyone for helping me out. I am getting good results with the battery, especially on the standby. I always wanted a good standby results, because I know I can't control much when the screen is on and it is natural.

The only reason for posting this image was to figure out the reason for one major wakelock that came in the middle of this picture. The funny thing is that screen awake came when I was sleeping. :D

I am attaching dump file, help will be appreciated.

My big question is about three things:

"Managewakelock: partial (UID): 2 h 55 m 8 s (10508 s) Count:1140 9.7%"

""PowerManagerService" (): 5 h 58 m 10 s (21490 s) Cnt:(c/wc/ec)8289/0/0 12.7%"

and

""vbus_present" (): 2 h 58 m 26 s (10706 s) Cnt:(c/wc/ec)1/0/2 6.3%"

I googled about these three services but didn't find anything. Please guide me about it Thanks.

_________________________

I added cool smileys to this message... if you don't see them go to: http://s.exps.me
[BetterBatteryStats] torchedlh:
Just want to say thanks everyone for helping me.

However, it looks like the kernel was the culprit. I updated from Siyah 2.6.5 to 2.6.9 and it really solved it! Before, my phone was awake almost 50% of the time, now it's only about 10% awake. I went 9 hours today with Wifi connected and only lost 15% of my battery! That's insane!

Thanks again!
[BetterBatteryStats] jeremysherriff:
good to hear, and thanks for posting about what fixed it, for others to learn..