yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] githyanki:
Please follow the guidelines for making a bbs dump.

6 hours of screen off, with less than 1 minute of screen on time.

You had about a minute and half total covered. Cannot do anything with that.

Also, please don't zip it up, it is small enough that it is unnecessary.
[BetterBatteryStats] fossils-n-dents:
You Sir, purposely or inadvertently have stumbled accross the secret of Android bliss: The less apps running= less background activity= less stress from Google Play Services= less work for Android System to try and make make sense of it all. It's that simple. I salute your efforts.

When you use your device, it leaves doze mode. before returning to doze mode, it will do some maintainence before returning to sleep. That activity will be reflected in battery stats, as opposed to a device that is asleep untouched for a similar length of time.

You had a small 3g issue [timerfd], and a small Wi-fi issue, but they may have been a fluke, and not the norm. Best idle run is done while device is stationary.

Google Play Services alone has roughly 300+ background services running in your device. At least 30 of them are not needed for the actual functioning of the phone. Root is required to disable them. 'PackageMeasurementService' is one of them.

Delete Cache(s) Turn device off, hold power, up, and home button simultaneously, that should put you in Android recovery.

Resetting app preferences, then disabling those very same apps again may provide some relief. Keep Adguard, I totally get it.

I'm at a loss how to get you where you want to be (0. 0% /h) without grasping at straws.

The thread requires an idle dump of 6 hours minimum.

In the BBS app, go to Settings> Advanced> Alarms using API/ Network (Unless they kick in on their own).
[BetterBatteryStats] fossils-n-dents:
'RILJ' in your 'Wakelocks' section of your log is directly connected to the constant activity of the radio module of the phone. Poor connectivity will create problems, so the device will stop the constant search and jump in the conditions of an unstable signal. Possible Fix: Audition Ressurrection Remix Rom for the abilty to switch to 2G. For background synchronization of RSS channels, messengers, weather, mail and 2G is usually enough. *Always make a backup before switching roms.

'qcom_rx_wakelock' In your 'Kernel Wkelock' section: Wi-Fi trying to search for a wifi signal as the signal drops. In Wi-Fi settings, turn off 'Wi-Fi Scanning Always Available', and disabling 'Keep Wi-Fi on During Sleep.' You can also tick the box for 'Aggressive WiFi Handover' in dev options. (Optional) Another option, a static IP may provide some relief also.

I would go out on a limb and say most of your problems wakelocks are Network/ Wi-Fi related. Bluetooth is not helping,

Turn off Bluetooth/ Location when not in use. Hunt down, and limit notification frequency in all apps. High sensor wakeups can be abated with the app ForceDoze (From Play Store). Set the app to 'Kill all sensors while in Doze'.

There is a list of Google Play Services background operations that can be disabled without losing device functionality and gaining some battery life coupled with less wakeups. I totally recommend it to all root users. It can be found here.

https://xdaforums.com/showpost.php?p=73693320&postcount=32709

*Always make a backup before disabling services.

Give it a go, get back to me. Good Luck.:good:
[BetterBatteryStats] timy7:
fossils,, thx for your wonderful app and tips made my phone sleep well...
[BetterBatteryStats] championc:
There are two things which I don't understand

1. With anything to do with Wifi or Mobile Signal, why would the CPU be running (when active) act 960mhz rather than at 300mhz

2. In work today, being a totally different environment, connected to perfect Wifi signal and reasonably good Mobile Signal too, I still am getting Deep Sleep of about 75% with the same amount of Battery Loss and the same percentage of 960mhz CPU

I think I'll try turning off BT and Wifi for an hour and see what happens
[BetterBatteryStats] Mister_Diamond:
You're totally right about everything :good:

The fact is that I have the habit of root on my all other devices, which are very battery wise :) I asked for advices to see if I can improve the things also without root.

However the following is a long BBS log of about 12 hours (of some day ago) where I had 0% battery drain, since I didn't received any notification during that time: https://pastebin.com/USRDY27L

Yeah: I totally have to looking for rooting this device too: the only thing that stop me is that Sony will break the camera (his DRM partition) by rooting.

However I post here because you look very expert and for now I will follow your precious advices :good:
[BetterBatteryStats] championc:
OK, like I thought - there is something running amuck on my phone. Something is definitely active and haemoraging battery.

I turned off both Wifi and BT for the past hour. I powered up the phone for 5 seconds to reset the BBS stats. Deep Sleep for the past hour is at 82% but still, the predominant CPU usage is 960mhz with 6m 18s, while 300mhz has only 16s !!! So I am even more convinced that before that I have a rogue app - but how can I identify it ?
[BetterBatteryStats] fossils-n-dents:
My pleasure. Enjoy your device.

