• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Battery Life Test - Android OS

Stigy

Some say...
Nov 5, 2009
4,100
3,023
A developer over at XDA wants to try to figure this battery issue and high Android OS usage out so he asked me to make a post regarding a test he would like us to perform. Please follow the instructions below to help out -- the first part everyone can participate in and the second part requires root, but even if you are not rooted please help out.

TEST INSTRUCTIONS
  1. Reboot phone and charge to 100% or clear battery stats in recovery / bootloader.

    The user needs to clear their battery stats before they start the test. Either clear it in bootloader or charge to full, then unplug. People are starting at 78%, and AndroidOS is factoring in their other runtimes.
  2. Turn on Wifi (make sure "Always On" is set).
  3. Let the phone run idle with screen off (turn off background data if possible) for as long as you can. Even go watch a movie and leave your phone alone.
  4. If you get an urgent text or call that needs answering, try to let the phone go back to sleep for at least another hour or so.
  5. After this time has elapsed, please grab a screenshot of your Android OS usage (after clicked, showing Keep Awake time). Also note how much battery percentage you lost in this time.

ROOT INSTRUCTIONS
If you are rooted, please perform the following two steps after finishing the steps above:
  1. Load adb shell
  2. Run the following two commands as su:
    cat /proc/kmsg > kmsglog.txt
    cat /proc/interrupts > interlog.txt
    cat /proc/net/netstat > netlog.txt
  3. Grab these two log files and paste them into pastebin.com and then PM myself so I can forward them.

Thank you for your help!

Edit: If you are rooted, you can run the commands above from a terminal emulator but just type "cd sdcard" first since the / directory is not writeable. The three text files will then be in your SD card for emailing or pastebin'ing.
 
OK. I'm trying it out. I guess he's trying to test the wifi suspend wakelock issue?

Trying to pinpoint if the issue is related to Wifi or cell signal I believe.

When on WiFi testing this morning, this was my numbers.


Left the phone on WiFi for an hour, always on and syncs off.

Went from 99% - 96% in that one hour. Also Facebook notifications wouldn't turn off so I was still getting those.

Battery Graph: imgur: the simple image sharer
Android OS Graph: imgur: the simple image sharer
 
Upvote 0
Upvote 0
I left mine off the charger the first night I owned it to see if I would have some of the same issues I saw some users reporting (high battery drain/awake times while screen was off).

Here's what I got:

Screenshot_2011-12-17-11-05-08.png


Almost 10 hours and dropped 10% steadily across the time. All while WiFi was on and I have a couple services that poll mail and weather every hour or so.

The phone seems to do great while idle. But when I'm using it, it tanks the battery fast from what I've seen. I keep brightness at auto and disable WiFi/BT/GPS when I'm not using them.
5687898108664447937
 
Upvote 0
The phone seems to do great while idle. But when I'm using it, it tanks the battery fast from what I've seen. I keep brightness at auto and disable WiFi/BT/GPS when I'm not using them.
Do you happen to know what your AndroidOS awaketime is? The battery tanking may be to other factors, but I dont think its the AndroidOS (as long as you're on WiFi).

If you need other help, please post and let us know.
 
Upvote 0
Do you happen to know what your AndroidOS awaketime is? As long as the data connection is suspended, your AndroidOS awake time should be decreased substantially. The battery tanking may be to other factors, but I dont think its the AndroidOS (as long as you're on WiFi).

If you need other help, please post and let us know.

No, never thought to check the OS Awake time. I'll check it after work tomorrow and post back. It actually seems to have decent battery life while at home on WiFi. It's when I'm using it at work that the battery seems to dive a lot harder. I work in the center of a big building where there's low signal too though, so I'm wondering if that's what's eating it the most (holding onto a weak signal/constantly polling for data when it can't reach out to update something).
 
Upvote 0
No, never thought to check the OS Awake time. I'll check it after work tomorrow and post back. It actually seems to have decent battery life while at home on WiFi. It's when I'm using it at work that the battery seems to dive a lot harder. I work in the center of a big building where there's low signal too though, so I'm wondering if that's what's eating it the most (holding onto a weak signal/constantly polling for data when it can't reach out to update something).

You can discuss with Stigy, but its not actually a 'signal strength' thing per-se. WiFi is suspending the mobile data 'driver' that is going rouge.

Basically, from a high overview, even with ZERO data being sent, while connected to EVDO/LTE, the waketime will still be quite high.

