VPN battery drain solved? - Android Q&A, Help & Troubleshooting

After several years of trying different free and paid vpn's that won't drain my battery excessively I think I may have found the solution.
I have lifetime subscriptions for VPN Unlimited and Windscribe with Proton and Tunnelbear as my free ones. All drain the battery quite heavily. For the past 72 hours I've been using the Strongswan Ikev2 client to run Windscribe and it's been excellent. Zero abnormal battery drain. It's the first time I'm using Ikev2 and it's much more efficient than OpnVpn in terms of speed, battery and auto-reconnecting. The downside is that it only uses one port and can therefore be blocked by the isp or government, so if you live in a restrictive country then you're out of luck.
The screenshot below are my actual battery stats since I took the phone off the charger. This is despite Strongswan shown to be using about 35% of the battery.
I presume any Ikev2 enabled vpn will work just as well so you don't need to use Windscribe and I'm not endorsing them over any other vpn. Anyway give it a try and let us know how it works for you.

Update: Almost a week now and battery life is still normal. Looks like this really does work.

Yep, ikev2 is going to have much better speed and lower CPU usage on every platform (that's why it's used for Enterprise network vpns between firewalls). Also give wireguard a shot, extremely low CPU usage and battery as well

JedixJarf said:
Yep, ikev2 is going to have much better speed and lower CPU usage on every platform (that's why it's used for Enterprise network vpns between firewalls). Also give wireguard a shot, extremely low CPU usage and battery as well
Click to expand...
Click to collapse
Thanks for the tip. I'll check it out.
I'm not sure many people know about this because all the searches I've done show complaints but no effective solution to the battery drain. Ikev2 and the right vpn client should be top of everyone's list when considering a mobile vpn.

Twotems said:
Thanks for the tip. I'll check it out.
I'm not sure many people know about this because all the searches I've done show complaints but no effective solution to the battery drain. Ikev2 and the right vpn client should be top of everyone's list when considering a mobile vpn.
Click to expand...
Click to collapse
Agreed. One of the other reasons though that people prefer openvpn is that you can run it over tcp 443 so it's not likely to get blocked on draconian guest networks like ikev2 might.

JedixJarf said:
Agreed. One of the other reasons though that people prefer openvpn is that you can run it over tcp 443 so it's not likely to get blocked on draconian guest networks like ikev2 might.
Click to expand...
Click to collapse
Understood. Under those circumstances your original app will still give you the OpenVpn option. But for an always on vpn for mobile the combination of ikev2 and Strongswan is excellent. It's permanently connected on both my phones now.

Yeah, IKEv2 is the way to go, better security and less drain on the CPU/Battery. I set up NordVPN on the Strongswan too and experienced slightly better results than with the NordVPN app. Though the app itself isn't bad at all.

I'd also like to say that using IKEv2 protocol through strongSwan has fixed my Android VPN battery drain issues as well. I have traditionally been using the NordVPN client on my Android device and it definitely introduces a significant drain on the battery, which is now gone.
Hopefully anyone else with similar issues will find this topic with a quick search and can apply the same solution to their problem as well.

So I am new to setting up vpn manually. I have been using nordvpn app for a while but battery drain has kept me from keeping it on constantly or using androids kill switch.
I just installed openvpn connect amd strongswan and using nordvpn server through them for oenvpn and ikev2 protocols. Is that the right way to go about it? How do you select which server to use as there are 1000s of servers. Should I be importing all of them into these apps. How do I decide which one to use at any time.
I ideally want to be at a point where I can just leave it on all the time without worrying it will drop connection.
Thanks

vm81 said:
So I am new to setting up vpn manually. I have been using nordvpn app for a while but battery drain has kept me from keeping it on constantly or using androids kill switch.
I just installed openvpn connect amd strongswan and using nordvpn server through them for oenvpn and ikev2 protocols. Is that the right way to go about it? How do you select which server to use as there are 1000s of servers. Should I be importing all of them into these apps. How do I decide which one to use at any time.
I ideally want to be at a point where I can just leave it on all the time without worrying it will drop connection.
Thanks
Click to expand...
Click to collapse
It's either OpenVpn or Strongswan. You can't use both as they use different protocols and OpenVpn will continue to drain your battery. Therefore it's Strongswan you need using the Ikev2 of Nordvpn.
Just import the servers you want to use, set and forget. Windscribe has a specific set of instructions on this but I don't know how Nordvpn does theirs. It should look something like "us.central.nordvpn.com" with a password and instructions on which boxes to check and uncheck. Once you're set up you use the Strongswan client exclusively and select any server you've imported from there. No need to even have the Nordvpn app installed any longer.
Hope that helps.