If there is a problem with Wi-Fi network issues, poor cellular reception, or a rogue app trying to utilize either, that will be reflected in cpu stats.

'qcom_rx_wakelock': It's a wakelock that often happens when you are connected to a large secured network like a university or company. The network itself is waking your phone up and keeping it in an active state even when you are not using your phone, hence, cpu fluctuation with an inabilty to fully sleep.

Or, could be DHCP/IP issues from your device with specific routers. Have you tried using a separate Wi-Fi source (Home) to test?

Also, go to settings> apps> Google Play Services - delete data and cache then reboot your phone. See if this helps.

Being that nothing stands out in your log that indicates a bad app, you can run in safe mode, to see if the problem persists, or the process of elimination, starting with an app appearing in your 'Alarms' section, disabling the highest app in alarms, testing without it, and moving to the next app.

In order to preserve DRM, and you can live with 0.0- 0. 03% drain (Which is awesome also), I would hold off on rooting.
[BetterBatteryStats] eddi0:
Hello

Trying to attach logs for review but getting an error, anyone know how to fix? Android failure grabbing is the error.
[BetterBatteryStats] pdross74:
Nexus 5x constant pickup gesture

Hi all,

The fingerprint sensor died on my google Nexus 5X and since then I've had awful battery life.

I got an overnight dump from better battery stats. It's available at the gist https://gist.github.com/anonymous/4c3235575f847509259ea47c8ec14769

However does the line

(com.android.systemui.System UI): Sensor: RPR0521 Proximity Sensor(6), wakeup=true, Time: 0 s Sensor: Pickup Gesture(20), wakeup=true, Time: 7 h 38 m 23 s

indicate that proximity sensor was continually firing a pickup gesture which keeps my phone awake?

If that is the problem, does anyone know how I can disable/replace this sensor?

Thanks in advance for you help.
[BetterBatteryStats] pajz38:
Can someone take a look at my files? Thanks in advance.

drive.google.com/open?id=0B47RYv85rfT6bkd6cHI3dXVrRkE

drive.google.com/open?id=0B47RYv85rfT6RlJpUmJGcGVVTUk

drive.google.com/open?id=0B47RYv85rfT6Q1NCeTQ3SG9BelU
[BetterBatteryStats] fossils-n-dents:
'IpReachabilityMonitor.wlan0': Are you on a school campus or anywhere you have multiple different wireless networks connecting have the same name? Example, you may have a dozen or so different access points so you may be constantly connecting to a different one based on signal as you move about, or connected to a specific Wi-fi which has no Internet. Your Wi-Fi radio is looking for something...frequently.

Possible Fixes: Set the frequency to 5Ghz only, delete all the other known Wi-Fis', manually add wifi connections, turn off Wi-Fi scanning set up a static IP address.

Everything Else: Bluetooth/ Sync/ Location/ GPS is constantly running. Fiitness apps, possible wearables, Google SearchBox (Battery killer), Swiftkey (A known battery hog), MS Outlook, TomTom Sports, NFC, ect...Are all running through Google Play Services (Another battery hog), and together they scan, locate update, analyze, poll, run maintainence, call home, reporting on your app usage and taxing your radios in the background to the point your device will never sleep properly, and your battery will suffer. You have a lot going on in the background, unchecked. It's a little more than a broken sensor(s).

Turn off Bluetooth/ location/ sync/ gps (If possible) when not in use. Go into Google Play Services settings and disable auto updates, you can update apps manually. Disable/ remove any and all apps you do not use immediately. Go to the settings of your individual apps, and lower thier update frequency Greenify your apps. It's time to clean house a little.

Try these things, create another idle run, report back. Good Luck.:good:

Naptime, Greenify (Paid version), or ForceDoze can disable all sensors while sleeping. ADB may get them disabled permenantly. IDK.

Working on it...Stay tuned...;)
[BetterBatteryStats] PackElend:
I added my newest BBS idle dumps.

I haven't touched the phone for 7 hours (custom time stamp is around 9:00 AM). The phone was only connected to mobile network without usage of mobile data. Than I did a dump an connected to the WiFi and haven't touched the phone for at least 2 hours. I received some message during that time. I created another dump after this period.

I hope anything is covered otherwise I have a serious problem with BBS.

7 hours without touching - no Wi-Fi, cellular network without data usage