If other lurkers wouldn't mind posting results from Stigy's first post, that would be greatly helpful. Any questions, please PM Stigy.
-----
 
Upvote 0
A developer over at XDA wants to try to figure this battery issue and high Android OS usage out so he asked me to make a post regarding a test he would like us to perform. Please follow the instructions below to help out -- the first part everyone can participate in and the second part requires root, but even if you are not rooted please help out.

Just set it up to run overnight, which should be good for uninterrupted cpu sleep. LightFlow is running, as is GMail. Might run again tomorrow night with either or both of these force closed. Not rooted, unfortunately.

FWIW, I'm consistently seeing relatively high KeepAwake numbers.
 
Upvote 0
Just set it up to run overnight, which should be good for uninterrupted cpu sleep. LightFlow is running, as is GMail. Might run again tomorrow night with either or both of these force closed. Not rooted, unfortunately.

FWIW, I'm consistently seeing relatively high KeepAwake numbers.

Awesome - thanks. Would love to see your numbers and graphs in the morning.

Thanks to all participating in this test!
 
Upvote 0
STIGY TEST RESULT

[cross posted here to keep the results in one thread]

Here are the results from last night's run:
- Setup as specified by Stigy
- GMail and LightFlow were running
- Test run 8:15:00 of basically nothing but what should have been sleep time
- Battery state: At at start of test 71%, at end of test 48%

ICSBattery_12-21-2011.png


It seems clear that something is causing Keep Awake, but its not clear what that something is. Hopefully Stigy's crew will nail it.

I can run this again with selected apps closed if that helps.
 
Upvote 0
Just got a PM from keatre over at XDA -- quoting below.

The user needs to clear their battery stats before they start the test. Either clear it in bootloader or charge to full, then unplug.

People are starting at 78%, and AndroidOS is factoring in their other runtimes.

At this point, it's safe to assume that WiFi is putting a stopgate out on whatever is causing the issue. It's crazy at work right now, so I'll check out the AF in a bit.

Please try and let the guys over there know that they need to reset their battery stats - thats their issue. WiFi is fixing the AndroidOS 'bug' though. I have a custom kernel currently running a pre-alpha build to test other parameters.

--------------------------------------------------------------------------

So it looks like something, which we don't know what, is keeping the Android OS awake.

How does this test determine what it is?

The people without root are just confirming Android OS doesn't stay awake with WiFi on. The people with root who can send in logs will show him what is actually keeping Android OS awake.
 
Upvote 0
Just got a PM from keatre over at XDA -- quoting below.



--------------------------------------------------------------------------



The people without root are just confirming Android OS doesn't stay awake with WiFi on. The people with root who can send in logs will show him what is actually keeping Android OS awake.

So Stigy, does this mean we should keep WiFi on at all times, even when it isn't connected? I have been so used to keeping it off when not in use that it has just become second nature. What I'm asking is, will the WiFi stopgap work if WiFi isn't connected and simply on?
 
  • Like
Reactions: jkc120
Upvote 0
So Stigy, does this mean we should keep WiFi on at all times, even when it isn't connected? I have been so used to keeping it off when not in use that it has just become second nature. What I'm asking is, will the WiFi stopgap work if WiFi isn't connected and simply on?

I don't have detailed analysis to back this up, just my anecdotal observation from last night. I had wifi enabled but was well out of range of the WAP in my folks' house, and my battery dropped about 7% over night. I'm curious if keeping wifi on avoids this, too, though. Great question.
 
  • Like
Reactions: ska.t73
Upvote 0
Just got a PM from keatre over at XDA -- quoting below.



--------------------------------------------------------------------------



The people without root are just confirming Android OS doesn't stay awake with WiFi on. The people with root who can send in logs will show him what is actually keeping Android OS awake.

Thanks. I have not yet rooted. I reported my 29% drainage last night in the other thread, I don't think I mentioned that WiFi was on the entire time.

So, it wifi is suppose to help with the OS drainage, then I would think I would not have loss so much last night while I slept.

Thanks for posting here. I usually always check both forums but am sticking here for the time being.
 
Upvote 0
Just thinking out loud here but wouldn't it wake up every time the phone syncs? Maybe someone having high usage should shut off syncing and see what happens. Even things like the weather apps almost all of us use constantly sync to keep the weather up to date.

What we really need to see is the usage from a GN with no apps, email or anything that will sync.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones