[Q] can tasker be automated to turn off location completely? - Nexus 5 Q&A, Help & Troubleshooting

is it possible to get tasker to automatically turn on GPS when when screen is on, and turn off GPS when the screen is off(or the device is locked)
i tried for about 2 hours yesterday and ended up giving up the most i could get it to do is just toggle the location settings

are you trying to duck NSA surveillance or increase battery life? because getting that working would accomplish neither.

Enddo said:
is it possible to get tasker to automatically turn on GPS when when screen is on, and turn off GPS when the screen is off(or the device is locked)
i tried for about 2 hours yesterday and ended up giving up
Click to expand...
Click to collapse
You will need secure settings plugin to do that, but yes, it should be possible.
I have a profile that enables GPS (active) only when I launch maps, and disables GPS (switch to battery saving mode in 4.4) when I exit maps.
In my case, disabling active GPS (i.e.. keep it in battery saving mode) helped random wakelocks from location reporting etc, Maps (navigation) is the only app that I use that needs active GPS. I don't have any other app that absolutely needs to have GPS coordinates for me.

Please use thread titles.
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit

xBeerdroiDx said:
are you trying to duck NSA surveillance or increase battery life? because getting that working would accomplish neither.
Click to expand...
Click to collapse
im trying to decrease wakelocks at night while sleeping. location + google now keeps my phone up almost all night. i just want to automate this instead of having to do it manually

jj14 said:
You will need secure settings plugin to do that, but yes, it should be possible.
I have a profile that enables GPS (active) only when I launch maps, and disables GPS (switch to battery saving mode in 4.4) when I exit maps.
In my case, disabling active GPS (i.e.. keep it in battery saving mode) helped random wakelocks from location reporting etc, Maps (navigation) is the only app that I use that needs active GPS. I don't have any other app that absolutely needs to have GPS coordinates for me.
Click to expand...
Click to collapse
battery saver mode + google now keeps my phone up all night with location pings. i need to disable location completely

Enddo said:
battery saver mode + google now keeps my phone up all night with location pings. i need to disable location completely
Click to expand...
Click to collapse
If location is set to Battery saver mode, that should not cause battery life degradation. But if it is, then 'disabling GPS' is not what you want to do - you want to see how to disable location reporting entirely (exactly as what your updated title indicates).
I don't think secure settings has been updated to support that feature in 4.4 - but hopefully other forum members will have suggestions.

jj14 said:
If location is set to Battery saver mode, that should not cause battery life degradation. But if it is, then 'disabling GPS' is not what you want to do - you want to see how to disable location reporting entirely (exactly as what your updated title indicates).
I don't think secure settings has been updated to support that feature in 4.4 - but hopefully other forum members will have suggestions.
Click to expand...
Click to collapse
i dont know what to tell you then. http://forum.xda-developers.com/showthread.php?t=2551846 shows tons of people with this issue
it doesn't drain battery while my phone is on and active. but when i lock the screen at night to sleep, my phone gets hardly any deep sleep mode. i took a shower yesterday and these two services woke my device up 96 and 44 times within a 20 minute span
i have already tried disabling location reporting and location history. this did not fix anything while my device was locked. it still had hundreds of wakeups at night
and i believe you're right. i dont think secure settings works with 4.4 either this is the issue i've been running into, i believe

Enddo said:
... believe you're right. i dont think secure settings works with 4.4...
Click to expand...
Click to collapse
It does work, but you first have to install the alternative helper in settings. Then Location Services will be enabled and you can turn it on and off when you want.
Sent from my Nexus 5

PhilipTD said:
It does work, but you first have to install the alternative helper in settings. Then Location Services will be enabled and you can turn it on and off when you want.
Sent from my Nexus 5
Click to expand...
Click to collapse
im pretty sure i installed that. well, first i installed the helper, and then i installed it as a service(option at hte bottom) since i had root

Enddo said:
im pretty sure i installed that. well, first i installed the helper, and then i installed it as a service(option at hte bottom) since i had root
Click to expand...
Click to collapse
Just make sure it's the alternative one.
Sent from my Nexus 5

Related

[Q] Mod or kernel hack to force GPS to stay on?

