[BetterBatteryStats] chamonix:
How-to and FAQ

How-to

I have created a GitHub project for the Knowledge Base where the online and in-app help will be maintained as well. You can find the information here:

The online help: https://better.asksven.io/betterbatterystats/help/

The how-to: https://better.asksven.io/betterbatterystats/how-to/

A good how-to by Chris Hoffman published by How-to geek

Online Hilfe auf Deutsch: http://asksven.github.com/BetterBatteryStats-Knowledge-Base/help_de.html

How-To auf Deutsch: http://asksven.github.com/BetterBatteryStats-Knowledge-Base/howto_de.html

The repo: https://github.com/asksven/BetterBatteryStats-Knowledge-Base

The Knowledge Base Project: http://asksven.github.com/BetterBatteryStats-Knowledge-Base/

FAQ

1. Q:Will BBS be fixed to support Kitkat (I get "Services could not be contacted" errors?

A: Kitkat is supported by BBS starting from version 1.15

2. Q:Why are partial statitics not available on Kikat?

A: If you have a rooted phone enable the advanced root features and all will be fine. If you have no root unfortunately you are stuck without Partial Wakelocks as Google has made changes to prevent apps to access that data (see also here)

3. Q:Why installing BBS as a system app as everything works with root?

Deprecated: BBS does not require the system app anymore

A: Starting with Kikat BBS has 3 modes: without root a limited mode provides a minimal set of stats. With root the set of stats is complete but some stats (other, partial wakelocks, processes) still use a workaround. Finally with the system app BBS is fully featured without any workaround.

4. Q:I have high wlan_rx kernel wakelock. What is it and how to proceed?

A: This kernel wakelock is caused by Wifi waking up your device. To avoid it you should turn your Wifi off if not using it, use a tool to control your Wifi state or try to find and remove the cause. More here

5. Q: Google Maps is causing a lot of overhead. Must I freeze it?

A: no, Karpfenhai wrote step-by-step instructions on how to configure autostarts and the location service to avoid that

6. Q: Are you aware of the bug in BBS causing SuperUser to ask for su-permissions over and over again

A: As you said, SuperUser is asking over and over again, it's no BBS bug as BBS only requests su rights. More here

7. Q: BBS shows "no ref since unplugged"

A: Starting from 1.9 is is mandatory to plug/unplug after boot to get a "since unplugged" reference to be created. Starting from 1.10 there is anew reference "since boot" and a preference to fall back to that reference if no other is available.

8. Q: Why can't you just skip deleting the references at boot?

A: If I could I would. In a nutshell: BBS is a passive monitoring tool; this means it does not cause any overhead collecting data but compares snapshots. Now the disadvantage of this is that it makes no sense to compare values of counters between two references (e.g. "since unplugged" and "current") if the counters were reset in between. In fact that would potentially cause negative values, in every case wrong values.

9. Q: But is used to work before. Why did you change it?

A: It didn't work, you just didn't notice. The kernel and Android reset their counters at boot. That means that there is no way to compare counters from before the boot with counters from after.

10. Q: What do the widget colors / graphics mean?

A (new round widgets): the legend is displayed if you resize the widget

A (legacy widgets): For the large widget it's pretty simple. The colors represent the values "Since" (blue), "Deep sleep" (green), "Awake" (yellow), "Screen on" (white), "Kernel wakelocks" (magenta), "Partial wakelocks" (cyan). The 100% is the max of those values.

For the small widget see here

11. Q: Where are the dumpfile and logcat saved / how are the files named?

A: Both files are saved to /sdcard, their names are BetterBatteryStats-.txt and logcat-.txt where timestamp is of the format "yyyy-MM-dd_HHmmssSSS" (starting from 1.12 there is an option in advanced prefs to save those files to the private directory /sdcard/Android/com.asksven.betterbatterystats/files).

12. Q: Are you aware of the fact that BBS does not work properly for secondary users (Android 4.2)?

A: BBS works fine for secondary users as long as you don't enable root features. The reason is not BBS but the lack of support of the multiuser feature in the superuser/supersu version you are using.

13. Q: What is *overflow*?

*overflow* is a sign that one stat counter was overrun. This may happen if you have not boote your phone since long or if some wakeup/wakelock is very frequent. The only way to see what is hidden behind *overflow* is to reboot and take a fresh reading.

14. Q: Why is 'screen off' reference not being created?

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

15. Q: Even after plugging/unplugging my phone no reference except 'boot' is shown

A: something is preventing the unplug event to be passed to BBS. You should check for tools like greenify or stamina mode that mask such events and make sure that BBS is whitelisted. On newer Android versions please also make sure that BBS is not "optimized" by Android, under "Settings - Battery Optimization"

16. Q: What is the watchdog and how does it work?

A: The wachdog is a feature to help you in analysing when happens when screen is off. When the watchdog is turned on a reference 'screen off' is created. You can also configure the watchdog to create a reference 'screen on'. Opionally the watchdog will notify you when screen is turned on and the awake ratio was bigger that the configured threshold. In order to avoid too much overhead in processing a threshold can be set to disable the computing for short screen off times.

17. Q: my logcat is empty and says "Unable to open log device '/dev/log/main': No such file or directory"

A: Check if you have a custom kernel that turns off logging. If not some file permissions may be broken: use the repair permissions function from your recovery

18. Q: How can I get rid of GSF wakelocks

A: GSF (google service framework) can not be avoided and in no case it should be frozen. Here are some settings that can help reducing the overhead.

19. Q: The other stat is wrong. It shows "No data connection" and "No or unknown signal" while was online with Wifi all the time

A: "No data connection" and "No or unknown signal" refer to your cell data (2G/3G) service. As you have had Wifi on for some time the cell data was turned off, consistent to what the stats say: work as designed

20. Q: I can not install BBS as a system app. What can I do.

A: BBS does not require the system app anymore

A: If you are on a version older than 4.4 you don't need to install BBS as a system app. If you are on 4.4+ you should first try the in app installer. If for some reason it fails you can use the CWM scripts attached to install / uninstall BBS as a system app

21. Q: I am suffering from a high NLPWakelock time. Is there something I can do about it?

A: Here's a good summary of what NLP is and how it can be positively impacted (thanks to @Perseus71)

22. Q: On CM12 based ROMs the launcher crashes when placing a widget. When will this be fixed?

A: I can not find anything wrong with BBS code and the crash occurs in the launcher, not in BBS. After spending quite some time trying to understand the problem I must conclude that the problem is with CM12 (other ROMs on Lollipop do not have this problem)

23. Q: I can not or do not want to root my devices but would like to use BBS to gain insight. Can this be done?

A: The answer used to be "no" but this has now changed. See post #4 for a detailed description on how to proceed.

24. Q: I can not get BBS to work. How should I proceed to find out the cause

BBS has no dependency to any root-tool and does not require root to work, it only requires specific permissions that can be granted by:

- using ADB as described in the FAQ

- letting the app grant itself the permission if root is available

25. Q: BBS Shows a permanent notification. Can I remove it?

The notification is due to the android app model having changed and now requiring apps that run in the background to show themselves. I have put the "background app" notification into a separate channel named "BBS Event Processing" so you can disable it if it bugs you: no other vital notification will be send to that channel

26. Q: What is this popup saying "Detected problems with API compatibility"?

For Android 9.0 Pie users getting the "Detected problems with API compatibility (visit g.co/dev/appcompat for more info)" popup error please see this post.

When diagnosing / analysing there are a few important things to know:

- the app (advanced settings) shows you whether the permissions were granted or not

- when checking if any acition had a positive result you should always use raw stats as the default view does a diff between two snapshots, i.e. if one snapshot is missing it may show no results

- logcat may give you some info about what is going wrong, e.g. the app not being able to contact the battery_info service