another >2 hours with Wi-Fi connection
[BetterBatteryStats] manalicream:
Please can someone check the attached. Seems OK with 0.5% drain overnight.

Only thing I don't understand is with moderate usage during the day I'm getting like 4-5% idle drain.
[BetterBatteryStats] PackElend:
not sure if it's a bug of BBS or OI File Manager but I'm not able to set the alternative save to location. Trying it via the share buttons doesn't work either.

I did a logcat by menas of matlog, hope it covers anything. I'm still a noob in terms of logging reports.

In addition it doesn't save the graph or at least I cannot find it
[BetterBatteryStats] vasujahagirdar:
Hello all, below is my BBS dumpfile, I disabled files in Google services by using myandroid tools, plz guide me what else I need to do to get better battery

Thanks
[BetterBatteryStats] Oswald Boelcke:
Not really usable dumps - screen on time MUST be less than one minute in accordance with all rational intructions. Here is a good one for an idle dump.
[BetterBatteryStats] PackElend:
will try gain tonight

---------- Post added at 01:47 PM ---------- Previous post was at 01:46 PM ----------

will try again tonight
[BetterBatteryStats] Oswald Boelcke:
Which version of OI File Manager did you try? At Google Play Store, you find v2.0.5 of 2014-02-14; at F-Droid v2.1.1 (36) dated 2017-07-14.

For me it seemed that OI File Manager didn't get read access granted.
[BetterBatteryStats] PackElend:
I use

.

I can create folders within IO File Manger, will get me the version from F-Droid market and try again

---------- Post added at 02:15 PM ---------- Previous post was at 02:13 PM ----------

it works now

Only one question is remaining. Where is the graph saved?
[BetterBatteryStats] Oswald Boelcke:
Good that it works with the F-Droid version.

Regarding the graph: First, I didn't change the storage location in BBS i.e. my logs etc. are always saved on top of internal memory. And I just saved a graph (actually the first time I did), it's also saved on top of internal memory - by the way as a txt-file (please refer to screenshot).
[BetterBatteryStats] dejanxxxx:
I have LG K8 LTE 350N, I have drivers , install from here BetterBatteryStats_xdaedition_2.2.2.0.apk and when I put command pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS I get error like on picture .What I do ? On picture dont see pm grant but I put this . Here picture .I have Windows 10 Pro. I have Java installed.
[BetterBatteryStats] Oswald Boelcke:
I read you intended to input pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS but the screenshot shows the following input:

pm grant com.asksven betterbatterystats_xdaedition android.permission.BATTERY_STATS

For me, the dot between "asksven" and "better,,," is missing.
[BetterBatteryStats] fossils-n-dents:
It looks as if you have 3g and Wi-Fi connectivity problems (Netlink/ Timerfd) For 3g kernel waklock, try another kernel that lessens 'timerfd' issues, or try our Resurrection Remix Rom as it has a feature to switch to 2g (which will allow messaging, notifications and such during idle). For Wi-Fi (Netlink) you're losing connection, or a weak signal.

qpnp_fg_memaccess wakelock: Some devices such as printers on a network can broadcast packets that can wake your phone up a lot 'qpnp_fg_memaccess' is related to that. If you are on a home network use static IP/ change to 5GHz on your router, but on a corporate network you have no real control but not use it. 'qpnp_fg_memaccess, qpnp_fg_update_temp and qpnp_fg_update_sram' should also lessen as you find your proper ground. Or, simply turn off Wi-Fi when walking about, or signal is low/ fluctuating.

Lastly, I need you to use this guide...

https://xdaforums.com/showpost.php?p=73693320&postcount=32709

Try another idle run afterwards, come back, and let's see what else we have to deal with.

Kernel Wakelocks

wlan_rx_wake (): 2 m 19 s Cnt:(c/wc/ec)670/55/670 0.5%

NETLINK (): 1 m 16 s Cnt:(c/wc/ec)3984/561/0 0.3%

A possible crowded network (Multiple devices on the same 2.4GHz band, maybe a printer?) Possible workaround: Turn off Wi-Fi During Sleep', static IP address, Switch to 5GHz (if possible). Ultimate solution: Purchase seperate router only for your device.

In Better Battery Stats, select Settings> Advanced> 'Alarms using API'. I won't bust your stones this time for lacking the alarm info.

First rule of Fight Club: Less apps= Less Google Play Services shennanigans= Less Android System trying to figure everything out= Less overall battery drain...Period.

