1. LeoRex's Avatar
    Ever since Google Now hit my phones, I've had a kind of love/hate relationship with it... I LOVE the features... it's a killer app... especially when you use it's location-aware features... but those same features bring with it a voracious appetite for battery draining wakelocks. Google Now hits the location service hard, polling ALL the time, using network location as a real-time location solution like GPS. IMHO, network location should be more periodic... if I wanted my exact position, I'd use GPS. But without location services running, you lose a lot of the extra cool stuff in GN. I ran around in circles with automation apps, locale plugins, etc, all in an attempt to only allow network location polls when I change states (like leave a WiFi hotspot) or only for a short time every 15 minutes or so... and I ran smack dab into a security 'feature' Google put in, where it requires consent when network location services are enabled. This makes automating it impossible since you have to interact with the consent every time GN kicks on.... what a pain.

    Then I discovered Xposed. I downloaded the Xposed stuff onto my S3, thinking I could use some of its tweaks to help fancy things up a bit... I looked the list of available modules and as I looked, one jumped out at me and slapped me in the face "Disable Location Services Consent"

    !!!!!!!!!!!!! That's the stuff right there

    Now, you still have to deal with turning things on and off.... the way I do it is that I have Llama handle all the work in terms of setting up the events (when to turn GLS on/off, when to poll, etc.). Then Llama calls Secure Settings via its locale plugin feature to toggle location services. And with the Xposed stuff, it won't prompt me for consent when it fires. It's a rather involved little tangle of apps that does involve a rooted phone (my S3 is rooted, unlocked and running the PA 3.99 ROM), but it's worth it.

    Results are fairly striking... when GLS enabled and left be, my phone was woken up constantly by network location processes, leading to a sleeping battery drain rate of 3 to 4% andhour.... with Google Search (Now) and NLP (network location) being the biggest offenders. With my automation, I've brought that resting battery drain down into the mid/high 1's, m more than doubling the battery charge life during sleep and I STILL get to use the location aware features on Google Now.

    I'll spare you the tedium of actually spelling out the events I use in Llama... if you would like to know, pop me an message and I'll go into more detail.
    12-09-2013 11:12 PM
  2. Golfdriver97's Avatar
    Interesting way to go about it. Not saying it's wrong, but interesting.
    Thanks for sharing.

    For anyone who reads this: Xposed Framework is an app that requires root access, and possibly an unlocked bootloader. It need root access because it modifies the ROM.
    12-09-2013 11:56 PM
  3. mrsmumbles's Avatar
    I just use the battery saving setting.

    Sent from my Nexus 5 using Tapatalk 2
    12-10-2013 12:03 AM
  4. LeoRex's Avatar
    I just use the battery saving setting.

    Sent from my Nexus 5 using Tapatalk 2
    4.4? Near as I can tell, that only disables the GPS.... I tried that and the nlp services still tool too many liberties with wakelocks.
    12-10-2013 02:17 AM
  5. mrsmumbles's Avatar
    4.4? Near as I can tell, that only disables the GPS.... I tried that and the nlp services still tool too many liberties with wakelocks.
    It isn't happening here. Actually the only time I've noticed poor battery performance is during very long downloads.

    Sent from my LG870 via Tapatalk 2
    12-10-2013 04:02 AM
  6. LeoRex's Avatar
    Well.... up guess it's a matter of perception... :-) I'm a bit obsessive when it comes to tech, so I constantly fiddle, take apart, fiddle some more..

    Kind of like the dude who would lay down in the trunk of his car while his wife drive around so he could find out what is making the squeaking noise.

    When the phone is idle, I want 0% battery usage, which is an unattainable goal, but that doesn't stop me from trying.
    mrsmumbles likes this.
    12-10-2013 07:54 AM
  7. Rule9's Avatar
    I can sympathize, Google locations services is by far the biggest CPU wakelock culprit on my phone when I allow it to do anything location based. Personally I decided not to fight for ways to keep location services as a regular part of my smartphone use. I lose the benefits of some auto-updating information like weather etc, but the wakelocks are a deal breaker for me. I settled for just turning them on when my phone is docked in my car.
    12-13-2013 02:35 PM
  8. LeoRex's Avatar
    I settled for just turning them on when my phone is docked in my car.
    Heh... been there. But the rather complicated method I mentioned is working well... my phone is actually going into sleep mode and starting there for more than 30 seconds.:-)
    12-14-2013 04:12 PM
  9. someguy01234's Avatar
    I use Battery saving mode only, it doesn't eats up battery, only need to enable GPS when I go out. I use a third party launcher without Google Search, just swipe up to get to Google Now, which I don't even use, just the search. With the N5's Google launcher its always listening so that takes up some battery as well, but it is minimal.

    I use Tasker and "Synker Force" which let me set the phone to autosync every one hour, and turned autosync off. I have another Tasker profile to turn on GPS only when I launch Navigation apps, but it needs root, although without root, you can still bring up the location settings menu. I'm getting better at using Tasker to automate stuff and leave things turned off when I don't need them.
    12-14-2013 10:20 PM
  10. LeoRex's Avatar
    Yeah... that didn't work so well.. Google now started throwing a whole new wakelock related to its inability to access GLS...

    But!

    Xposed has a module called wakelock terminator. Basically you tell it the wakelock, and when it shows up, the middle fakes it out, making the app think the wakelock cleared. I put the two nlp wakelocks in the list and *poof* no more battery drain from Google Now. The wakelocks fire. But inky for a fraction of a second.

    More testing needed
    12-19-2013 06:36 PM

Similar Threads

  1. Replies: 3
    Last Post: 03-01-2016, 05:40 AM
  2. Can't update to 4.3?
    By KHFreak741 in forum Android 4.1 / 4.2 / 4.3 Jelly Bean
    Replies: 10
    Last Post: 02-23-2014, 05:40 PM
  3. Is the Power Button SUPPOSED to rattle??
    By kyoo in forum Google Nexus 5
    Replies: 55
    Last Post: 02-19-2014, 08:28 AM
  4. need new phone, may switch to android
    By brick58 in forum General Help and How To
    Replies: 8
    Last Post: 12-11-2013, 03:32 PM
  5. Replies: 1
    Last Post: 12-10-2013, 12:44 AM
LINK TO POST COPIED TO CLIPBOARD