Related
Hey there, I'm looking for a little app on my Froyo that will turn on the WiFi and disable the 3G as soon as I reach my home (for example) and when I move outside again, that it'll disable the WiFi and enable the 3G.
Whether it's done by GPS or done simply by noticing if the WiFi signal is available, I don't mind. Does anyone have a clue about this?
I'm not sure if either can do it since I've yet to use them, but you may want to look into two programs, one called "Tasker" the other "Locale"
Both have the ability to execute location based tasks.
I've used both Tasker and Setting Profiles to accomplish this. Tasker is very powerful, but a bit fiddly to get working correctly.
SP is simpler, and works very well. The jury is still out.
There are a few apps that will do that like tasker and locale, but for my needs I use setting profiles.
Y5
Y5 do it great. remembers WIFI location acording to cell info (doesn't waist battery for GPS) and turn on and of.
only bug in my eyes it that in order to shut down WIFI on a remembered location, you need to disable app or forget location.
Thanks so far for the replies! Right now I'm trying Y5. The rest doesn't really work for me. I've tried Tasker, but no... then I've bought "Setting Profiles" as it seemed to be promising, but it doesn't recognize the places where I'm at. Both through GPS as well as cell towers... it knows where I am, but doesn't change my profile. Big pity!
So, now I'm trying Y5. Only down side is that so far none of the programs has the ability to disconnect the 3G upon activating WiFi.
akito said:
Thanks so far for the replies! Right now I'm trying Y5. The rest doesn't really work for me. I've tried Tasker, but no... then I've bought "Setting Profiles" as it seemed to be promising, but it doesn't recognize the places where I'm at. Both through GPS as well as cell towers... it knows where I am, but doesn't change my profile. Big pity!
So, now I'm trying Y5. Only down side is that so far none of the programs has the ability to disconnect the 3G upon activating WiFi.
Click to expand...
Click to collapse
i think it does!
at least in HTC DESIRE it turn 3G off
Locale can do the job. For example, you can set 3 situations.
Set 'At Home' Situation - Condition: Location plug in(any good location plug in)
- Settings: Locale variable plug-in, add, type 'Home', True.
Set at Defaults - Add Locale variable, add Home = False
Add Wifi - Off
Add 3G - ON
Set Wifi - Conditions: Home = True
Settings: Wifi on
3G off
For my case, I've added Appli Detection condition for the Wifi situation where it detect my browser, etc and perform the wifi on. Hope this helps. IMO, Locale does best and is simple.
I use Tasker to do exactly what you ask.
When I get home, Wifi turns on, 3G turns off. And vice versa when I leave.
Same when I get to work.
I do both of these without the need for GPS or even cell tower location..it's based on when I'm near my home wireless network.
Also turns off wifi, 3G and screen rotation when I'm in bed.
And then makes me breakfast in the morning (well, not quite, but it's almost that good! )
Okay guys, I have definitly uninstalled Setting Profiles. I can't seem to rely properly on it. One time it works, the other time it doesn't. So, I simply don't want it anymore
Now I'm trying Tasker, seems promising. I have downloaded APNDroid next to it, as Tasker was notifying me about the fact it needs that program to be able to (dis)connect the 3G. Now.... I'm stuck for a bit. I have made tasks, but have trouble with the profile. The location, I would like that to be done as the scotsman has got it. According to if it finds your home as well as, in my case, work network. How to do that? Cause when I want to set my location, it takes me to google maps. And I take it that works by GPS. No problem neither, but drains the battery a bit more... Would anyone be so kind to give me quick and short step through?
akito said:
Okay guys, I have definitly uninstalled Setting Profiles. I can't seem to rely properly on it. One time it works, the other time it doesn't. So, I simply don't want it anymore
Now I'm trying Tasker, seems promising. I have downloaded APNDroid next to it, as Tasker was notifying me about the fact it needs that program to be able to (dis)connect the 3G. Now.... I'm stuck for a bit. I have made tasks, but have trouble with the profile. The location, I would like that to be done as the scotsman has got it. According to if it finds your home as well as, in my case, work network. How to do that? Cause when I want to set my location, it takes me to google maps. And I take it that works by GPS. No problem neither, but drains the battery a bit more... Would anyone be so kind to give me quick and short step through?
Click to expand...
Click to collapse
I use Tasker, but I do not believe you can use WiFi location if WiFi is off. Location base uses GPS. You can set an option to do tasks if the WiFi connects. 3G is automatically disabled on my Incredible when WiFi connects, so I do not have to implicitly set it off. Just be sure to adjust your radius when you use GPS location. You do not want to drive way down the street to have WiFi turn off and 3G come back on.
I use Tasker to also launch the car app when bluetooth connects in my truck. There are good examples on the Tasker Web site.
I am quite given up with this issue in my phone; my Wi-Fi connection won't stay off. I want to manually activate/deactivate it, but it seems to have a life of its own.
This is apparently a very recurrent issue among Android phones, but the fix that applies to most doesn't apply to my phone. Most phones come with a Smart Wi-Fi, or in Xperia L's case, Location-based Wi-Fi, which you can disable and hopefully never have Wi-Fi respawn against command again.
In other phones you just have to disable notifications of present Wi-Fi networks, and the Wi-Fi can sleep tight until awoken.
However, I have disabled both modes, and my Wi-Fi still goes back on, no matter what. Can somebody shed some light?
wolterh said:
I am quite given up with this issue in my phone; my Wi-Fi connection won't stay off. I want to manually activate/deactivate it, but it seems to have a life of its own.
This is apparently a very recurrent issue among Android phones, but the fix that applies to most doesn't apply to my phone. Most phones come with a Smart Wi-Fi, or in Xperia L's case, Location-based Wi-Fi, which you can disable and hopefully never have Wi-Fi respawn against command again.
In other phones you just have to disable notifications of present Wi-Fi networks, and the Wi-Fi can sleep tight until awoken.
However, I have disabled both modes, and my Wi-Fi still goes back on, no matter what. Can somebody shed some light?
Click to expand...
Click to collapse
You can try set wifi turn on only when charge throu advance setting in wifi tab..
Or use battery doctor app
faizalotai said:
You can try set wifi turn on only when charge throu advance setting in wifi tab..
Or use battery doctor app
Click to expand...
Click to collapse
I was looking for a fix rather than a workaround, but I will follow up on that Battery Doctor app, it may well relieve my headaches with this meanwhile.
However, how can I get some kind of debug log about the Wi-Fi activity (like events that trigger it on)?
I found a way to access debugging messages and these 3 messages appear on separate occasions but repeatedly:
Code:
Start proc com.sonyericsson.android.locationbasedwifi:service for broadcast com.sonyericsson.android.locationbasedwifi/.LbwBroadcastReceiver
Code:
Process com.sonyericsson.android.locationbasedwifi:service has died
Code:
D/WifiService( 776): setWifiEnabled: true pid=991, uid=10133
These are the only messages with relevant information about the wifi business. And 2 of these 3 seem to mention the "Location Based WiFi" service, which needless to say, was set to OFF in the Power Management Settings. However, this process has been rendered quite rebelious.
So, what I am trying now is to disable the "Location Based WiFi" built-in app from the Apps Settings (after having forcefully stopped it, of course) and waiting on to see if this application is the culprit.
Did you tried to disable (in Settings/Applications) wifi display mirroring and throw settings?
I have kicked off SomcWifiDisplay.apk and problem has gone. Of course my phone is rooted, if yours is not try to disable application in apps list.
id202 said:
Did you tried to disable (in Settings/Applications) wifi display mirroring and throw settings?
I have kicked off SomcWifiDisplay.apk and problem has gone. Of course my phone is rooted, if yours is not try to disable application in apps list.
Click to expand...
Click to collapse
Hmm, my phone is not rooted so that last suggestion is not an option, however I have searched for the mirroring and throw settings in the Apps settings and have only found "Screen mirroring", which I disabled as an application.
The problem seems to have become a lot less present. Yesterday I went almost through the whole day without it occurring once, but just as I plugged in the phone to charge it, the Wi-Fi turned on.
I have posted a similar thread to Sony's own forum, and they're telling me to repair my phone software with the PC Companion. I'm going to see how that goes and I'll report back to the community.
wolterh said:
Hmm, my phone is not rooted so that last suggestion is not an option, however I have searched for the mirroring and throw settings in the Apps settings and have only found "Screen mirroring", which I disabled as an application.
The problem seems to have become a lot less present. Yesterday I went almost through the whole day without it occurring once, but just as I plugged in the phone to charge it, the Wi-Fi turned on.
I have posted a similar thread to Sony's own forum, and they're telling me to repair my phone software with the PC Companion. I'm going to see how that goes and I'll report back to the community.
Click to expand...
Click to collapse
Tried that with repair already and problem in original untouched firmware disappeared for ... 2 days
Try to clear data of Smart connect, looks like misbehaving of Smart Connect (or at least this is less hurting decision).
id202 said:
Tried that with repair already and problem in original untouched firmware disappeared for ... 2 days
Try to clear data of Smart connect, looks like misbehaving of Smart Connect (or at least this is less hurting decision).
Click to expand...
Click to collapse
Up to now I've had the problem virtually disappear; I had disabled the applications Location Based Wi-Fi and Screen Mirroring. Since I did it, my Wi-Fi only turned on once against my will when I connected my phone to the charger *—I didn't sweat it.
I am going to try your solution, and to be honest I'm quite offput by Sony's solution suggestion; I don't even use Windows/Mac plus I'd have to install the PC Companion.
Data cleared. Let's wait and see. :cyclops:
wolterh said:
Up to now I've had the problem virtually disappear; I had disabled the applications Location Based Wi-Fi and Screen Mirroring. Since I did it, my Wi-Fi only turned on once against my will when I connected my phone to the charger *—I didn't sweat it.
I am going to try your solution, and to be honest I'm quite offput by Sony's solution suggestion; I don't even use Windows/Mac plus I'd have to install the PC Companion.
Data cleared. Let's wait and see. :cyclops:
Click to expand...
Click to collapse
I am still hoping that your problem has gone. I do not have any more aces in my pockets beyond this. All my suggestions were based on my previous experiments.
Just clearing the Smart Connect's application data did not work for me. I enabled all Sony applications previously disabled and cleared the data of said application, but the problem returned. I have gone back to my workaround of disabling Location Based WiFi, Screen Mirroring and I have also disabled Smart Connect because these autoconnections have been all but smart.
Hello fellow Z3 owners,
I have had my Z3 for 3 days, and today I found something alarming: the Wifi seems to always be on, even when I manually turn it off from the System Settings.
It appears turned off from the settings, but using an app such as WIfi Analyser, I can see the networks around me, and I don't have any error message saying I have to turn WIfi on.
While using WIfi Analyser, I can go back to the settings page, and see that the wifi really appears to be off.
Does anyone have an explanation? Could anyone try to reproduce this?
Cheers,
JPascal.
jpascal said:
Hello fellow Z3 owners,
I have had my Z3 for 3 days, and today I found something alarming: the Wifi seems to always be on, even when I manually turn it off from the System Settings.
It appears turned off from the settings, but using an app such as WIfi Analyser, I can see the networks around me, and I don't have any error message saying I have to turn WIfi on.
While using WIfi Analyser, I can go back to the settings page, and see that the wifi really appears to be off.
Does anyone have an explanation? Could anyone try to reproduce this?
Cheers,
JPascal.
Click to expand...
Click to collapse
in android JB or Kitkat(IDR which) google added the feature for the wifi to "always scan" even when its off. i recreated your problem on my z3 and the exact same thing happened. go into your wifi menu, hit the soft key for options.. click advanced and then uncheck "wifi scanning always on" or whatever it says. this should also save you some battery.
Thanks for the solution! I found that as well, I still think there is a privacy issue. IMO this should be disabled by default.
Thanks for sharing, cheers,
JPascal.
During the setup process, the user is asked if they want this service to run in background and I always say no.
jpascal said:
Thanks for the solution! I found that as well, I still think there is a privacy issue. IMO this should be disabled by default.
Click to expand...
Click to collapse
Uh...what privacy issue?
poldie said:
Uh...what privacy issue?
Click to expand...
Click to collapse
That's actually a very good question. I am not a Wifi specialist, and when I saw that Wifi Analyser could see WIfi networks while my phone was saying the wifi is off, I assumed the WIfi was actually on all the time.
If I understand correctly, it's only turned on to scan surrounding Wifi networks. If it means your phone only listens, and does not speak with surrounding networks, then it should remain undetected, and we do not have any privacy issue. But if scanning means talking with surrounding networks, then it means these networks could potentially know you're around, right? Please understand that this is a question, not a conclusion.
Cheers,
JPascal.
jpascal said:
That's actually a very good question. I am not a Wifi specialist, and when I saw that Wifi Analyser could see WIfi networks while my phone was saying the wifi is off, I assumed the WIfi was actually on all the time.
If I understand correctly, it's only turned on to scan surrounding Wifi networks. If it means your phone only listens, and does not speak with surrounding networks, then it should remain undetected, and we do not have any privacy issue. But if scanning means talking with surrounding networks, then it means these networks could potentially know you're around, right? Please understand that this is a question, not a conclusion.
Click to expand...
Click to collapse
Sure, it's always good to consider security. Without going through the code it's not possible to know, but I'd imagine it's passively listening, if all it's doing is seeing which base stations are in the area. Were it to be actively probing then it should only be giving your MAC address away, which is not normally considered a threat. I turn it off to save battery, because otherwise wifi is on all the time!
poldie said:
Sure, it's always good to consider security. Without going through the code it's not possible to know, but I'd imagine it's passively listening, if all it's doing is seeing which base stations are in the area. Were it to be actively probing then it should only be giving your MAC address away, which is not normally considered a threat. I turn it off to save battery, because otherwise wifi is on all the time!
Click to expand...
Click to collapse
I did turn it off as well
OK, so I know M7 isn't the latest CM build, but it's the latest one without issues with GPS, so that's what I'm on since I use GPS a lot.
So last week I replaced my home router. This of course means reconfiguring all the wifi devices around the house, including my wifi thermostat. The unique thing about the thermostat is that to configure it, you connect a laptop/phone/tablet to the thermostat's ad-hoc wifi network, tell it which infrastructure ssid to connect to, verify a pin from the thermostat's screen (so nobody can hijack your t-stat from outside the house), and that's it.
thing is, when you use Cyanogenmod (at least on the relay) to connect to an adhoc network, it breaks wifi. what happens is you can't connect to any other wifi networks, and can't even scan to see available networks till you reboot. sometimes it doesn't work even after a reboot. strangely, the tethering/hotspot still works fine. you just can't connect the phone to a hotspot whether it's at home or work or anywhere.
i'd been having other issues and general slowness with the phone, so i decided to backup a few apps with TiBu and do a factory reset. that worked... till i tried connecting to the thermostat again, and it broke wifi completely this time.
solution? go to /data/misc/wifi/ and rename wpa_supplicant.conf to wpa_supplicant.conf.old (or whatever, as long as it's a different name) and reboot. the system will automatically create a new conf file. boom - wifi fixed.
obviously this requires root, but that's not an issue in CM. I doubt it matters, but i used ES file explorer since it's got a good root filesystem browser and mounting / or system as RW is a simple matter of a checkbox in the settings.
when i compared the newly created wpa_supplicant.conf with the one i'd renamed (.old) the only real difference i could see was the saved networks at the bottom. so you might be able to get away with simply deleting the offending network={ blah blah } section instead of completely renaming the conf file. the advantage here would be if you have a bunch of saved networks that you don't want to get rid of, it will keep those saved networks. the conf file is a plaintext file so it's easy enough to understand what you're looking at, and modify appropriately.
MODS: I apologize if this is in the wrong forum. I figured since it probably only applies to CM, I should post it in the dev forum rather than the general one. If it needs to be moved, I don't be offended.
Gibson99 said:
OK, so I know M7 isn't the latest CM build, but it's the latest one without issues with GPS, so that's what I'm on since I use GPS a lot.
So last week I replaced my home router. This of course means reconfiguring all the wifi devices around the house, including my wifi thermostat. The unique thing about the thermostat is that to configure it, you connect a laptop/phone/tablet to the thermostat's ad-hoc wifi network, tell it which infrastructure ssid to connect to, verify a pin from the thermostat's screen (so nobody can hijack your t-stat from outside the house), and that's it.
thing is, when you use Cyanogenmod (at least on the relay) to connect to an adhoc network, it breaks wifi. what happens is you can't connect to any other wifi networks, and can't even scan to see available networks till you reboot. sometimes it doesn't work even after a reboot. strangely, the tethering/hotspot still works fine. you just can't connect the phone to a hotspot whether it's at home or work or anywhere.
i'd been having other issues and general slowness with the phone, so i decided to backup a few apps with TiBu and do a factory reset. that worked... till i tried connecting to the thermostat again, and it broke wifi completely this time.
solution? go to /data/misc/wifi/ and rename wpa_supplicant.conf to wpa_supplicant.conf.old (or whatever, as long as it's a different name) and reboot. the system will automatically create a new conf file. boom - wifi fixed.
obviously this requires root, but that's not an issue in CM. I doubt it matters, but i used ES file explorer since it's got a good root filesystem browser and mounting / or system as RW is a simple matter of a checkbox in the settings.
when i compared the newly created wpa_supplicant.conf with the one i'd renamed (.old) the only real difference i could see was the saved networks at the bottom. so you might be able to get away with simply deleting the offending network={ blah blah } section instead of completely renaming the conf file. the advantage here would be if you have a bunch of saved networks that you don't want to get rid of, it will keep those saved networks. the conf file is a plaintext file so it's easy enough to understand what you're looking at, and modify appropriately.
MODS: I apologize if this is in the wrong forum. I figured since it probably only applies to CM, I should post it in the dev forum rather than the general one. If it needs to be moved, I don't be offended.
Click to expand...
Click to collapse
It does belong in q&a...but my lollipop validus has working gps
REV3NT3CH said:
It does belong in q&a...but my lollipop validus has working gps
Click to expand...
Click to collapse
As does FatToad. However, I do know that the privacy bit in the GPS can be flipped with the drivers we're using in FT. There's an old thread with a post from nard about how to fix that.
Magamo said:
As does FatToad. However, I do know that the privacy bit in the GPS can be flipped with the drivers we're using in FT. There's an old thread with a post from nard about how to fix that.
Click to expand...
Click to collapse
Do you understand more about this "privacy bit", what call in the API flips it, or can give me any other pointers about it? The poster previous to you indicates that GPS works with M7. I thought I had it working with M8, but can't really guarantee that, any more. The post from nard was quite an onerous process, including what looked like reflashing the baseband.
It seems to me that if we really understood this problem, the fix would be quite simple, and could be done by a root-access app. I've done more digging, and see that it seems to be common to many models of Samsung Galaxy phones, and some of the fixes involve doing potentially horrible things to the NVRAM. (like clearing it completely - what could possibly go wrong?)
It seems that the GPS is done in the baseband processor, along with the other radio stuff, but so far I haven't been able to find it. The transceiver chip is just a transceiver, no baseband processor. It looks like the baseband processor might be on the Snapdragon main processor chip, though they don't enumerate it well. In addition they mention a "gpsOne engine" without describing exactly what it is.
I'm still relatively ignorant about Android, a year after getting one. (not enough time) I'm better versed on hardware, but this problem seems to be in the cracks between.
Come to think of it, a simple question... Is there documentation on the communications between Android and the baseband processor?
Gibson99 said:
OK, so I know M7 isn't the latest CM build, but it's the latest one without issues with GPS, so that's what I'm on since I use GPS a lot.
Click to expand...
Click to collapse
I just took my wife's phone outside and tested it. GPS works on M8 from last summer, as does wifi. AFAIK the only thing that doesn't work on M8 is the video camera. (Stills on the camera work.)
This was an older phone than mine, purchased after mine. With mine I didn't need the radio or bootloader updates, my wife's did. I bought the phone for her, used it briefly with my PureTalkUSA SIM card to make sure it was really unlocked. Then I put CM11 on it.
phred14 said:
I just took my wife's phone outside and tested it. GPS works on M8 from last summer, as does wifi. AFAIK the only thing that doesn't work on M8 is the video camera. (Stills on the camera work.)
This was an older phone than mine, purchased after mine. With mine I didn't need the radio or bootloader updates, my wife's did. I bought the phone for her, used it briefly with my PureTalkUSA SIM card to make sure it was really unlocked. Then I put CM11 on it.
Click to expand...
Click to collapse
no idea how old mine actually is; i bought it "like new" from a tmobile reseller here in town and i actually use tmobile for service.
right now i'm on fattoad and once i stepped down my paranoia (i turned on privacy guard for everything including all system apps. hint: don't do that ) it seems good so far. nova launcher has an issue with flickering or disappearing icons, and everything is huge (i need to adjust the dpi) but so far no issues with gps or wifi (though i havent needed to connect to an adhoc network yet).
Do be careful with Privacy Guard. I didn't mention, but although Privacy Guard out of the box tends to make it so that most system apps are unable to be tuned, TeamApexQ likes the option of being able to tune everything in that regard, so we removed the safeguard. (For example, when PG was first ported to CM12, you could tune the settings of the 'Settings' app. Then at our next internal testing build, it was suddenly coming up empty, because CM made a change to exclude tuning for it. We restored full capability because we liked it. But that does mean you can more easily 'shoot yourself in the foot'.
Magamo said:
Do be careful with Privacy Guard. I didn't mention, but although Privacy Guard out of the box tends to make it so that most system apps are unable to be tuned, TeamApexQ likes the option of being able to tune everything in that regard, so we removed the safeguard. (For example, when PG was first ported to CM12, you could tune the settings of the 'Settings' app. Then at our next internal testing build, it was suddenly coming up empty, because CM made a change to exclude tuning for it. We restored full capability because we liked it. But that does mean you can more easily 'shoot yourself in the foot'.
Click to expand...
Click to collapse
I've recently begun to wonder if Privacy Guard might be partially responsible for reduced battery life. I'm under the impression that it lies to apps, providing false information when they have insufficient authority for the real information. Some of those permissions in Privacy Guard are to turn radios on and off. If an app thinks it's turned a radio on, and is trying to communicate based on faked (Really, it's going to look like a failure, at this point.) returns, it may spend more time continuing to try instead of just staying asleep. My battery life comes an goes, but I've noticed that on a "bad day" there are quite a few wakeups in the middle of nowhen, when the phone was sitting there in airplane mode with all radios off.
Of course I may be all wet on this - radio control may be one area where it can say, "You're in Airplane Mode, no program can turn the radio on."
good theory, and like you said, it depends on the app and how pg implements each block.
personally i'm having great battery life in L. i have a 5000mah battery, but usually by this point in the day i'm at about 60%. right now i'm still at 83%. i like how it projects your estimated remaining battery time. first time i looked at the battery chart, i lol'd - it was projecting 4.5 days before it died. i can probably get 2 no sweat even with regular usage, but i'd have to turn off sync and really cut back to make it 4 days.
I've had very good results with some simple rules with Privacy Guard. Generally the only thing I've turned off is the ability for Google Play Services and the Google App (Google Now) to wake up my device and to keep it awake. With those turned off, my battery life has gotten to be pretty damned nice... Though it makes Google Play Services FC once maybe every 24 hours. It restarts just fine, no harm no foul.
My battery life seems to be "bimodal". It either barely makes it 24 hours - basically needs recharging every night, or it lasts on the order of three or four days on a charge.
It seems to be somehow wifi-related, if I were guessing, and in an odd way. If wifi is largely off, but occasionally on, the battery life seems shorter. After wifi has been left off for "a while" (quantity not yet determined) it seems to go into long-battery-life mode. If I keep wifi largely on, and occasionally off (basically between known/trusted wifi places) the battery life comes out somewhere in between, consistent with wifi itself taking some power.
It's been really tough to detect any sort of pattern, but this is the best I've been able to come up with so far. I haven't done rigorous testing, or at least attempts at rigor so far have yielded inconsistent results. I've looked at what the Settings->Battery has available for power diagnostics, and one thing I noted was a lot of spurious wakeups when all radios were turned off. That's what led me to tentatively finger Privacy Guard.
I just saw the setting to show "built-in" apps on PG. I see two different entries for google.services and google.services.framework. The former has scads of wakeups - thanks for the tip. The latter has many, but a much smaller number. Did you block wakeups for both? I presume "built-in" are also "system" that others have said shouldn't be bulk-denied in PG. Are there guidelines anywhere about which are OK, which are useful, etc? (Like this case, and perhaps battery life.)
phred14 said:
My battery life seems to be "bimodal". It either barely makes it 24 hours - basically needs recharging every night, or it lasts on the order of three or four days on a charge.
It seems to be somehow wifi-related, if I were guessing, and in an odd way. If wifi is largely off, but occasionally on, the battery life seems shorter. After wifi has been left off for "a while" (quantity not yet determined) it seems to go into long-battery-life mode. If I keep wifi largely on, and occasionally off (basically between known/trusted wifi places) the battery life comes out somewhere in between, consistent with wifi itself taking some power.
It's been really tough to detect any sort of pattern, but this is the best I've been able to come up with so far. I haven't done rigorous testing, or at least attempts at rigor so far have yielded inconsistent results. I've looked at what the Settings->Battery has available for power diagnostics, and one thing I noted was a lot of spurious wakeups when all radios were turned off. That's what led me to tentatively finger Privacy Guard.
I just saw the setting to show "built-in" apps on PG. I see two different entries for google.services and google.services.framework. The former has scads of wakeups - thanks for the tip. The latter has many, but a much smaller number. Did you block wakeups for both? I presume "built-in" are also "system" that others have said shouldn't be bulk-denied in PG. Are there guidelines anywhere about which are OK, which are useful, etc? (Like this case, and perhaps battery life.)
Click to expand...
Click to collapse
It's difficult to give tips for this, because everyones' usage is different. Get 'WakeLock Detector' and keep an eye on that when your power drain seems more intense. Disable things that make sense to disable based on that.
I know this isn't really the topic, but just because you get a new router doesn't mean you have to reconfigure everything. Why couldn't you just configure the new router with the SSID and password from the old one?
slartibartfast42 said:
I know this isn't really the topic, but just because you get a new router doesn't mean you have to reconfigure everything. Why couldn't you just configure the new router with the SSID and password from the old one?
Click to expand...
Click to collapse
believe me, i tried that. it's stupidly tedious to enter a long keyphrase via the remote control on our tivos and only slightly less tedious on the roku (its remote is much more responsive). laptops and phones aren't as bad since they have keyboards. apparently the devices are smart enough to notice a different MAC behind the BSSID. which if you think about it, is actually a GOOD thing in terms of security, since it makes spoofing a little more difficult. granted, you'd also have to know the wpa key to successfully spoof, but it's a simple check to implement for security's sake, and i'm glad they did.
by the way, do you like fjords?
Magamo said:
It's difficult to give tips for this, because everyones' usage is different. Get 'WakeLock Detector' and keep an eye on that when your power drain seems more intense. Disable things that make sense to disable based on that.
Click to expand...
Click to collapse
"Wakelock Detector" has certainly been enlightening. "Google Fit", which makes sense, once you think about it. But the other aspect that was even more important, I just happened to see when one of the other forums popped up on some sort of search result or other.
You have to boot your Android device on battery. If the kernel starts up on charger, it never gets into the deepest power-saving states. When I first started using Wakelock Detector, my phone showed up as being awake something like 97% of the time. Google Fit was the biggest user, but not that big. After seeing that advice I've been careful to boot on battery, and now most of the time is spent asleep. Google Fit still uses wakes as much, but when it's not, the phone is really sleeping. My normal battery life has moved out to two or three days, sometimes into a fourth. As long as I consider Google Fit worth having around, this battery life is good enough for me - there is always a decent window to recharge.
phred14 said:
You have to boot your Android device on battery. If the kernel starts up on charger, it never gets into the deepest power-saving states.
Click to expand...
Click to collapse
So much for that theory. A day or two back, after good battery life since this post, I noticed it draining faster. Today I looked, and sure enough, it's not going into deep sleep. I tried rebooting with all four states of wifi and cell service, and nothing has gotten deep sleep back. I think I'm going to try charging tonight, booting while charging, then rebooting after disconnecting. It would be good to have an exact and repeatable set of circumstances that cause both good and bad battery life.
My last android phone did not have this problem. I connect to my home VPN while at work. Ever since I got this phone the connection just drops every 10-20 minutes when the phone is sitting idle, or when I'm just listening to a podcast or something.
I don't know if it's phone related or android version related but I can't find any information on it. Has anyone else experienced this?
I tried looking through the power save settings to see if there was some option cutting data when the phone went idle but didn't find anything.
thoughts?
Thanks
check to see if battery optimization is on for your VPN app....Settings > Battery > (3 dots menu) > Battery Optimization > set your VPN app to Not Optimized. Honestly not well versed in how the VPN config works, but the activity you describe sounds very much like Doze (battery optimization) is kicking in and killing your connection. For example, I turn off battery optimization on my exchange mail app and other apps that I want to ensure stay active even if my phone is idle.
I have added VPNdialogs to the don't optimize list. I couldn't find anything else that was VPN related, but this doesn't seem like the proper app I need. Unless anyone knows what the VPN app is called?
Thanks for the suggestion, with any luck this will work.
Frontier3 said:
I have added VPNdialogs to the don't optimize list. I couldn't find anything else that was VPN related, but this doesn't seem like the proper app I need. Unless anyone knows what the VPN app is called?
Thanks for the suggestion, with any luck this will work.
Click to expand...
Click to collapse
no worries, good luck with it. you may wan tot explore some of the VPNService config information in the AOSP/Dev site here. This probably starts to get into the connectivity/network aspects of the optimization, and it's hard to say how those services are isolated from general phone connectivity and the battery optimization (that is, does turning off optimization for one of the potentially related services cause a lot of stuff to go out of optimization by detraction, which could hamper battery life significantly but not in a way that's immediately obvious). You could guess and check, but another method may be to reexamine your VPN app of choice. You could try free options like OpenVPN Connect, Open VPN for Android, or Speed VPN (all free) and see if you can run your vpn through them and control battery optimization at that app's level to better success. There's also VYPR (VYPYR? spelling?) that's free up to a limited amount of data usage and could be used in P.O.C. manner to test things out. Again, I'm not a VPN expert, but I did tinker with a few of these when I was recently in China (to no avail, but not due to the apps, due to China being very Chinese/Anti-Google).
That said, we still don't even know if this is Doze/battery optimization related, but it's worth eliminating as an obvious potential culprit. I fear I'm not going to be able to help much beyond this, but have used android as a "super-enthusiast" for many years. I can also ask my buddy at work tomorrow who's a network and security freak, he might know...
Just an update, putting vpndiags out of battery optimization did not affect the issue. It's still disconnecting regularly. When I find time I'll look through the dev link posted above.
In the mean time if anyone else has any ideas I'm all ears.
Just a random thought, but did you remember to check the always on box when you configure the VPN setup, so that it transmits a keep-alive packet across the tunnel to prevent disconnection?
Yeah I couldn't figure out what that button was doing. When I check it the connect button greys out. I tried checking it but it seemed like it wasn't doing anything. I'll play around with it a bit more. Thanks for the suggestion.