Even with light use, you will always have multiple apps that will perform background operations through Google Play Services no matter what the configuration. App update frequency can be lessened, disabling/ removing unecassary/ unused/ trivial apps does instant wonders. Turning off 'Auto Updates' in Google Play Store settings, location/ sync/ GPS when not in use helps. Set Naptime app to turn off sensors during Doze. Greenify my Brother, always Greenify.

At 0. 5% /h drain, that means you are in control of your device, as opposed to the other way around. Well done. Going lower requires research, restraint, understanding, compromise, and and careful app selection.

Using the device corrupts all 'Idle' stats because the device is 'In Motion' for a portion of the 'Idle' run.

'Screen On' Time must be under one minute (No touching the Device during the 6 hour idle run) to paint the most vivid picture.

Try again, let's see what we have.
[BetterBatteryStats] dejanxxxx:
You are right, now I put like in tutorial and again error . Here picture .
[BetterBatteryStats] Oswald Boelcke:
Image can't be loaded.
[BetterBatteryStats] dejanxxxx:
https://imgur.com/a/U5D6S here picture.
[BetterBatteryStats] Oswald Boelcke:
In your picture I don't recognise the command adb -d shell pm grant prior to the rest from post #4. Did you hide it somewhere? Just a question.
[BetterBatteryStats] dejanxxxx:
I dont know why dont see PM GRANT , but i put this in command , and I put only

adb shell , I must put adb -d shell pm grant com.asksvenxxxxxxx ?

Now eject this error .

https://imgur.com/a/F0LfQ
[BetterBatteryStats] Oswald Boelcke:
I think so as -d directs command to the only connected USB device. But actually I suggest you search XDA and/or the web for a guide or tutorial how to use adb.
[BetterBatteryStats] dejanxxxx:
Soory but I know work with ADB, and I have corectly installed ADB.Here. ADB is right .
[BetterBatteryStats] pdross74:
Firstly fossils-n-dents thanks for the detailed analysis.

The dump was taken overnight with the phone being stationary. I checked list of access points, and I only have 1 access point saved that would be in range at this time.

As the phone was stationary, this is why I was surprised that the phone was reporting the pick up gesture due to the proximity sensor. (If I read the log correctly). So my suspicion was that these spurious gesture events were what was making the phone think I need to wake up everything and get them to report back to me, so I can notify the user with any new notifications.

Thanks for these pointers. They all sound like extremely good advice, and I will look into them to increase battery life.
[BetterBatteryStats] vasujahagirdar:
Hi attached herewith the idle dumpfile, plz check & guide
[BetterBatteryStats] githyanki:
You posted the same log with 11 minutes sot, and another that covers 0 seconds. Both are not useful to try and see what the issue is. Please look at the logs next time to make sure your posting the right ones. Just delete all that you have now also.
[BetterBatteryStats] fossils-n-dents:
1. Sir, you cannot use the phone for a minimum of six hours during your idle run.

2. 'Screen On' time in your 'Other Usage' section must be under one minute.

3. Using the device during idle corrupts the statistics, rendering your statistics useless.

4. Try again...Do not use the device until the idle run is complete.

5 Post your log to this thread when done.

6. Below screenshots may help.
[BetterBatteryStats] sunny1689gupta:
what is proxy controller wakelock?

Installed betterbatterystats app.

Switched to partial wakelocks.

The phone controller wakelocks has highest awake time for my phone.

Pls help, what is this and how to counter it?
[BetterBatteryStats] vasujahagirdar:
Yep, but I even didn't touch the device from 12.15am to 6.40am:rolleyes:

Anyways, I try again!!
[BetterBatteryStats] PackElend:
acc. to the stats I've got only 39 sec screen on, hope that one is fine.
[BetterBatteryStats] PackElend:
thx, I finally found it. It is on the on top of internal memory.

Any chance that it will saved in the same folder as the dump files?
[BetterBatteryStats] pajz38:
I followed your instructions and even gave RR a try. these are my results

drive.google.com/open?id=0B47RYv85rfT6TEhrUFQ0VWRjZEU

drive.google.com/open?id=0B47RYv85rfT6MDFac0xlX21fMEE

drive.google.com/open?id=0B47RYv85rfT6ZE1CSjRwZURFZ2s
[BetterBatteryStats] dejanxxxx:
I install last version app from here. My phone not rooted.

I plug/unplug charger, 3,5hours phone been in deep sleep, and now when go and click on Export, bbs_preference. txt is empty, where wrong?
[BetterBatteryStats] shaggyskunk:
Edit: I obviously need more coffee.... Posted in the wrong Thread - lol

