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

Search This thread

nathansnyder

Senior Member
Jan 10, 2012
84
11
We expected that all Android phones with kitkat have adb binary by default.
But we were wrong about that. Some phones like MotoX does not have it.

Porting adb into bin folder will require root which is not solution.

Another way is the PC version that can retrieve statistics from pc side adb.

It might be uncomfortable to plug to pc everytime for checking wakelocks, but after google has restricted access for wakelock statistics this could be the only option for non root phones.

Is there a link to the PC version? I'm ok with doing that.
 

Involved

Senior Member
Jan 24, 2011
111
24
Hi guys, I am having very bad battery life caused by some wake lock that I can't figure out how to solve, I left the phone over night after a full charge and lost 70% in 7h... Already uninstalled Facebook messenger but I had the problem even before installing it... Can someone help me? I am using a nexus 5 stock rooted with xposed installed.

Here my screenshots

https://docs.google.com/folder/d/0B6jIL9Bj-oTlSW1CTmRqTXpwYjQ/edit


Inviato dal mio Nexus 5 utilizzando Tapatalk
 
Last edited:

nathansnyder

Senior Member
Jan 10, 2012
84
11
Hi guys, I am having very bad battery life caused by some wake lock that I can't figure out how to solve, I left the phone over night after a full charge and lost 70% in 7h... Already uninstalled Facebook messenger but I had the problem even before installing it... Can someone help me? I am using a nexus 5 stock rooted with xposed installed.

Here my screenshots

https://docs.google.com/folder/d/0B6jIL9Bj-oTlSW1CTmRqTXpwYjQ/edit


Inviato dal mio Nexus 5 utilizzando Tapatalk

You'll have to make that folder public. I don't think anyone can see it.
 

taita87

Senior Member
Aug 7, 2013
84
5
Hi, I'm experiencing a problem with the app...
Every time I open it the time counters are way too low...look at this picture:
uploadfromtaptalk1392142814109.jpg
I never saw them above 5 seconds...and the top bar always set to 0.0
What's the problem?I can't figure it out
 

ahikmat

Senior Member
Aug 5, 2010
224
682
Seoul
Wakelock detector PC Beta version

Google has made it very hard to access to wakelock statistics starting from KitKat (Android 4.4)
Only Rooted phones can read wakelock statistics.

There were many requests from not rooted phone users to see wakelock statistics.
That is why, as an alternative way PC version of Wakelock detector has been developed.
It is on beta stage now, there are still missing few features.

Requirements:
.NET Framework 4
Phone USB drivers must exist, this app gets statistics through "adb"
 

Attachments

  • wld_pc.png
    wld_pc.png
    105.8 KB · Views: 490
  • pc_version2.zip
    4.2 MB · Views: 55
Last edited:

Millenium3

Senior Member
May 22, 2012
991
480
Seoul
I'm on a CM11 based ROM but I'm getting FC when opening this app.

I've already tried installing the apk in this thread but no luck.

Here's logcat:



[ 02-23 13:38:28.120 14181:14181 I/ActivityManager ]
Timeline: Activity_launch_request id:com.uzumapps.wakelockdetector time:4241768

[ 02-23 13:38:28.120 13441:21281 I/ActivityManager ]
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.uzumapps.wakelockdetector/.activity.IntroActivity} from pid 14181

[ 02-23 13:38:28.245 26235:26235 V/Zygote ]
Switching descriptor 79 to /dev/null

[ 02-23 13:38:28.245 26235:26235 V/Zygote ]
Switching descriptor 10 to /dev/null

[ 02-23 13:38:28.245 13441:13452 I/ActivityManager ]
Start proc com.uzumapps.wakelockdetector for activity com.uzumapps.wakelockdetector/.activity.IntroActivity: pid=26235 uid=10182 gids={50182, 3002, 3003}

[ 02-23 13:38:28.320 26235:26235 D/dalvikvm ]
DexOpt: couldn't find field Landroid/app/ActivityThread;.mActiveResources

[ 02-23 13:38:28.320 26235:26235 W/dalvikvm ]
VFY: unable to resolve instance field 1