Thanks for your response. I was planning to use only one at a time ikev2 or openvpn. I juat installed both to see how they compare.
Anyways, one of my questions is that how do i select which server to use. If i use nord vpn app (which i dont want to) it shows me all the servers and load on them so I can decide which one to use.
With strong swan, I loaded one server on...but whats the best way to figure if aerver i am using is optimal.
Also battery drain is better than using nordvpn app, but it seems to get stuck every few hours and I have to dusconnect and reconnect. Also if I turn alway on vpn on in android setting, it drains battery lot more.

vm81 said:
Thanks for your response. I was planning to use only one at a time ikev2 or openvpn. I juat installed both to see how they compare.
Anyways, one of my questions is that how do i select which server to use. If i use nord vpn app (which i dont want to) it shows me all the servers and load on them so I can decide which one to use.
With strong swan, I loaded one server on...but whats the best way to figure if aerver i am using is optimal.
Also battery drain is better than using nordvpn app, but it seems to get stuck every few hours and I have to dusconnect and reconnect. Also if I turn alway on vpn on in android setting, it drains battery lot more.
Click to expand...
Click to collapse
You've already answered your own question. Put as many servers as you want on Strongswan and use the Nordvpn app to decide which one to use.
I don't know what phone or android version you're using but both my phones are on Oreo and they don't have the always on option any longer. I just whitelist and enable autostart for Strongswan. It may get stuck but that generally depends on your vpn, mobile and wifi networks not Strongswan.

After my phone has been asleep for a while, when I wake it, the data doesn't work. Anyone else have this problem with strongswan? I've tried it using both windscribe and nord, same issue with both

johnjay06 said:
After my phone has been asleep for a while, when I wake it, the data doesn't work. Anyone else have this problem with strongswan? I've tried it using both windscribe and nord, same issue with both
Click to expand...
Click to collapse
Sounds like it has something to do with your phone settings. What phone do you use?

Twotems said:
Sounds like it has something to do with your phone settings. What phone do you use?
Click to expand...
Click to collapse
Galaxy s9. I've tried everything I know to

johnjay06 said:
Galaxy s9. I've tried everything I know to
Click to expand...
Click to collapse
I have the same issue on my Lenovo tablet running Marshmallow actually. It happens when it goes into deep doze and disables wifi. No such issues on Xiaomi, Huawei or Vivo phones as the settings are granular unlike the Lenovo tablet. Try disabling your sleep/doze mode if you can.

outlaw1985 said:
The reason for the discharge of your battery may not depend on the vpn you are using, maybe your battery is already very worn out if you have been using it for several years, or your vpn spends too much of your smartphone's resources and therefore it discharges very quickly ...
Click to expand...
Click to collapse
This thread is ancient. But to answer your question, Wireguard solved the problem.

Related

Vibrant Using High Amount of Bandwidth on WiFi

I have been using the WiFi connection at work with my Vibrant because I can usually only get Edge here. I setup a new SonicWall ViewPoint server today and noticed something very interesting in regards to bandwidth. My Vibrant has the highest amount of usage.
I don't stream anything to my Vibrant. I have my gmail and exchange synced but other than having it sit on my desk I don't do much with my phone (besides phone calls). As far as I can tell there have been no automatic updates from any market apps.
I'm using Nero B3 if that means anything. I have users who stream Pandora and Youtube all day and I find it very surprising that my phone is sucking up more bandwidth that they are.
Any thoughts or ideas as to why?
Download a system monitor from the Market and see what is using the net.

[Q] Speed up 3G/download speeds on Optimus V? PLEASE READ!