Sent from my SM-G955W ??
[BetterBatteryStats] fossils-n-dents:
'msm_ehci_host' in your 'Kernel Wakelocks' section: This points to the modem, despite the lack of network stats in your log...grrrrr. The problem is that you have an app(s) that when it/ they wake the phone up, it takes awhile for it to re-enter sleep mode. If that/ those apps were doing their tasks as background tasks, it wouldn't cause much of a drain, but it/ they are doing things in a higher priority mode...However, the draw is infinitesimal, let it go.

Other than that...Looking Good! Android System/ Google Play Services are handling your apps very nicely with the amount of apps installed and features enabled. 0. 5% /h drain is right in the zone of device harmony. Enjoy your device.

First rule of Android Fight Club...Get your device under control.

Second rule....Get your device under control.

Stunning results! You now know Android is a system of compromise no matter what the advertisements say, but the beauty of Android and the power of root is, you can fix most issues yourself with a little patience, research and luck. Your phone was never broken, just out of tune.

Remember, apply your method(s) to every Android device you purchase, and save yourself the built-in headaches.

*Make a backup of your award winning configuration, and enjoy your device.
[BetterBatteryStats] dejanxxxx:
Can anobody tell me, where I wrong i post #32923

Thanks.
[BetterBatteryStats] PackElend:
Thx for the reply and hint. How do I make sure that network stats are included.

There are options in the phones debugging settings and logcat apps. I don't understand how they are related to BBS dumbs. May you can give some more background information about how logs are created and how the can be read.

In regards to your reference to background tasks. I suspect that they are a problem since they properly cause dramatic drain when the phone is on mobile data.

Managing them app per app is an never-ending nightmere. Any suggesting how to do bulk editing such permissions?

Any other chance of preventing apps from waking up?
[BetterBatteryStats] fossils-n-dents:
In BBS...Settings> Advanced> Network using API.

I believe they are the same stats, except phone debugging logs can be output into the Android Studio via usb bridging. BBS logs to memory card makes it far simpler/ easier to get logs than using Android Studio for many people.

I am still a novice, so I am not familiar with how logs are actually created (That's a good question for [MENTION=1330150]chamonix[/MENTION] (BBS Creator & OP), or [MENTION=7408621]noc.jfcbs[/MENTION] who is far, far ahead in terms of the mechanics of Android than I.

'Reading Logs' that is something I could not explain in great detail here due to legnth and topic, suffice to say when reading your dump file (The easiest log for me), usually the offender(s) is listed at the top of the section, ie Wakelocks, Kernel Wakelocks, Alarm, Network, and Sensor sections. But not always...but usually. Sometimes, you have to sniff it out.

Offending Apps: What I look at is high wake percentage, count, and alarm rate, is the app present in any other sections of the log with different processes.

Example: Facebook app is 10. 0 wakeups /h in Wakelocks, is it also high in Alarms, is it having multiple starts in Processes, is it using more data than other apps in Network, could this be why Wi-Fi/ data related issues are showing in Kernel Wakelocks? It's probably Facebook updating, locating, analyzing unchecked, along with every other app installed. Solution....delete Facebook (My Method). But, no one wants to do that...soooo I advise lowering notification frequency, turning off location, or acquiring FB Lite because it's less intrusive.

Network Issues: Example, 'qpnp_fg_memaccess' has gone bezerk in Kernel Wakelocks on someones' device overnight and shows a stat like:

qpnp_fg_memaccess: 6 h 27 m Cnt:(c/wc/ec)20,000/63/123 17.2% And the device idled for 6 h 30 m.

Well, we know 20,000 anything is bad, so now we must know what 'qpnp_fg_memaccess' is, what causes it, and a possible fix, or a workaround. Once you see it enough you know what to advise.

That knowledge comes from precise research: Books/ Internet/ Personal Experience/ Cataloging/ Taking Excellent Notes/ Good Memory/ Practice, and a little detective work. But not impossible to learn.

I have never written code, nor am I knowledgeable in all things Android/ Linux. I am just a guy who got angry when my 'Perfect' phone went crazy. This thread, [MENTION=1330150]chamonix[/MENTION], [MENTION=7408621]noc.jfcbs[/MENTION] and [MENTION=5488402]Davey126[/MENTION] dedication inspired me to do the research, and in turn, I give back what they have given me...A little bit of help to those that may need it.

I don't know of any way to bulk edit programs' permissions. You should only have to deal with an app once permission-wise. NapTime or ForceDoze app has a whitelist feature that selected apps (And thier proccesses) will not operate while in doze mode. Greenify also, but in the paid version. Last resort...force stop, clear cache, disable the app.