[ 02-23 13:38:28.320 26235:26235 D/dalvikvm ]
VFY: replacing opcode 0x54 at 0x0006

[ 02-23 13:38:28.320 26235:26235 D/dalvikvm ]
DexOpt: couldn't find field Landroid/app/ActivityThread;.mPackages

[ 02-23 13:38:28.320 26235:26235 W/dalvikvm ]
VFY: unable to resolve instance field 4

[ 02-23 13:38:28.320 26235:26235 D/dalvikvm ]
VFY: replacing opcode 0x54 at 0x0000

[ 02-23 13:38:28.510 26235:26235 D/AndroidRuntime ]
Shutting down VM

[ 02-23 13:38:28.510 26235:26235 W/dalvikvm ]
threadid=1: thread exiting with uncaught exception (group=0x41872c80)

[ 02-23 13:38:28.530 26235:26235 E/AndroidRuntime ]
FATAL EXCEPTION: main
Process: com.uzumapps.wakelockdetector, PID: 26235
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.uzumapps.wakelockdetector/com.uzumapps.wakelockdetector.activity.IntroActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2227)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2277)
at android.app.ActivityThread.access$800(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5088)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:126)
at dalvik.system.NativeStart.main(Native Method)

Caused by: java.lang.NullPointerException
at com.uzumapps.wakelockdetector.activity.BaseActivity.onCreate(Unknown Source)
at com.uzumapps.wakelockdetector.activity.IntroActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5319)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2181)
... 12 more

[ 02-23 13:38:28.670 13441:14208 W/ActivityManager ]
Force finishing activity com.uzumapps.wakelockdetector/.activity.IntroActivity

[ 02-23 13:38:28.675 13441:21280 W/InputMethodManagerService ]
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42a49800 attribute=null, token = android.os.BinderProxy@428be210

[ 02-23 13:38:28.970 13441:14208 I/WindowManager ]
Screenshot max retries 4 of Token{42a07fd0 ActivityRecord{42393f70 u0 com.uzumapps.wakelockdetector/.activity.IntroActivity t30 f}} appWin=Window{429b5cd0 u0 Starting com.uzumapps.wakelockdetector} drawState=4

[ 02-23 13:38:28.970 13441:14208 W/WindowManager ]
Screenshot failure taking screenshot for (720x1280) to layer 21010

[ 02-23 13:38:29.475 13441:13476 W/ActivityManager ]
Activity pause timeout for ActivityRecord{42393f70 u0 com.uzumapps.wakelockdetector/.activity.IntroActivity t30 f}

[ 02-23 13:38:29.500 14181:14181 I/ActivityManager ]
Timeline: Activity_idle id: android.os.BinderProxy@42007970 time:4243148

[ 02-23 13:38:30.780 26235:26235 I/Process ]
Sending signal. PID: 26235 SIG: 9

[ 02-23 13:38:30.790 13441:13966 W/InputMethodManagerService ]
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42a88f40 attribute=null, token = android.os.BinderProxy@428be210

[ 02-23 13:38:30.795 13441:14252 I/ActivityManager ]
Process com.uzumapps.wakelockdetector (pid 26235) has died.

 

Attachments

  • Wake.txt
    4.6 KB · Views: 7

wyndcryst25

Senior Member
Nov 6, 2012
119
68
Kalibo
Using it now on latest Resurrection Remix and working nicely! Thank you for this wonderful app Sir! :thumbup:

Sent from my GT-N7100 using Xparent BlueTapatalk 2
 

duwerk

Senior Member
Mar 25, 2013
84
58
Atlanta, GA
I've used this app with great success in tandem with greenify on both my Note 2 and 3 to increase battery life. Right now, I am having an issue where my phone vibrates seemingly at random with no other notification. Is there a way for me to use WLD to identify the offending app or process?

If not, could anyone suggest an alternative method to solve this problem? Thanks
 

sordna

Senior Member
Dec 12, 2012
1,262
647
Try App Ops X and list the apps that use the vibrate feature. It will tell you how long ago each app vibrated the phone.
 

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