[APP][2.2+] [v.1.5+] Wakelock Detector- What keeps your phone awake when it sleeps?

Search This thread

bumper_VFX

New member
May 12, 2014
3
0
Love the S5, but the battery life not so much...

Hey,

Thanks for providing such useful tools. I have been able to access my phone via your PC tool.

The problem is that my new Galaxy S5 has terrible battery life. After 11 hours of minor to moderate use I am at 27%. Verizon has been unhelpful in suggesting that it's my having WI-FI activated that is the problem. Seems unlikely, in my opinion.

Again, I've been successful in accessing my phone with Wavelock Detector PC. Unfortunately however, I do not know how to interpret the results.

I've made a screenshot sheet with just the top processes. Please let me know if you need to see the rest. Any suggestions/translation would be appreciated.

I appears I can't post images until I've posted 10 times. (sigh, nothing is easy) So if you're inclined to help, please let me know and I can PM you the URL for my screenshot sheet.

Thank you very much!
 

kimcuongden1712

Senior Member
Apr 1, 2011
58
13
Great App! The overview is perfect - thank you so much! keep it easy as it is!
Really good! Good job
 

entinggi

Member
Dec 9, 2012
17
2
KCH-JB
Hi guys, just started using WLD and I was wondering how come I dont have any deep sleep?it is an app issue or kernel issue?





Update

Solved the issue just by rebooting the phone
 
Last edited:

Se7enLC

Senior Member
Dec 29, 2009
104
23
Any chance that some simple Linux scripts could be released that would allow for similar functionality to the PC/Windows version? Unfortunately my Moto X doesn't have adb on the device. It wouldn't have to have a fancy graphical display, just a text dump of the info would be great.

It's not great, but it's a start. I'm not sure if this is even the right information but this should show CPU time split into user, kernel, and foreground.

Code:
adb shell dumpsys | perl -n000e 'while (/Proc ([^:]+):\r\n\s+CPU: ([^\r]+)/g) { print "$1 : $2\n"; }'

EDIT: This is actually not particularly helpful, now that I've done some more research. You may be better off just running the adb shell dumpsys > filename.txt and reading through it manually.

You'll see sections that look like this:
Code:
  u0a171:
    Mobile network: 2.51MB received, 396.19KB sent
    Wi-Fi network: 143.01KB received, 90.22KB sent
    Wake lock StravaActivityService: 52m 8s 530ms partial (2 times) realtime
    Wake lock LocationManagerService: 8s 653ms partial (3657 times) realtime
    Wake lock NlpWakeLock: 1s 598ms partial (562 times) realtime
    TOTAL wake: 52m 18s 781ms partial realtime
    Sensor GPS: 58m 54s 589ms realtime (4 times)
    Foreground activities: 6m 37s 265ms realtime (37 times)
    Proc *wakelock*:
      CPU: 4m 48s 200ms usr + 2m 10s 540ms krn ; 0ms fg
    Proc com.strava:
      CPU: 1m 34s 330ms usr + 25s 360ms krn ; 1m 21s 40ms fg
      2 proc starts
    Apk com.strava:
      Service com.strava.service.StravaActivityService:
        Created for: 3h 7m 29s 177ms uptime
        Starts: 1, launches: 2
      Service com.strava.service.StravaUploadService:
        Created for: 19s 202ms uptime
        Starts: 2, launches: 2

The lines starting with 'Wake Lock" show what types of locks and how many.
 
Last edited:

sunthief

New member
May 24, 2014
1
0
Hey, guys,
just a short question: The deep sleep on my non-rooted phone shows 53% awake. On the PC with the PC version it says something around 30%. So I guess the Wakelock App on the phone without the work adround is totally useless? Or what do I make of the 53%?

By the way, any idea how to get the work around to work on an HTC One? The listen to TCP 5555 port command doesn't do anything, I'm afraid
 

ahikmat

Senior Member
Aug 5, 2010
224
682
Seoul
Hi,
Thanks for the windows version, really awesome to check wakelocks without root. I've been having a problem with my Note Pro 12.2. Android system keeps the tab awake 95% of the time. I tried wiping but that only helped for a few days and the problem returned. Last night WLD showed that com.sec.android.app.bluetoothtest is keeping awake. Any ideas how to fix this?
Bluetooth is switched off and never used. I've tried reloading the firmware via Kies without wiping but that not helped.

Thanks.

Sent from my SM-P905 using XDA Premium 4 mobile app