I'm getting crappy download, upload, and 3G connectivity speeds on my Virgin Mobile LG Optimus V. I'm rooted, running CyanogenMod-7.2.0-BACKside-IHO-KANG, Build ID: eng.jerry.20111122.082819, Build Number: GRJ90 (11222011/VM670), and Kernal Version: 2.6.32.9-v3.3 [email protected] #1, and Android Version: 2.3.7.
I've read that flashing Franco Kernal may help a little bit with network speeds, but that was for the Optimus S. The Optimus S & V are pretty much the same, so would it be safe to flash Franco's Kernel with the ROM that I'm using now?
I've also read that dialing ##3282#, and editing the HTTP PD Port to value 0 and Address to 0.0.0.0 would then increase download speeds by 0.20-0.60 MBPS, but that was for the HTC Evo. I tried dialing to service code ##3282# on my dialer, and nothing happened.
Finally, I also read that doing a PRL Update manually and inserting/replacing Virgin Mobiles PRL file with a new and updated PRL file will significantly increase signal and speeds, but its risky, and requires depth to do so. Also, it allows to connect to Verizon's towers, therefore it would then not allow any data connectivity for browser, market, etc.
So, folks, my question is, is there ANYTHING or ANY WAY I can improve my download/browser speeds? Would downloading a proxy app from the Market work and apply faster speeds for downloading on my phone?
Thanks for any and all help, as it will be greatly appreciated!
3g turbocharger script
try that
and PRL update
proxy? naw dog you'd be doing it wrong
try this too
https://market.android.com/details?id=uk.co.mytechie.setDNS
bloodclot said:
3g turbocharger script
try that
and PRL update
proxy? naw dog you'd be doing it wrong
try this too
https://market.android.com/details?id=uk.co.mytechie.setDNS
Click to expand...
Click to collapse
I just downloaded the Set DNS app from the link you gave, but where do I find DNS servers to use?
And the PRL update and 3G supercharged script looks very difficult for a noob like me lol I mean I kno android very well, just never did a PRL update or scripting
cotylee1991 said:
I just downloaded the Set DNS app from the link you gave, but where do I find DNS servers to use?
And the PRL update and 3G supercharged script looks very difficult for a noob like me lol I mean I kno android very well, just never did a PRL update or scripting
Click to expand...
Click to collapse
It is super difficult. And really it'd be like putting a supercharger on a pinto. Sounds great when you tell your friends, but you're not going to win any races. The real problem is sprints network, and the fact that we buy the cheapest service available from people who lease a very small percentage of their bandwidth. I get 50- 125 kbps consistently. Not allot to do besides try another carrier.
Sent from my HTC_A510c using Tapatalk
BigChillin said:
It is super difficult. And really it'd be like putting a supercharger on a pinto. Sounds great when you tell your friends, but you're not going to win any races. The real problem is sprints network, and the fact that we buy the cheapest service available from people who lease a very small percentage of their bandwidth. I get 50- 125 kbps consistently. Not allot to do besides try another carrier.
Sent from my HTC_A510c using Tapatalk
Click to expand...
Click to collapse
Yeah for real! That's no joke lol I might try doing a PRL update tonight, but that's a big maybe. I used to get 200kbps download when I first got with Virgin Mobile with the LG Optimus V, now it seems my speeds are slowly deteriorating. And it doesn't help that Virgin Mobile is gonna bring a data cap on their 3G in 2012 to only 2.5GB, after that, they are gonna put a maximum set download speed cap after the customer uses up the 2.5GB in the month. Which sucks for me bc I'm always on Facebook, Linkdin, Twitter, browsing the market, web, downloading, etc. :/
Well social media doesn't take up very much data at all, it's the downloads that might get you if you use them a lot.
EnMod said:
Well social media doesn't take up very much data at all, it's the downloads that might get you if you use them a lot.
Click to expand...
Click to collapse
I go on download outrages alot lol
hmmm....this is the first I've heard of that DNS app. Does it really have proven results? It had good ratings on the market.
Sent from my LG-VM670 using XDA App
mjs2011 said:
hmmm....this is the first I've heard of that DNS app. Does it really have proven results? It had good ratings on the market.
Sent from my LG-VM670 using XDA App
Click to expand...
Click to collapse
I downloaded it, and changed the DNS to FOOLDNS and I can definitely tell a difference in speeds. Tapatalk loads super fast now
Sent from my LG Optimus V.
"Cracker for fun, hacker for LIFE!"
cotylee1991 said:
I downloaded it, and changed the DNS to FOOLDNS and I can definitely tell a difference in speeds. Tapatalk loads super fast now
Sent from my LG Optimus V.
"Cracker for fun, hacker for LIFE!"
Click to expand...
Click to collapse
ok thanks. i may try it. still a little skeptical as a few of the comments mentioned that it broke their wifi and that the developer didn't respond to their emails.
franco's kernel is for the msm7227 chipset (unless he built one for the OS I'm unaware of,) the OV/OS have msm7627.
they are NOT compatible.
I got nasty side effects back when I flashed a msm7227 kernel on my OV for experimental purposes. it took a couple of days before it would boot consistently again even though I put a compatible kernel back on it immediately after it locked up ugly from the wrong chipset compiled kernel. It would freeze on boot until the battery was pulled for a minute or two.
I can get much better download speeds in a debian chroot on the OV with multiple download threads, using axel, but I don't know of any way to multithread downloads in Android.
As an example, my average DL speed ranges from 1-30K/sec. With axel, I can pull down over 100K/sec, with no other variables obviously changed. the Android browser very rarely goes over 100K/sec on my OV. (I am in a lousy service area.)
SetDNS (or other similar apps) "speed up the connection" by taking some of the guess work out of trying to find the resource on the web.
Most of the slowness in wireless comes from the fact that a wireless network is like a hub (in that it's a shared medium) so if two or more people transmit at the same time there is a network collision (two or more signals interfear with each other keeping the tower from understanding the request) per TCP/IP protocal all devices involved in the collision must back off for a random amount of time (to ensure they don't all retransmit at the same time again) and try again. This effect grows as the size of the wireless network grows and the more people who are on it. It effects cellular much more than wifi as you can have many more people on a cell tower as it covers much more ground.
***Intermission***
Now when your phone makes a DNS request (usually the browser, but some apps as well) there are actually many steps involved in trying to turn a url into an ip address, there are mutliple ways other than dns to turn a url into an address (most of which are legacy but it still tries anyway) trying all of these ways in addition to trying to find a DNS server means multiple request on the network which increases the likelyhood of collisions thus increasing the latency and causing timeouts (this is why sometimes your browser will start to load a page and then just hang there for awhile.)
***Almost there, Hang on just a little longer***
Now back to setDNS, this app allows you to specify a dns IP address (instead of it trying to find one) thus forcing it to use that address before trying anyother method, so your phone browser (or app) doesn't waste time looking for a dns or trying legacy methods. Thus reducing the request and collision/timeouts on a network, overall making your phone load stuff much quicker.
Works well enough that I use the web version of gmail and google reader instead of native apps (though native apps are generally quicker as they don't have to load the ui everytime you open it and sometimes the app will use an ip instead of a url, though some apps use url's in the code because the resources at needs have dynamically allocated (and thus always changing) ip addresses.)
Does anyone know if the Turbo/Supercharger scripts actually work? I assume any difference seen is minimal and also it may wear down your battery even faster. Battery life on these phones is already precious.