I would like to disable the ability to disable the GPS in the phones for use with an "invisible fence" app.
I don't care if the toggle in the notification area goes off or on, but I would like the phone to enable GPS on bootup, and just keep it on regardless.
Any ideas?
Why would you want it to stay on? It is a huge battery hog.
voldomart13 said:
Why would you want it to stay on? It is a huge battery hog.
Click to expand...
Click to collapse
mrcpu said:
I would like to disable the ability to disable the GPS in the phones for use with an "invisible fence" app.
Click to expand...
Click to collapse
I think I was pretty clear in the original post.
WTF is an invisible fence app??
and any app that requires GPS, will use GPS as needed. OLD Facebook app version for example, as long as it was on your screen, GPS was constantly locking. But it would kill the battery in less than 2 hours from full charge. so the facebook app changed the gps to lock once every so often, while the app is open on screen.
Other apps run a background service to access GPS at a set or random interval. Google Latitude for example. Not on screen, but will check-in or update location when-ever.
As you see the APP needs to have the set permissions, and options selected.
and in the end. your battery is dead in 2 hours with what you *think* you want
TRusselo said:
WTF is an invisible fence app??
and any app that requires GPS, will use GPS as needed. OLD Facebook app version for example, as long as it was on your screen, GPS was constantly locking. But it would kill the battery in less than 2 hours from full charge. so the facebook app changed the gps to lock once every so often, while the app is open on screen.
Other apps run a background service to access GPS at a set or random interval. Google Latitude for example. Not on screen, but will check-in or update location when-ever.
As you see the APP needs to have the set permissions, and options selected.
and in the end. your battery is dead in 2 hours with what you *think* you want
Click to expand...
Click to collapse
This is not correct. (at least on the apex rom I'm running).
If you turn off the GPS in settings (not using the toggle on the notification bar), then fire up google maps, the first thing it does is tell you that not all the options for locating the user are turned on, and to go to settings and turn on GPS.
I recall reading somewhere that Google disabled the ability for apps to turn the GPS on and off. They could query it if it was enabled, but couldn't turn it on if it was off.
If the user can turn it off in settings, then that defeats the purpose. I want the GPS on all the time, regardless of settings.
I don't care about battery life, I have 4 captivates in this house, I am well aware of their capabilities and limitations. And I don't really care if you think it's a good idea or not, all I'm asking is if anybody knows of a way.
there is a difference between switching GPS "on" and having GPS activated or locking signal.
in the android settings or with any toogle app, you can turn GPS on or off.
I have it ON 24/7, I bet you do too.
you turn GPS "on", so apps CAN use/activate it if they try to.
you turn GPS "off" to prevent apps from using it, thus reducing battery drain and increasing security.
having GPS on 24/7 doesn't do crap to battery, it depends on the apps, and how they are programmed to use GPS, and if they were programmed to work like you want, they would work like I SAID.
there have been apps that used GPS like you suggested. THEY GOT FIXED. you really dont understand how fast it drains the battery.
and i dont mean to offend, but you also dont understand how the apps interact with the GPS.
Originally Posted by mrcpu
I would like to disable the ability to disable the GPS in the phones for use with an "invisible fence" app.
I think I was pretty clear in the original post.
Click to expand...
Click to collapse
No. You weren't, WHAT THE FRICK an invisible fence app? and how does using the LARGE font help?
house full of captivates? did your dad get a family plan?

[Q] battery drain in standby, and Google play service problem

so I decided to charge my phone fully then leave it alone for 12 hours to see the standby drain, and This morning when I took a look and I was pretty disappointed. I attached pics, but as you can see, 12 hours of standby and 30 percent of my battery is gone. wtf? another time I did this a week ago with only 8 hours of standby, it drained 20 percent, which if scaled to 12 hours will become 30 percent. Why is the drain so high? Google play services is at the top of the list, and even with normal use it takes about 10 plus percent of my battery. my friends nexus 4, with basically the same apps I have (fb, messenger, Chrome, snapchat, bbm, etc) only had 10 percent after 12 hours. both our phones have the battery saving location enabled, radios on, but the only difference is that he wasn't connected to WiFi and I was. any suggestions? And yes I've looked around on the Internet at other people having the same problem and I still haven't found a fix
Lol sorry I forgot to add the pics in the first post
It's the WiFi. I had the really bad battery drain issue while connected to WiFi after the 4.4.2 update. I lost about 30% of charge after 4ish hours while connected. Currently I'm at 92% after 3 hours.
Try disconnecting from WiFi and redoing your test!
spitefulcheerio said:
It's the WiFi. I had the really bad battery drain issue while connected to WiFi after the 4.4.2 update. I lost about 30% of charge after 4ish hours while connected. Currently I'm at 92% after 3 hours.
Try disconnecting from WiFi and redoing your test!
Click to expand...
Click to collapse
oh wow, that might be my problem then. thanks a lot, I'll redo the test and see what happens, thanks
I haven't used WiFi at all today, my phone had been unplugged since 6 am and at 1pm today it's down to 57 percent. I have hardly used my phone today and the play services are killing it.
I think WiFi was my issue actually, I have kept it off all day and after 2.5ish hours I'm down to 72 percent battery, with an hour of screen on and using Google search quite a bit. the screenshot has screen and Google search at the top, Google play services hasn't been up in double digits at all
NuckFuggets said:
I think WiFi was my issue actually, I have kept it off all day and after 2.5ish hours I'm down to 72 percent battery, with an hour of screen on and using Google search quite a bit. the screenshot has screen and Google search at the top, Google play services hasn't been up in double digits at all
Click to expand...
Click to collapse
On your first screenshot Google play services consumed 34% out of 30% of your total battery loss, which is approx. 10% of your full charge. Within 12 hours this would be a 0.85% battery drain per hour because of gp services.
I did the math again for the second screenshot and Googe Play services consumed 0.7% per hour.
Doesn't feel like a big difference for me. If the time was actually less than 2.5 hours the drain could be equal.
George_Mn said:
On your first screenshot Google play services consumed 34% out of 30% of your total battery loss, which is approx. 10% of your full charge. Within 12 hours this would be a 0.85% battery drain per hour because of gp services.
I did the math again for the second screenshot and Googe Play services consumed 0.7% per hour.
Doesn't feel like a big difference for me. If the time was actually less than 2.5 hours the drain could be equal.
Click to expand...
Click to collapse
oh, well this is disappointing. that's so stupid, what is Google play services even for? and why does it have like an hour of keep awake time??
NuckFuggets said:
oh, well this is disappointing. that's so stupid, what is Google play services even for? and why does it have like an hour of keep awake time??
Click to expand...
Click to collapse
Go to Settings->Location->Google Location Reporting and set both to Off => no more battery drain
George_Mn said:
Go to Settings->Location->Google Location Reporting and set both to Off => no more battery drain
Click to expand...
Click to collapse
but then won't Google now not work anymore?
NuckFuggets said:
but then won't Google now not work anymore?
Click to expand...
Click to collapse
Google Now will still function. It just will not show cards based on location. Also when you disable or semi disable location sometimes Search start's keeping you're phone awake trying to find some location information. If this happens just force stop Google search or reboot the phone.
bblzd said:
Google Now will still function. It just will not show cards based on location. Also when you disable or semi disable location sometimes Search start's keeping you're phone awake trying to find some location information. If this happens just force stop Google search or reboot the phone.
Click to expand...
Click to collapse
oh ok, so like the weather card won't work? what about commute time to home? I'm guessing that won't work either right?
but anyway thanks for the help!
NuckFuggets said:
oh ok, so like the weather card won't work? what about commute time to home? I'm guessing that won't work either right?
but anyway thanks for the help!
Click to expand...
Click to collapse
Weather will still work you just need to input you're location into the card settings manually. I used that for a while but it consistently wakes the phone to update it which annoyed me so I use Dashclock as it only updates when I turn the screen on.
Without Locations it will still grab information from the net about your searches, sports teams, stocks etc. It will no longer show you commutes, local picture spots etc.
I've kept Google Now on mainly so I can still set and receive reminders but don't want to tolerate any unnecessary wakes when the screen is off and have accomplished that now.
bblzd said:
Weather will still work you just need to input you're location into the card settings manually. I used that for a while but it consistently wakes the phone to update it which annoyed me so I use Dashclock as it only updates when I turn the screen on.
Without Locations it will still grab information from the net about your searches, sports teams, stocks etc. It will no longer show you commutes, local picture spots etc.
I've kept Google Now on mainly so I can still set and receive reminders but don't want to tolerate any unnecessary wakes when the screen is off and have accomplished that now.
Click to expand...
Click to collapse
oh man, Idk il have to see how that works, cuz I use Google now a lot. but I'll try it, thanks again
George_Mn said:
Go to Settings->Location->Google Location Reporting and set both to Off => no more battery drain
Click to expand...
Click to collapse
Not necessary to go that extreme.
I had the same issue as you guys after upgrading. Goto Settings->App->All
Select Google play services. Stop it. And clean data (All, including cache)
Reboot. And voila, it will consume much much less battery (Dont ask me why... Probably some conflict arising on the data file after upgrade)
On a side note, without completely disabling data location, it is worth switching to the battery friendly mode (Location will be evaluated using the network and not the GPS)
Sent from my Nexus 7 using xda app-developers app
Alcibiade said:
Not necessary to go that extreme.
I had the same issue as you guys after upgrading. Goto Settings->App->All
Select Google play services. Stop it. And clean data (All, including cache)
Reboot. And voila, it will consume much much less battery (Dont ask me why... Probably some conflict arising on the data file after upgrade)
On a side note, without completely disabling data location, it is worth switching to the battery friendly mode (Location will be evaluated using the network and not the GPS)
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
just tried that, I'll see what happens. what's this though, when I want to disable it I get this pop-up. I get it with all system apps, but the last line I've never seen before
NuckFuggets said:
just tried that, I'll see what happens. what's this though, when I want to disable it I get this pop-up. I get it with all system apps, but the last line I've never seen before
Click to expand...
Click to collapse
Dont disable it. Stop it and wipe data
Sent from my Nexus 7 using xda app-developers app
Alcibiade said:
Dont disable it. Stop it and wipe data
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
I wasn't going to disable it, I was just wondering what would happen if I did
also here are my stats from today, what is android system and android os? why are they draining so much battery? also why is Swype using so much battery?
Researched this a lot, found some solutions, bad and good fixes and after trying some different twists on it after two days this is what I found to be the best, and I decided since this is just as bad as 4.0/4.1 and the mediaserver battery drain I might as well try and help at least 1 person by mass posting this reply I wrote else where to other threads, so here you go:
"Hey- I don't know if you, or anyone else has found a working solution, but here is the way I found best:
Note- I am on galaxy s4 [sgh-i337] running a 4.4 KitKat rom. I have found the following work around to work best for me:
1 Google now & Hotword detection=OFF,
2 GPS = OFF and turned on only when needed, eg maps/checkin on facebook/whatever needs location.
3 Settings-> Manage Apps -> Google Play Services -> Manage Space -> Clear All Data.
**Optional:After this [root only] I go into KT tweaker and make sure my phone cpu is set to a max of 810 Mhz when screen off.**
This fix usually works until I reset the phone. I ALWAYS follow those 3 steps when rebooting. AND always check that after I've used GPS that Google Play Services isn't keeping my phone awake. [Eg, after 30 minutes I check if the phone ever went to sleep again when the screen was off.] IF it does act up, I repeat steps 1, 2 &3. I still get notifications and all, and this is the least feature disabling way I've found that works with the cost of a little micro-management of your phone.
With this fix I can idle for an estimated 5-6days. As I take off my phone from charge at 8am and at noon with minimal usage [maybe 4 or 5 texts] I am at 97%. With WiFi on & connected.
OTHER: I personally keep NFC&Android beam&Bluetooth OFF, and turn ON when I need it on. Other- WiFi is always ON, and "Scanning Always Available" EDIT: Now is OFF, "WiFi Optimization" is checked ON for me. And for location mode when I do have it on, I keep it at EDIT: Device only. Using only gps to find my location.
All in all, I hope this gets fixed."
I can post screen shots and all if somebody wants them or if there is need for one
-icy
icy4phone said:
Researched this a lot, found some solutions, bad and good fixes and after trying some different twists on it after two days this is what I found to be the best, and I decided since this is just as bad as 4.0/4.1 and the mediaserver battery drain I might as well try and help at least 1 person by mass posting this reply I wrote else where to other threads, so here you go:
"Hey- I don't know if you, or anyone else has found a working solution, but here is the way I found best:
Note- I am on galaxy s4 [sgh-i337] running a 4.4 KitKat rom. I have found the following work around to work best for me:
1 Google now & Hotword detection=OFF,
2 GPS = OFF and turned on only when needed, eg maps/checkin on facebook/whatever needs location.
3 Settings-> Manage Apps -> Google Play Services -> Manage Space -> Clear All Data.
**Optional:After this [root only] I go into KT tweaker and make sure my phone cpu is set to a max of 810 Mhz when screen off.**
This fix usually works until I reset the phone. I ALWAYS follow those 3 steps when rebooting. AND always check that after I've used GPS that Google Play Services isn't keeping my phone awake. [Eg, after 30 minutes I check if the phone ever went to sleep again when the screen was off.] IF it does act up, I repeat steps 1, 2 &3. I still get notifications and all, and this is the least feature disabling way I've found that works with the cost of a little micro-management of your phone.
With this fix I can idle for an estimated 5-6days. As I take off my phone from charge at 8am and at noon with minimal usage [maybe 4 or 5 texts] I am at 97%. With WiFi on & connected.
OTHER: I personally keep NFC&Android beam&Bluetooth OFF, and turn ON when I need it on. Other- WiFi is always ON, and "Scanning Always Available" & "WiFi Optimization" is checked ON for me. And for location mode when I do have it on, I keep it at EDIT: Device only. Using only gps to find my location.
All in all, I hope this gets fixed."
I can post screen shots and all if somebody wants them or if there is need for one
-icy
Click to expand...
Click to collapse
thanks! but wow i wish my battery would be that good. i actually did so,ething else, i turned off the location reporting like someone earlier said and google play services dont even show up anymore. using device only disables location reporting as well so they both should have similar improvements.

[Q] Is this considered abnormal battery drain?

I have been using my N5 for a couple of weeks and I know its battery life isn't the greatest. I have watched some youtube videos for tips on better battery life, and here's what I have done.
Turn off auto brightness, and screen brightness is about 1/4 of the way
Turn off haptic feedback
Turn off vibration on keypress
Turn off sync for most Google services
Turn off NFC
Location service set to battery saving mode
But it seems like after all that's been done, the battery is still draining pretty fast. For example, I went out for dinner and drinks with friends and my phone is just sitting in my pocket the whole time not being used, 4 hours later, I have lost 30% battery. Coming from an htc one, it doesn't drain nearly as much. Is this abnormal or just about right for the N5, thoughts?
Infiniteloop7 said:
I have been using my N5 for a couple of weeks and I know its battery life isn't the greatest. I have watched some youtube videos for tips on better battery life, and here's what I have done.
Turn off auto brightness, and screen brightness is about 1/4 of the way
Turn off haptic feedback
Turn off vibration on keypress
Turn off sync for most Google services
Turn off NFC
Location service set to battery saving mode
But it seems like after all that's been done, the battery is still draining pretty fast. For example, I went out for dinner and drinks with friends and my phone is just sitting in my pocket the whole time not being used, 4 hours later, I have lost 30% battery. Coming from an htc one, it doesn't drain nearly as much. Is this abnormal or just about right for the N5, thoughts?
Click to expand...
Click to collapse
7.5%/hr is high for standby time. You can get it down to 1-2%/hr by using more of the battery-saving tips you'll find in the various threads on the subject.
Sent from my Nexus 5
Check the wakelock with better battery stat
If you don't need GPS on all the time turn that off too saves quite a bit of battery even the battery saving mode isn't that battery friendly
Sent from my Nexus 5 using Tapatalk
Infiniteloop7 said:
But it seems like after all that's been done, the battery is still draining pretty fast. For example, I went out for dinner and drinks with friends and my phone is just sitting in my pocket the whole time not being used, 4 hours later, I have lost 30% battery. Coming from an htc one, it doesn't drain nearly as much. Is this abnormal or just about right for the N5, thoughts?
Click to expand...
Click to collapse
You really need to share your battery usage screen, and show what apps drained your battery. It is possible that you were had low signal strength, and so your phone kept trying to search for a signal and drained itself. Also, as dark_ente suggested, look at betterbatterystats results to see if you had wakelocks.
With no active use, that is very high drain - unless you were in a very low signal strength area, or had an app keeping your phone awake.
When I work from home, connected to WiFi, my phone drains about 3-4% in about 9 hours (assuming I don't actively use it. I use pushbullet to show me all notifications on my PC, so I don't have to turn my phone on at all)
Infiniteloop7 said:
Turn off auto brightness, and screen brightness is about 1/4 of the way - I do the same (actually, I set it to the lowest possible level), because it is too bright
Turn off haptic feedback - I do the same, because it is annoying
Turn off vibration on keypress - I do the same, because it is annoying
Turn off sync for most Google services - I leave sync on
Turn off NFC - I leave it on
Location service set to battery saving mode - I do the same - but set up a tasker profile to enable GPS when I launch maps - Disabling GPS helped the most in my case
Click to expand...
Click to collapse
jj14 said:
You really need to share your battery usage screen, and show what apps drained your battery. It is possible that you were had low signal strength, and so your phone kept trying to search for a signal and drained itself. Also, as dark_ente suggested, look at betterbatterystats results to see if you had wakelocks.
With no active use, that is very high drain - unless you were in a very low signal strength area, or had an app keeping your phone awake.
When I work from home, connected to WiFi, my phone drains about 3-4% in about 9 hours (assuming I don't actively use it. I use pushbullet to show me all notifications on my PC, so I don't have to turn my phone on at all)
Click to expand...
Click to collapse
When you say turning off GPS and only enable it while launching maps, do you mean turn off location completely? Does that affect other Google apps/services? Such as Google now
If all else fails, do a factory reset.
Sent from my Nexus 5 using xda app-developers app
I noticed from the past few days that my N5 seems to have abnormal battery usage pattern. There are days with mostly light use (text messaging, whatsapp messaging, some web browsing, minimal on screen time) I can go for 2 days without charging, and I am only losing 1% battery per hour when it's in stand by. However, they are times (see attachment) when I didn't use my phone for 11 hours, and the battery level is down from fully charged to 26%. Can anyone give me some ideas on what may be the culprit?
kevtrysmoddin said:
If you don't need GPS on all the time turn that off too saves quite a bit of battery even the battery saving mode isn't that battery friendly
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
battery saver mode is actually very battery friendly. i've done extensive testing...
---------- Post added at 06:25 PM ---------- Previous post was at 06:24 PM ----------
Infiniteloop7 said:
I noticed from the past few days that my N5 seems to have abnormal battery usage pattern. There are days with mostly light use (text messaging, whatsapp messaging, some web browsing, minimal on screen time) I can go for 2 days without charging, and I am only losing 1% battery per hour when it's in stand by. However, they are times (see attachment) when I didn't use my phone for 11 hours, and the battery level is down from fully charged to 26%. Can anyone give me some ideas on what may be the culprit?
Click to expand...
Click to collapse
you need 'better battery stats' log. . . stock battery screen tells you almost nothing
Infiniteloop7 said:
When you say turning off GPS and only enable it while launching maps, do you mean turn off location completely? Does that affect other Google apps/services? Such as Google now
Click to expand...
Click to collapse
No. I keep location enabled all the time, but in battery saver mode - that way, google now, weather widgets etc can get my approximate location (using cell tower triangulation), but can't activate my GPS for accurate location fix.
When I use maps/navigation (which in my case is the only time when I need accurate GPS location fix), I change from battery saving location to the GPS type location fix, and when I'm done with maps/nav, I switch back to battery saving location.
If you turned location off completely, google now, and possibly other apps (like weather widgets for current location) won't work.
Infiniteloop7 said:
I noticed from the past few days that my N5 seems to have abnormal battery usage pattern. There are days with mostly light use (text messaging, whatsapp messaging, some web browsing, minimal on screen time) I can go for 2 days without charging, and I am only losing 1% battery per hour when it's in stand by. However, they are times (see attachment) when I didn't use my phone for 11 hours, and the battery level is down from fully charged to 26%. Can anyone give me some ideas on what may be the culprit?
Click to expand...
Click to collapse
From your 2nd screen print, you can see that your phone was awake pretty often. As @Enddo wrote, betterbatterystats should help you figure out what is causing the wakelocks.
Enddo said:
battery saver mode is actually very battery friendly. i've done extensive testing...
---------- Post added at 06:25 PM ---------- Previous post was at 06:24 PM ----------
you need 'better battery stats' log. . . stock battery screen tells you almost nothing
Click to expand...
Click to collapse
jj14 said:
No. I keep location enabled all the time, but in battery saver mode - that way, google now, weather widgets etc can get my approximate location (using cell tower triangulation), but can't activate my GPS for accurate location fix.
When I use maps/navigation (which in my case is the only time when I need accurate GPS location fix), I change from battery saving location to the GPS type location fix, and when I'm done with maps/nav, I switch back to battery saving location.
If you turned location off completely, google now, and possibly other apps (like weather widgets for current location) won't work.
From your 2nd screen print, you can see that your phone was awake pretty often. As @Enddo wrote, betterbatterystats should help you figure out what is causing the wakelocks.
Click to expand...
Click to collapse
I am still pretty new to Android and I don't know how to root my phone. I did check out betterbatterystats on google play, it says the app doesn't work on non-rooted Android phone running kitkat, that's why I haven't installed it yet. It seems that kitkat made some changes which prevent battery usage apps from working properly, wake lock detector also won't work on non-rooted phones running kitkat
Infiniteloop7 said:
I am still pretty new to Android and I don't know how to root my phone. I did check out betterbatterystats on google play, it says the app doesn't work on non-rooted Android phone running kitkat, that's why I haven't installed it yet. It seems that kitkat made some changes which prevent battery usage apps from working properly, wake lock detector also won't work on non-rooted phones running kitkat
Click to expand...
Click to collapse
Rooting is pretty easy. And it opens up a whole new world.
________________________
Sent from my Nexus 5
Infiniteloop7 said:
I am still pretty new to Android and I don't know how to root my phone. I did check out betterbatterystats on google play, it says the app doesn't work on non-rooted Android phone running kitkat, that's why I haven't installed it yet. It seems that kitkat made some changes which prevent battery usage apps from working properly, wake lock detector also won't work on non-rooted phones running kitkat
Click to expand...
Click to collapse
While betterbatterystats will work on kitkat (unrooted), it won't give you partial wakelock summary That requires root)
http://forum.xda-developers.com/showpost.php?p=15869904&postcount=3 - see FAQ 1 and 3. You can download the kitkat compatible version from http://forum.xda-developers.com/showthread.php?t=1179809
As PhilipTD wrote, rooting a N5 is pretty easy, but if you don't feel comfortable doing it, don't.
If you decide to root, follow the steps in first post at the link that PhilipTD provided.
Note that Step 1 (unlocking bootloader) will wipe out all your data.
Before you root, why not disable GPS (keep location active) and see if that helps? Also, how often do you reboot your phone?

[Q] Help with Tasker

Hey everyone, first I'm not really sure if this belongs in a Tasker forums. Seeing as I use a N5, I figured it could also go here. Anyway, I've been having some problems with Npl wakelocks. I downloaded wakelock terminator with xposed and it seemed to have helped, however something didn't seem right as my battery was draining the same amount as when the wakelocks were happening. The only time I wasn't having the drain was when location was set to device only, which makes sense.
I'm completely new to tasker. I've watched a few tutorials and I've messed around with it a bit but with not much luck. I wanted to do one of two things. Either have location set to battery saver/high accuracy when the screen is on, and have it set to device only when the screen is off. Another option is to have it set to battery saver/high accuracy when google now/maps is open and device only the rest of the time. I feel like this shouldn't be that hard but I messed around with it and got no where. Anyway, what are your guys' opinion about this strategy and would anyone be able to help me with implementing these tasks. Thanks!
I wouldn't go the route of using tasker for your problem. And I would ditch that xposed module for wakelocks too. I run rooted with xposed on high accuracy at all times. My battery life is great. You need to find the source of your battery drain and eliminate it. Don't look for a bandaid fix using tasker. My guess is you have some rogue app killing your battery. Give us a list of all your apps, or delete them all, and install them one by one to track down the culprit. Also, are you running stock Rom and kernel? What other mods do you have?
Lokke9191 said:
I wouldn't go the route of using tasker for your problem. And I would ditch that xposed module for wakelocks too. I run rooted with xposed on high accuracy at all times. My battery life is great. You need to find the source of your battery drain and eliminate it. Don't look for a bandaid fix using tasker. My guess is you have some rogue app killing your battery. Give us a list of all your apps, or delete them all, and install them one by one to track down the culprit. Also, are you running stock Rom and kernel? What other mods do you have?
Click to expand...
Click to collapse
I can run the phone as normal today with location and everything on and post my BBS log after. Basically, when I'm at home the battery is great. However, ever since updating to the new google search app I've been having extreme wakelocks from the Npl whenever I would leave my house. Which is why I found a thread on xda that was talking about that exact wakelock. You're right though. I'm going to get rid of the app because it seemed weird. The wakelocks weren't showing up on BBS but I feel like it didn't get rid of them. Who knows though, maybe you're right and it is something else that's draining the battery which is why the wakelock app didn't help.
Anyway, I'm running stock ROM/kernel with xposed. I use greenify module, appOpsX, snapshare, gravity box, and gesture navigation module. With gravity box I just use custom quick settings, smaller nav bars, some status bar mods like the day and double tap to sleep. However, again I have had the same GB mods since before the drain. I use a pebble however I've never had a drain from that and I've been using it since Dec. Most of my apps are greenified including facebook, instagram, as well as all my music streaming apps. A lot of the google services I don't use are disabled like books/magazines/movies. I have snapchat, but I don't use it too much, and facebook messenger that I don't greenify. When I check GSam stats though, android system and kernel take the most battery, followed by music players if I was streaming music that day. The rest of the apps are way down the list.
I posted in the battery thread asking if anyone had the same problem with the wakelocks after having the latest google play services. I noticed mine is still 4.3 for some reason so I might just update manually from androidpolice and see if theres a difference. But yeah, I will keep this updated with todays logs.
Try this. Use titanium backup to uninstall Google play services and Google search. Then launch maps, and reinstall both from the play store.
PsychDrummer said:
Another option is to have it set to battery saver/high accuracy when google now/maps is open and device only the rest of the time.
Click to expand...
Click to collapse
This is what I ended up doing. You will need the secure settings plugin for tasker.
Set up a new profile for application "Maps".
When on, launch task GPS On (Secure settings, configuration GPS enabled)
Exit task, launch task GPS On (Secure settings, configuration GPS disabled)
I used the app factory to create an app for this, and use that on my N5 and my second phone too. Works great. Enables GPS when I launch Maps for navigation, and switches to battery saving when I exit Maps
PsychDrummer said:
I can run the phone as normal today with location and everything on and post my BBS log after. Basically, when I'm at home the battery is great. However, ever since updating to the new google search app I've been having extreme wakelocks from the Npl whenever I would leave my house. Which is why I found a thread on xda that was talking about that exact wakelock. You're right though. I'm going to get rid of the app because it seemed weird. The wakelocks weren't showing up on BBS but I feel like it didn't get rid of them. Who knows though, maybe you're right and it is something else that's draining the battery which is why the wakelock app didn't help.
Anyway, I'm running stock ROM/kernel with xposed. I use greenify module, appOpsX, snapshare, gravity box, and gesture navigation module. With gravity box I just use custom quick settings, smaller nav bars, some status bar mods like the day and double tap to sleep. However, again I have had the same GB mods since before the drain. I use a pebble however I've never had a drain from that and I've been using it since Dec. Most of my apps are greenified including facebook, instagram, as well as all my music streaming apps. A lot of the google services I don't use are disabled like books/magazines/movies. I have snapchat, but I don't use it too much, and facebook messenger that I don't greenify. When I check GSam stats though, android system and kernel take the most battery, followed by music players if I was streaming music that day. The rest of the apps are way down the list.
I posted in the battery thread asking if anyone had the same problem with the wakelocks after having the latest google play services. I noticed mine is still 4.3 for some reason so I might just update manually from androidpolice and see if theres a difference. But yeah, I will keep this updated with todays logs.
Click to expand...
Click to collapse
Just run device only all the time, like everyone else does. It's a problem with Google's code, and the same bad coding is clearly seen throughout their entire app lineup.
Lokke9191 said:
Try this. Use titanium backup to uninstall Google play services and Google search. Then launch maps, and reinstall both from the play store.
Click to expand...
Click to collapse
What would that do though?
jj14 said:
This is what I ended up doing. You will need the secure settings plugin for tasker.
Set up a new profile for application "Maps".
When on, launch task GPS On (Secure settings, configuration GPS enabled)
Exit task, launch task GPS On (Secure settings, configuration GPS disabled)
I used the app factory to create an app for this, and use that on my N5 and my second phone too. Works great. Enables GPS when I launch Maps for navigation, and switches to battery saving when I exit Maps
Click to expand...
Click to collapse
Thanks! So, how would I set this up using device only/high accuracy? I'm also super new to tasker so if you don't mind I might PM you asking for help.
Aerowinder said:
Just run device only all the time, like everyone else does. It's a problem with Google's code, and the same bad coding is clearly seen throughout their entire app lineup.
Click to expand...
Click to collapse
Well, I actually like to use maps and google now. However, I don't actually need the location on when I'm not using either of the two services which is why I wanted to setup tasker.
It'll change them from being system apps to user apps. This has solved nlp wakelocks for many others experiencing the same problems.
PsychDrummer said:
Thanks! So, how would I set this up using device only/high accuracy? I'm also super new to tasker so if you don't mind I might PM you asking for help.
Click to expand...
Click to collapse
Sure.
It isn't that hard - install the secure settings plug in first, and when prompted, give it Superuser access. Then, create a new profile in tasker - call it whatever you want. Set up the profile for the application "Maps"
When Maps is launched, set it up to fire a new task (I called it GPS On) - this task just enables the GPS setting in the secure settings (under third party plugins)
GPS on -> high accuracy
GPS off -> battery saving mode
Set up an exit task (I called it GPS Off) - this turns the GPS settings in the secure settings off.
I can send you the apk if you want (but you don't really know me, so you probably shouldn't use an apk from a stranger! lol!), or you can try to import this attached xml into tasker (rename the file to remove the .txt extension - filename will be AutoGPS.prj.xml) - the xml option should be safe.
I haven't tried importing an xml, but it should be fairly straightforward (Save profiles in /sdcard/tasker/profiles and then, in tasker, long press the profiles "tab" and "import"). Before doing this, backup your existing profiles in tasker, just in case. Also, make sure you have secure settings set up before you import this.
jj14 said:
Sure.
It isn't that hard - install the secure settings plug in first, and when prompted, give it Superuser access. Then, create a new profile in tasker - call it whatever you want. Set up the profile for the application "Maps"
When Maps is launched, set it up to fire a new task (I called it GPS On) - this task just enables the GPS setting in the secure settings (under third party plugins)
GPS on -> high accuracy
GPS off -> battery saving mode
Set up an exit task (I called it GPS Off) - this turns the GPS settings in the secure settings off.
I can send you the apk if you want (but you don't really know me, so you probably shouldn't use an apk from a stranger! lol!), or you can try to import this attached xml into tasker (rename the file to remove the .txt extension - filename will be AutoGPS.prj.xml) - the xml option should be safe.
I haven't tried importing an xml, but it should be fairly straightforward (Save profiles in /sdcard/tasker/profiles and then, in tasker, long press the profiles "tab" and "import"). Before doing this, backup your existing profiles in tasker, just in case. Also, make sure you have secure settings set up before you import this.
Click to expand...
Click to collapse
Cool, thanks I will give it a try. And it would be the same if I want to have location on when using google search/now?
PsychDrummer said:
Cool, thanks I will give it a try. And it would be the same if I want to have location on when using google search/now?
Click to expand...
Click to collapse
Yes, it should be. But in my experience, I haven't found Google Search/Now really requiring high accuracy GPS level location for any of the features yet. It gets by fine with just battery saving mode. So, I only enabled this for the Maps application.
Actually, now that I think about it, I don't know how you'd enable it for Google Now - since it runs in the background to notify you about upcoming events. Since you aren't launching Google Now most of the times, I don't know how you'd set up Tasker to enable the high accuracy GPS for that (and it is possible that Google now using active GPS may be part of the battery drain issue - I don't know for sure)
jj14 said:
Yes, it should be. But in my experience, I haven't found Google Search/Now really requiring high accuracy GPS level location for any of the features yet. It gets by fine with just battery saving mode. So, I only enabled this for the Maps application.
Actually, now that I think about it, I don't know how you'd enable it for Google Now - since it runs in the background to notify you about upcoming events. Since you aren't launching Google Now most of the times, I don't know how you'd set up Tasker to enable the high accuracy GPS for that (and it is possible that Google now using active GPS may be part of the battery drain issue - I don't know for sure)
Click to expand...
Click to collapse
I actually wanted to keep the device on "device only" location instead of battery saving. For Google now I wanted the traffic card, but I would only need it if I physically open google now. I don't really need the notification.
PsychDrummer said:
I actually wanted to keep the device on "device only" location instead of battery saving. For Google now I wanted the traffic card, but I would only need it if I physically open google now. I don't really need the notification.
Click to expand...
Click to collapse
To keep device only, you should use Location mode (in secure settings) and set it to Device only or whatever you need, instead of GPS.
Note that "Device only" still uses active GPS and "This mode may use more battery power and take longer to determine your location" (Ref: https://support.google.com/nexus/answer/3467281?hl=en)
The traffic card still works on "battery saving" because it uses cellphone triangulation, and shows you the traffic in your vicinity, and based on your destination.
jj14 said:
To keep device only, you should use Location mode (in secure settings) and set it to Device only or whatever you need, instead of GPS.
Note that "Device only" still uses active GPS and "This mode may use more battery power and take longer to determine your location" (Ref: https://support.google.com/nexus/answer/3467281?hl=en)
The traffic card still works on "battery saving" because it uses cellphone triangulation, and shows you the traffic in your vicinity, and based on your destination.
Click to expand...
Click to collapse
I know, I have always used battery saving. The problem is that with battery saving, I'm having these extreme wakelocks and Google is constantly searching for my location which is what I think is the cause of the drain I'm having. I'm going to use my phone today by just using device-only location and see how the battery lasts. It should be much better since I'm hoping the phone will be deep sleeping longer. Basically, when I take my phone off the charger in the morning and I'm still at home for the first 2 hours of the day the standby time is great. It usually goes down 1-2% in those 2 hours even if I use the phone a little. However, once I leave the house is when I get constant wakelocks from location services and the battery stats to deplete a lot faster. I mean, I can still get through a day just because I don't use the screen a lot. I tend to only use about 1 hr 30 min on a regular day but I just want to play around with settings to see what works.If I can get the same standby time throughout the day that I get within the first two hours when im at home that would be great.
PsychDrummer said:
I know, I have always used battery saving. The problem is that with battery saving, I'm having these extreme wakelocks and Google is constantly searching for my location which is what I think is the cause of the drain I'm having. I'm going to use my phone today by just using device-only location and see how the battery lasts. It should be much better since I'm hoping the phone will be deep sleeping longer. Basically, when I take my phone off the charger in the morning and I'm still at home for the first 2 hours of the day the standby time is great. It usually goes down 1-2% in those 2 hours even if I use the phone a little. However, once I leave the house is when I get constant wakelocks from location services and the battery stats to deplete a lot faster. I mean, I can still get through a day just because I don't use the screen a lot. I tend to only use about 1 hr 30 min on a regular day but I just want to play around with settings to see what works.If I can get the same standby time throughout the day that I get within the first two hours when im at home that would be great.
Click to expand...
Click to collapse
That's strange. With battery saving mode, I get no wakelocks, which with device only or high accuracy, I used to get a lot of wakelocks by the location services.
But yes, no harm in trying out the options. Tasker+secure settings should be able to set up the battery saving or device only (as described above)
jj14 said:
That's strange. With battery saving mode, I get no wakelocks, which with device only or high accuracy, I used to get a lot of wakelocks by the location services.
But yes, no harm in trying out the options. Tasker+secure settings should be able to set up the battery saving or device only (as described above)
Click to expand...
Click to collapse
You get Npl wakelocks? So far I haven't gotten it and that's the wakelock that usually keeps my phone awake for 2 hours or so. basically, I think the way it works is that the device only setting uses more battery when using apps that use location such as maps but when the apps are not in use it uses no battery on location.
PsychDrummer said:
You get Npl wakelocks? So far I haven't gotten it and that's the wakelock that usually keeps my phone awake for 2 hours or so. basically, I think the way it works is that the device only setting uses more battery when using apps that use location such as maps but when the apps are not in use it uses no battery on location.
Click to expand...
Click to collapse
No. Ever since I switched to battery saving (and tasker toggling to high accuracy when I use maps), I have no location based wakelocks (no NPL wakelocks)
jj14 said:
No. Ever since I switched to battery saving (and tasker toggling to high accuracy when I use maps), I have no location based wakelocks (no NPL wakelocks)
Click to expand...
Click to collapse
Interesting, I've been having the opposite. I even took a screen shot of the wakelocks on the stock battery app where when the screen is off there's a huge amount of individual lines for awake (of course this is backed up by BBS). However when using device only the awake and screen on match almost perfectly.
PsychDrummer said:
Interesting, I've been having the opposite. I even took a screen shot of the wakelocks on the stock battery app where when the screen is off there's a huge amount of individual lines for awake (of course this is backed up by BBS). However when using device only the awake and screen on match almost perfectly.
Click to expand...
Click to collapse
Not sure why the difference, but regardless, as long as the individual 'fix' works, that's all that matters

[Q] 40% Battery Burn Overnight (with WLD Screenshots)

Hey guys,
I had the issue with the 40% battery burn overnight again. According to WLD, the CPU was awake for 96% of the ~11 hours since it was charged (which explains it). I want to make sure I'm reading these right, so I've posted screens of wakeup triggers and CPU wakelocks.
I've got Google Now turned on, the "OK Google" keyword detection turned off, location reporting on, location history on, and location services set to high accuracy (I use navigation and what not and would prefer to not have to toggle it constantly). Please see the attached screenshots.
Some googling of my own told me it's location reporting keeping it awake, which I'm afraid is the case, as I didn't have this issue for a while when it was off (it's also been on for several days and I haven't had this issue).
So, I have two questions in total. Is it Google Now's location usage that's draining my battery and keeping my phone awake? Also, since this isn't an every night issue, do you have any suggestions or recommendations to solve it without losing Gnow functionality?
I am running Carbon (July 1st nightly) and the Franco Kernel r55. Thank you very much in advance, this issue has alluded me and annoyed me for months.
Update: upon further research, I'm seeing that blocking wakelocks from Google Search / Google Now related location services will eliminate the problem without affecting Gnow functionality - is there any truth to this? I've also seen people claim to have disabled location reporting without loosing their weather, nearby events, etc. I worry that disabling the wakelock will impede functionality because I don't have the screen on often while traveling. I just can't seem to get a straight answer!
Update 2: after a phone call to Google (yes, they actually gave me a good answer), I was told that Location Reporting *only* tracks where you've been to give you travel time and similar things. Turning it off doesn't disable weather, nearby events, parking location, and so on, so it's looking like just disabling it is a good place to start.
turbofandude said:
Hey guys,
I had the issue with the 40% battery burn overnight again. According to WLD, the CPU was awake for 96% of the ~11 hours since it was charged (which explains it). I want to make sure I'm reading these right, so I've posted screens of wakeup triggers and CPU wakelocks.
I've got Google Now turned on, the "OK Google" keyword detection turned off, location reporting on, location history on, and location services set to high accuracy (I use navigation and what not and would prefer to not have to toggle it constantly). Please see the attached screenshots.
Some googling of my own told me it's location reporting keeping it awake, which I'm afraid is the case, as I didn't have this issue for a while when it was off (it's also been on for several days and I haven't had this issue).
So, I have two questions in total. Is it Google Now's location usage that's draining my battery and keeping my phone awake? Also, since this isn't an every night issue, do you have any suggestions or recommendations to solve it without losing Gnow functionality?
I am running Carbon (July 1st nightly) and the Franco Kernel r55. Thank you very much in advance, this issue has alluded me and annoyed me for months.
Update: upon further research, I'm seeing that blocking wakelocks from Google Search / Google Now related location services will eliminate the problem without affecting Gnow functionality - is there any truth to this? I've also seen people claim to have disabled location reporting without loosing their weather, nearby events, etc. I worry that disabling the wakelock will impede functionality because I don't have the screen on often while traveling. I just can't seem to get a straight answer!
Update 2: after a phone call to Google (yes, they actually gave me a good answer), I was told that Location Reporting *only* tracks where you've been to give you travel time and similar things. Turning it off doesn't disable weather, nearby events, parking location, and so on, so it's looking like just disabling it is a good place to start.
Click to expand...
Click to collapse
The data we need to see isn't shown in your screenshots. This is why I prefer BBS. You can just post a log and nothing will be missing.
Aerowinder said:
The data we need to see isn't shown in your screenshots. This is why I prefer BBS. You can just post a log and nothing will be missing.
Click to expand...
Click to collapse
Ugh, I knew I should have left it. I've got it installed now and will post a screenshot if it happens again. I've got Location Reporting turned off. I want to see if it will still give me the features I want, and if the battery drain issue stops, yippee. I will leave BBS there, however, in case it happens again.
turbofandude said:
Ugh, I knew I should have left it. I've got it installed now and will post a screenshot if it happens again. I've got Location Reporting turned off. I want to see if it will still give me the features I want, and if the battery drain issue stops, yippee. I will leave BBS there, however, in case it happens again.
Click to expand...
Click to collapse
All of the wakelocks that start with Nlp are due to location. Switching the location mode to Device only will stop them. Anything that relies on GPS still works fine. This should be the default setting.
I did a factory restore of the phone, latest Gapps, Carbon rom (07/07 nightly + 07/06 firmware), latest ElementalX Kernel now (so far, better temp/performance + equal or better battery). I know it's only an hour's worth of use, but a problem is pretty apparent.
Location reporting/history is off, Gnow is enabled, keyword detection is off. WiFi is on, and location services are in high accuracy mode. Why is a wakelock created by never released and how do I avoid that?
Is there any reliable setting I can use to avoid a random software issue eating up my battery? This inconsistency is driving me insane.

Categories

Resources