I was not able to find any info about "com.sec.android.app.bluetoothtest" wakelock
what is your phone model and firmware version?
is it still there after reboot?
 

ahikmat

Senior Member
Aug 5, 2010
224
682
Seoul
Hey,

Thanks for providing such useful tools. I have been able to access my phone via your PC tool.

The problem is that my new Galaxy S5 has terrible battery life. After 11 hours of minor to moderate use I am at 27%. Verizon has been unhelpful in suggesting that it's my having WI-FI activated that is the problem. Seems unlikely, in my opinion.

Again, I've been successful in accessing my phone with Wavelock Detector PC. Unfortunately however, I do not know how to interpret the results.

I've made a screenshot sheet with just the top processes. Please let me know if you need to see the rest. Any suggestions/translation would be appreciated.

I appears I can't post images until I've posted 10 times. (sigh, nothing is easy) So if you're inclined to help, please let me know and I can PM you the URL for my screenshot sheet.

Thank you very much!

Sorry for late reply,
yeah PM me please
 

ahikmat

Senior Member
Aug 5, 2010
224
682
Seoul
Hey, guys,
just a short question: The deep sleep on my non-rooted phone shows 53% awake. On the PC with the PC version it says something around 30%. So I guess the Wakelock App on the phone without the work adround is totally useless? Or what do I make of the 53%?

By the way, any idea how to get the work around to work on an HTC One? The listen to TCP 5555 port command doesn't do anything, I'm afraid

The PC version is correct, because it considers the Screen On time.

Your phone is not rooted KitKat thats why it shows 53%(including screen on time)
in other words, phone version does not have access to read screen on time..

and I did not test WLD with HTC One, I am not sure if it has adb built in...

sorry to say but in this case you have to use PC version to find the cause of wakelock buggers
 
Last edited:

skyrocketeer

Senior Member
Feb 13, 2012
672
143
Google Pixel 8
I was not able to find any info about "com.sec.android.app.bluetoothtest" wakelock
what is your phone model and firmware version?
is it still there after reboot?

My pc version also hows this for my ATT galaxy s5
 

Attachments

  • Capture.JPG
    Capture.JPG
    75 KB · Views: 470

revmra

Senior Member
Jun 30, 2012
104
15
It's not great, but it's a start. I'm not sure if this is even the right information but this should show CPU time split into user, kernel, and foreground.

Code:
adb shell dumpsys | perl -n000e 'while (/Proc ([^:]+):\r\n\s+CPU: ([^\r]+)/g) { print "$1 : $2\n"; }'

EDIT: This is actually not particularly helpful, now that I've done some more research. You may be better off just running the adb shell dumpsys > filename.txt and reading through it manually.

You'll see sections that look like this:
Code:
  u0a171:
    Mobile network: 2.51MB received, 396.19KB sent
    Wi-Fi network: 143.01KB received, 90.22KB sent
    Wake lock StravaActivityService: 52m 8s 530ms partial (2 times) realtime
    Wake lock LocationManagerService: 8s 653ms partial (3657 times) realtime
    Wake lock NlpWakeLock: 1s 598ms partial (562 times) realtime
    TOTAL wake: 52m 18s 781ms partial realtime
    Sensor GPS: 58m 54s 589ms realtime (4 times)
    Foreground activities: 6m 37s 265ms realtime (37 times)
    Proc *wakelock*:
      CPU: 4m 48s 200ms usr + 2m 10s 540ms krn ; 0ms fg
    Proc com.strava:
      CPU: 1m 34s 330ms usr + 25s 360ms krn ; 1m 21s 40ms fg
      2 proc starts
    Apk com.strava:
      Service com.strava.service.StravaActivityService:
        Created for: 3h 7m 29s 177ms uptime
        Starts: 1, launches: 2
      Service com.strava.service.StravaUploadService:
        Created for: 19s 202ms uptime
        Starts: 2, launches: 2

The lines starting with 'Wake Lock" show what types of locks and how many.

Thanks. I'm going to have to dig through this information. As it is, the dump gave me 358 lines of wakelocks, most of which were trivial (a few ms here and there). If I get a big one, at last I can look for big times. It'll take a bit of hunting though. Hmmm. I wonder how hard it would be to write a script to parse all of that. Hmmm.
 

revmra

Senior Member
Jun 30, 2012
104
15
Thanks. I'm going to have to dig through this information. As it is, the dump gave me 358 lines of wakelocks, most of which were trivial (a few ms here and there). If I get a big one, at last I can look for big times. It'll take a bit of hunting though. Hmmm. I wonder how hard it would be to write a script to parse all of that. Hmmm.

