AdguardForAndroid
AdguardForAndroid copied to clipboard
Battery Drain
Please answer the following questions for yourself before submitting an issue.
- [X] I am running the latest version
- [X] I checked the documentation and found no answer
- [X] I checked to make sure that this issue has not already been filed
AdGuard version
4.2.71
Environment
- OS:Android 13
- Device:Note 11 Pro 5G
- Firmware:MIUI 14
Root access
- [X] Yes, I have it.
What filters do you have enabled?
No response
What Stealth Mode options do you have enabled?
No response
Issue Details
I have observed over some period a huge battery drain. It can take upto 50% of my SOT for a period of 24 hrs if I use auto proxy mode. Currently it sits at 28%. Version 3 never crossed the 5% threshold for same period. Inside the apps statistics it's even worse as it spikes randomly especially if you manually check for update.
Expected Behavior
It shouldn't be draining battery. And the statistics is way off.
Actual Behavior
Battery statistics ib the app and android battery estimates are just beyond normal. Huge battery drain.
Screenshots
Additional Information
No response
If an app is requesting a lot of ads, it will drain battery that android will attribute to Adguard. Make sure you don't have an app, like YouTube constantly requesting ads or something.
If an app is requesting a lot of ads, it will drain battery that android will attribute to Adguard. Make sure you don't have an app, like YouTube constantly requesting ads or something.
Same problem here, on versions 3.#.# not that much battery drain but i check issues sometimes none talk about it, i didnt open issue about it.
Same usage but the drain wasn't noticeable. Even earlier version 4 was better amid the constant restarts
@AlgorithmOfGithub @loca-lhost could you be more specific about what apps you usually use? Does this happen if the phone is in sleep mode?
@loca-lhost there are some issues with automatic proxy as of now in the latest nightly versions which results in connection getting lost and some apps gets stuck while doing some operations like whatsapp backup which triggers at 2AM, truecaller/whatsapp contact sync.
I would suggest to install Better battery stats (root)- either stable or the xda edition (free) and observe the apps which are holding partial wakelocks and firing more than expected alarms in their respective tabs. I have observed whenever this battery drain happens in automatic proxy it's either some app with numerous entries with some "job sync" wakelock or "overflow" wakelock.
This way you will have a much better idea of which app is actually causing the drain.
It's also entirely possible that some other app is responsible for this. And since you're already on root I would suggest forcing deepsleep using some app and also monitoring whether deepsleep is working or not.
@loca-lhost @AlgorithmOfGithub can you also export your settings and send them to [email protected]? Please include issue number 4960 in your email It would be good to understand what your settings are and observe the power consumption with your settings
@AlgorithmOfGithub @loca-lhost any news? Can you also clarify, is this problem recurring with VPN mode?
@maxikuzmin Hi, sorry for late answer. Let me answer fastly your questions. Note: all i test on new and old phones (huawei phones with custom rom and apps) 1-before adguard issue It kept draining the battery. so I researched the issues like; huawei android launcher, huawei system services, system interface. sometimes problem updates but when i check adguard statistics there is so much requests(like clear statistics after that 6-10k requests in 15-30 minutes). most of the requests came from DNS filter but i didnt find which app doing that. so i tried off 'Route traffic through Adguard' of app(huawei android launcher). Battery usage of the app started to decrease. also, if you try it on a slightly old and slow phone unroute the app you will see that the app runs smoother and faster. so question is most applications including system applications are route through to AdGuard maybe conflict eachother cause you cant optimized all apps around the world. I dont know actually. (i have not using constintly requesting app like youtube) 2-tried with custom adguard settings 3-issue on vpn mode and no root for me 4-how i can test i dont know but same phone just updated 3.#.# to 4.#.#. Battery usage increased. i didnt see on adguard statistics but phone battery statistics showed me it. (if i cant explain pls write, sorry for bad english)
It quit stable in vpn and it hovers around 20 percent now. In auto proxy it goes beyond 30 percent
@loca-lhost do you have a Huawei too?
Xiaomi
@loca-lhost @AlgorithmOfGithub @Rtizer-9 does this repeat with Local VPN mode?
@maxikuzmin as far as I can recall, I think it does. At the moment I'm not using VPN mode because obviously why not "root proxy" when you have it and also vpn mode shuts down automatically a lot overnight.
@maxikuzmin , for me work on local vpn, the issue persist with last nightly and beta versions, i dont know how it works but maybe the issue is not about mode. I read that rewriting every line of code on 'total reengineering' that you wrote about version 4.0. What did change ?
I think that this is somehow related to that doh using that stale connection for too long bug. It's not exactly ag perhaps that drains the battery but the apps that get stuck like I mentioned above. I can see lots and lots of entries with "job" and Android wakeup alarms with the most being "job.deadline" intent.
@Rtizer-9 @loca-lhost @AlgorithmOfGithub in 3 days of using AdGuard I haven't seen this problem. But I tested on Pixel 5 with Android 14, maybe the problem is in the system. Could you please send your logs? I hope you have Debug mode enabled :) Mail for sending logs is the same [email protected] don't forget to specify issue number 4960 Let's see if we can figure out the problem
I'm using this whole setup with Wireguard kernel mode so I'm not really sure what's exactly causing the problem and if it would be of any use to you.
To solve the problem I'm using persistent keep alive in both ag and Wireguard (I thought this would stop frequent disconnection and keep the connection alive) and I'm not seeing any battery drain since many days.
PS: I'm on Android 13 not 14.
@loca-lhost @AlgorithmOfGithub do you still continue to have severe battery drain? @AlgorithmOfGithub have you now disabled Huawei Android filtering? Has the battery consumption become less?
On automatic proxy it still drains. Vpn mode is tolerable
@maxikuzmin, 1-on my side, when I disable the redirect some Huawei applications on Adguard, battery consumption decreases.(vpn mode) 2-I have to use an old Huawei phone for a certain time, and the information I will transfer will not be healthy. cause battery not good. Note: information that i transferred before for new huawei phone (huawei nova 10 pro (android))
@AlgorithmOfGithub @loca-lhost @Rtizer-9 I've been watching my device for a long time, but the problem has never recurred. It may depend on the configuration, or some apps that may not have internet access, and other factors. Could you please observe Recent activity? Maybe some apps are making a lot of requests and consuming power
I'm also not having any issues for the past few weeks.
@AlgorithmOfGithub @loca-lhost any news?
It's better now. Been a while since I used http proxy. Using vpn mode now.
@maxikuzmin
Hi, i removed some apps from phone like huawei ai which working back that i dont need, battery usage down but adguard app usage didnt change. Maybe problem about my settings or usage of phone cause none talk about it until know so no any news
@AlgorithmOfGithub @loca-lhost
It may depend on the configuration, or some apps that may not have internet access, and other factors. Could you please observe Recent activity? Maybe some apps are making a lot of requests and consuming power
what about it?
@AlgorithmOfGithub @loca-lhost
It may depend on the configuration, or some apps that may not have internet access, and other factors. Could you please observe Recent activity? Maybe some apps are making a lot of requests and consuming power
what about it?
There is so much "maybe" what you think, like i said still so much using battery with default config on it even new huawei phone.
@AlgorithmOfGithub this is one theory why there may be increased battery consumption. If we can determine if there are apps with more requests, we can figure out how to solve the problem. Otherwise, it's pretty hard for us to figure out the problem without understanding the causes and steps to reproduce. Unfortunately, this problem is not recurring on our end. It is likely that the problem could be in the "system" apps from the device manufacturer that are installed by default
@maxikuzmin, if there is a problem, probably other users will notice this too with updates. Thanks for handle, i will send the data from a more stable phone.
@AlgorithmOfGithub how are your observations? Are you seeing a large amount of requests from any applications?