Want an app that shuts off WiFi when out of range, then pings

Hi guys,
I am looking for an app that does *two* things:
1. Shuts off Wifi when I get out of wifi range; and
2. Automatically pings for a WiFi connection, but not so often that it drains the battery.
It would be even better if I could set the app to stop background syncing when Wifi is off.
Does anyone know of an app, or a combination of apps that might be able to do this?
The only thing I have found so far is Juice Defender Ultimate, but it seems like overkill to use that just for WiFi control.
Tasker or locale
Sent from my SAMSUNG-SGH-I717 using xda premium
Juice defender does a good job of it. Go for the paid version.
Sent from my SAMSUNG-SGH-I717 using Xparent ICS Tapatalk 2
I would agree with dafoxs.. juice d... I may be over kill but it works and you can always use it for more than just wifi.
Sent from my metrosphere remix Note
Tasker ftw!
you can do all that you've requested and much more.
e30andrew said:
Tasker ftw!
you can do all that you've requested and much more.
Click to expand...
Click to collapse
I got Tasker but I'm just too lazy to get it to do what I want. Maybe I should put some effort into it.
At any rate, I think I found what works, but it is a combo of three apps:
Auto WiFi On/Off by Impresk, which turns off WiFi when out of range and then you can set how often it pings (I chose every 15 minutes);
WifiKeepAlive by roys, which keeps WiFi on when it is still in range;
Wi-Fi Web Login by SysLynx. This auto-logs you in to those annoying hotspots where you have to click a button on a webpage to get access. It really smooths the process.
Have you tried the "AT&T Smart Wi-Fi" app as found on the Play market? Not sure if it is what you need or not. Decent ratings.
"AT&T Smart Wi-Fi connection manager is a free app that finds and auto-connects to available hotspots, maximizes battery life by only turning Wi-Fi on & off when needed"...etc.etc.
https://play.google.com/store/apps/details?id=com.att.android.attsmartwifi&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5hdHQuYW5kcm9pZC5hdHRzbWFydHdpZmkiXQ..
+1 for Tasker, but the free version of Llama would easily handle this.
There's also a interesting app called Geotasker, and its free
Sent from my SAMSUNG-SGH-I717 using xda premium
I use Juice Defender Ultimate for this and lots of other things. You can set it to learn your habbits. After a few days it knows that when your on the cell towers around yours house that you use wifi, but never anywhere else. So it begins turning wifi off untill it sees your cell towers again. Lots of other crazy stuff too. I had a semi-aggressive set up going and with listening to slacker too and from work (45-60 min each way) plus FB and such throughout the day on and off, I got over 24 hours. Its worth shot. Tasker does lots of cool stuff too. I just use JDU because its aimed at tailoring battery life to your needs.
andrawer said:
Have you tried the "AT&T Smart Wi-Fi" app as found on the Play market? Not sure if it is what you need or not. Decent ratings.
"AT&T Smart Wi-Fi connection manager is a free app that finds and auto-connects to available hotspots, maximizes battery life by only turning Wi-Fi on & off when needed"...etc.etc.
Click to expand...
Click to collapse
I have been using this, thanks for the idea. It works perfectly.
I just had too many problems with Juice Defender; it was always cutting off my communication when I needed it.