Actually, it was not as hard as I thought. All I had to search for was "All partial wake locks:" and it gives me a list in order starting with the longest wake lock. The only problem is that it only gives it since it was last unplugged, not since the last reboot. Therefore, plugging it in and getting this data will end up resetting it once you unplug the device. Not a huge deal, but something to be aware of.
 

godutch

Senior Member
Jun 29, 2009
2,558
374
www.burgerforumeu.nl
Today on my HTC (rooted) I had a lot of awake time (>12 hrs) but the wakelocks only added up to about 3-4 hours, I enabled advanced option but still couldn't find any wakelock to explain why my phone was awake for 91% of the time...
 

racingmatt1

Senior Member
Apr 24, 2011
616
27
I'm trying to get the pc version of wakelock detector to work with my unrooted HTC one but ever time I open the program on my Windows 7 pc it immediately says it stopped working. I did all the required steps prior to open pc version of wakelock detector and accepted the connection. Can anyone please help me. I even tried downloading the file again but no dice.

Sent from my HTCONE using Tapatalk
 

racingmatt1

Senior Member
Apr 24, 2011
616
27
I'm trying to get the pc version of wakelock detector to work with my unrooted HTC one but ever time I open the program on my Windows 7 pc it immediately says it stopped working. I did all the required steps prior to open pc version of wakelock detector and accepted the connection. Can anyone please help me. I even tried downloading the file again but no dice.

Sent from my HTCONE using Tapatalk
anyone?
 

BlackArtsInc

Senior Member
Apr 26, 2012
773
77
Athens
Is it normal to see dialer up to the top of the list and proximity sensor in particular keeping the phone awake for the same amount of time as the dialer app?
For example I get Wakelock Detector to show 28min of Dialer app and when I click on it I see proximity sensor keeping the phone awake for 28 min.
N.

Not sent from my Xperia.
 

koko115