[Q] Help with sync APP

I am not happy with any of the apps that I have used for sync over wireless LAN using CIFS/SMB. What I'm looking for is an app that wakes on white listed LANs and syncs at maximum performance if possible with the option for battery savings. But wake on LAN has always been flaky at best and I understand having a running service waiting for each LAN could be battery issue. I thought maybe waiting for a new WIFI and checking each time it initialize and then service would kick in at that time. Maybe using RSYNC, or CIFS or something else, not sure never done anything like this in code. I have only done a app or two but this will something I can learn from. I haven't done much with internet services so this is why I'm reaching out to the forum. Thanks for any help!

[Q] A way to get around my school blocking almost everything on Wifi?

So just recently, my school re-did their whole Wifi, following this, they restricted access on almost everything, but their home website. I know you can get around this sort of thing using a VPN. However, I've tried a few VPN's and it seems they don't work because the VPN's API isn't availible? I assume this is because I'm running a custom ROM. So I was wondering, since I am running a custom ROM, is their a alternative thats possibly even better than using a VPN? I really can't just use mobile data since I've got a limit per month and its getting to that limit quickly.
Baurblades43 said:
So just recently, my school re-did their whole Wifi, following this, they restricted access on almost everything, but their home website. I know you can get around this sort of thing using a VPN. However, I've tried a few VPN's and it seems they don't work because the VPN's API isn't availible? I assume this is because I'm running a custom ROM. So I was wondering, since I am running a custom ROM, is their a alternative thats possibly even better than using a VPN? I really can't just use mobile data since I've got a limit per month and its getting to that limit quickly.
Click to expand...
Click to collapse
There are quite a few ROMs that still support VPN connections. But honestly, you're in the same boat as most corporate employees.
What most of us do? Use mobile data, wait until we go somewhere with free wi-fi or home.

Categories

Resources