Senior Member
Jul 1, 2012
1,830
333
Where i find Wakeup triggers in this app. Alarm Manager in 1H 300x wake up, and i dont know whats apps do this...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 354
    Wakelock Detector 1.5.*

    Ever wondered why your smartphone screen doesn’t turn off automatically when it should have, the screen wakes up all of a sudden or you find your phone battery drained even when you exited apps and turned off the screen? This might be due to wakelock holding apps.”Wakelock Detector” helps you to detect battery consuming applications in your Android device by checking wakelock usage history. Now you can find out which applications drain your battery in a simple way by using this app!

    "Wakelock detector" is our goal to simplify detecting wakelock issues for an ordinary user.
    As you know, wakelocks have enormous impact on battery life.


    Available in GoogelPlay: Download from GooglePlay


    Please feel free to comment and give us your feedback :)
    Thank you!


    Presentation about "Wakelock Detector" (recommended) Wakelock PRESENTATION

    User Guide (Manual) for Wakelock Detector : http://www.slideshare.net/ahikmat1/manual-for-wakelock-detector



    Changelog:
    https://docs.google.com/document/d/1eatTvA_mSaN2Nljq7i_Qy-5gfDtkOi5QiYY5QHUga84/edit?usp=sharing


    [PC version]
    For KitKat non rooted users PC version has been developed.
    PC version retrieves stats via adb.


    [Reviews]
    XDA Review
    XDA Video Review
    LifeHacker
    HowToGeek
    DotTech
    Temefy
    Facebook page
    32
    testing for kitkat

    Wakelock detector 1.5.7, supports KitKat (rooted, also for non-rooted phones with few steps)

    New permission added:

    [INTERNET] - WLD does not consume any traffic, this permission is needed for adb self connection purpose
    ([BOOT] - this permission will be added for calculating screen on time for non-rooted kitkat phones)

    Starting from kitkat we retrieve wakelock stats from "dumpsys", that is why your phone either needs to be ROOTED or you need to have adb access to your phone itself.

    KitKat owners with ROOTED phones

    Run WLD, allow ROOT at first run. It is preferred to check "remember it" option

    KitKat owners with NON-ROOTED phones

    This option takes few steps to accomplish, but this is the only way to see wakelock stats for non-rooted kitkat phones.

    In android phones, by default adbd listens to USB port, we need to change it to listen tcpip for establishing adb connection.
    for that we need to run "adb tcpip 5555" from PC. For Windows OS, usb drivers need to be installed. http://developer.android.com/sdk/win-usb.html

    Install one of these light adb on your PC:
    Windows: http://xdaforums.com/showthread.php?p=42407269
    Mac/Linux: https://code.google.com/p/adb-fastboot-install/

    Enable "developer option" on your phone (it is in settings window , if you don't see it click "Build version" 7 times on "About" section)
    Run "adb tcpip 5555" from command line.
    Then install "Terminal emulator" on your phone and run "adb kill-server" , "adb devices" and confirm self-connection.

    You can follow these slides for details: https://docs.google.com/presentation/d/1r3VlhZIZVSufZlAeICJet6QBtyAF7z06_ysl1kUKME4/edit?usp=sharing

    We are working to make single-click PC app.

    If you could have better idea to optimize these steps, share it with us! Thank you!

    [updated apk]
    Big thanks to Sordna for helping to improve WLD and RootTools performance!
    29
    After the recent Google's update for KitKat 4.4, I am discouraged and disappointed with Google's actions against developers.

    I think "wakelock" info must be available for all Android users, because it is their property. They should be able to know what is happening to their phone while they are not using it.

    Until KitKat the apps like BBS, Gsam and WLD gave users all these detail statistics from Google's hidden battery statistics repositories.
    But starting from KitKat, they completely restricted it. Only the ROOTed users might be able to see the wakelock statistics for now. They might even disable it also in the future.

    I wrote email to the person who did this. But no effect.
    ...

    I have some idea about organizing a public Online(or maybe offline) demonstration against the Google's restricting developers and users from their freedom of knowing the detail battery statistics.

    Maybe it sounds dumb, but we could join all together and do something against Google's change.
    There are millions of users who resolved wakelock issues and doubled their battery life, who saved their phone from resetting or doing all costly things.

    We can use famous social networks like a facebook page, or Google Plus page then
    post our demands until we reach Google.

    What do you think ? How much are you eager to support this idea.
    17
    I am back and working on this lollipop issue

    Thank you everyone for supporting WLD,
    Sorry for being off for sometime.
    it is great to know that many of you using it in Lollipop with your own fix.(SeLinux)

    I am getting lollipop now,
    hopefully i will fix this very soon.
    12
    I got a reply from "Dianne Hackborn" who commited the change

    Hi Uzum,

    This was never available to third party applications anyway -- the only APIs to access the information protected by it are all hidden, and change across platform versions. Any applications using these private APIs are going to break sooner or later, and we would rather it was sooner.



    So I send her reply again, if it does not work, then we will try to catch public attention :)

    Dear Dianne Hackborn,

    Thanks for your reply.

    We thought over about your reply,
    However,
    Could you consider discussing about reverting BATTERY_STATS permission's protection level from "android:protectionLevel="signature|system" to "android:protectionLevel="dangerous"

    We could not find any solution for this issue, Our app can not access wakelock statistics without ROOT, and we don't want to force our users to ROOT their devices.

    As users are aware that third-party app is going to access battery statistics,in our opinion this permission can not hurt the user . It just only gives access to power consumption information. We do not see any danger in this.

    We are aware that this battery statistics API was hidden, we used reflection to access this info as that was the only choice.

    Standard android battery app is good enough, however many users with "no-sleep" issues could not solve their battery draining issues with standard app. Because android's standard battery app does not give detail information.

    Fortunately, they found "BBS" or "Wakelock detector" or "GSam battery monitor" and easily found out which rogue apps kept their phone awake from deep-sleep that were causing drastic battery drain.

    They need this "wake lock" statistics. That is why there was a big demand for such apps.

    In other words, Google is taking away the right from users to see their detail battery statistics.

    For understanding how much serious problem is "no-sleep" issue, please take a look below links:
    https://www.google.com/search?q=android+no+sleep+issue&oq=android+no+sleep+issue
    http://software.intel.com/en-us/articles/wakelocks-detect-no-sleep-issues-in-android-applications

    According to research paper, almost 50% of apps had this "no-sleep" bugs in 2012.
    Hopefully, that number dropped by 2013, but still there are apps which mis-use "wake lock" feature and cause drastic battery drain.

    Please check out the user feedbacks in "Wakelock detector" for more details.

    Since 2013.03.01 We were happy to serve Android users by helping them to resolve their wakelock issues.
    They doubled their battery life without going to A/S or Resetting their phones.
    Right now, We need your help to help our users which are your users in turn.

    Please Help!

    Regards UzumApps