AdguardTeam / AdguardForAndroid

Open bug tracker for Android version of AdGuard.
https://adguard.com/
1.32k stars 90 forks source link

adguard and android 10 issues #3663

Closed patrickdrd closed 3 years ago

patrickdrd commented 3 years ago

hello, I think we need to talk about adguard and android 10, after using adguard for some years on nougat devices, I bought a new one (redmi note 9 pro), running android 10 (and miui 11 of course), I rooted it, I moved certificate to system store with magisk module and started running adguard on it with proxy mode.

Anyway, I have to say that my experience overall with adguard was kind of painful or awful...

first of all, numerous problems on many apps (firstly, there was absolutely no way to run swift backup - with google drive syncing/uploading - without turning ag off, even disabling for the app, I've still had issues, my only working resort was to disable ag for apps and use it only for browsers), images loading amazingly slow or not at all on tapatalk (and maybe viber) (I had to switch to vpn mode in order to make this work), etc

so is there work to be done regarding android 10?

zzebrum commented 3 years ago

@patrickdrd I'm very sorry for the late reply! can you describe a couple of examples step by step so we could try to reproduce problems on our side. Also, debug logs would be appreciated a lot.

patrickdrd commented 3 years ago

I gave you a couple of examples on my first post, you can start by testing swift backup (connect to google drive with a premium account) and try to upload a backup, then you can try sofascrore app as well, with and without adguard, how much time does it take for the matches to load? for me there's a noticeable difference between adguard vpn and adguard proxy, and last but not least, you can try to run tapatalk and open various threads with images, do these load for you?

as I reported above, the only configuration that seems to work for me, for now at least, is switch to vpn (because I didn't want to of course, I'm rooted and I prefer to run AG in proxy mode) and disabling AG for apps (ok, this is not a particular problem because I don't have ads in apps and I'm using adaway for hosts blocking at the same time because of a rather old AG issue, still to be fixed: https://github.com/AdguardTeam/AdguardForAndroid/issues/2977 - one and a half year ago pending!!)

techIndia-hacker commented 3 years ago

Just about redmi if u want to be a pro Android user. Especially root and os modification stuff. No such issues can be observed in my devices (Samsung note 10+, oneplus 8 pro). And yes these are obviously running android 10 for over a year

Chinaski1 commented 3 years ago

@patrickdrd

Hello there! Unfortunately, I have not been able to reproduce your issues. It seems to be caused by a feature of miui 11 firmware.

To troubleshoot this issue, we can try to exam the app logs.

Here's what we need you to do:

  1. Collect the debug log as it's explained here;
  2. Remember the exact time when the issue was reproduced, we will need it to find the corresponding records in the log file;
  3. Additionally, capture the system bug report after reproducing the issue. Here's the instruction;
  4. Send both files to devteam@adguard.com. Mention the Github issue number and the exact time when the issue was reproduced.
Chinaski1 commented 3 years ago

I propose to do the following. We are now actively working on version 4.0. in which there will be a lot of changes, including the filtration engine. If your issue repeats - you open the task again and send us the logs. We will try to figure it out.

patrickdrd commented 2 years ago

so here I am, one year later and https filtering doesn't work with http proxy mode on android 10 (with certificate moved to system store) everything is fine with the exact same settings on my other nougat device(s) or on android 10 with vpn mode that I'm using all this time, but, since I like http proxy a bit more, can you check to see why https filtering doesn't work?

my previous issues look better I guess,

thanks

ameshkov commented 2 years ago

We're going to test the root+proxy mode thoroughly as a part of AG v4.0 major update.

Note, that most of the issues with HTTPS filtering are caused by the way the certificate is moved.

  1. Make sure that you used Magisk module to move the certificate
  2. Magisk should not be "hidden" from the app (and AdGuard specifically) as in this case it does not see the moved certificate.
patrickdrd commented 2 years ago

it was moved with magisk indeed and AG isn't hidden in magisk, I confirm

ameshkov commented 2 years ago

The only possible culprit here is how the certificate was moved. Maybe the module is not compatible with this exact version of Android and Magisk.

techIndia-hacker commented 2 years ago

About magisk module I have some info.

So, the module basically copies the cert file binary from /data/adb and mounts it to /system~/cacerts. Then it writes a few permissions like read only etc and fixes the selinux. The module operation is simple and doesn't need any modification.

But moving certs to system using magisk isn't free from issues, cause upto magisk v23, magisk hide disables the mount for apps those need magisk hide. Eg Google play services and banking apps etc.

So, its best to manually move the compiled certificate from /data to /system, and chmod 644 them. But android 10+ u have read only /system partition. So r6 only way is to modify and add the certificate to system.img using a PC and then flash the modified system.img

Ayan

On Mon, 10 Jan, 2022, 6:20 pm Andrey Meshkov, @.***> wrote:

The only possible culprit here is how the certificate was moved. Maybe the module is not compatible with this exact version of Android and Magisk.

— Reply to this email directly, view it on GitHub https://github.com/AdguardTeam/AdguardForAndroid/issues/3663#issuecomment-1008843590, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN3FHQ4FNTAL6HZS2TFTQFTUVLIX7ANCNFSM4UAUMBXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

patrickdrd commented 2 years ago

only way is to modify and add the certificate to system.img using a PC and then flash the modified system.img

so I made my system r/w using this method: https://forum.xda-developers.com/t/script-android-10-universal-mount-systemrw-superrw-featuring-makerw-read-write.4247311/, and I uninstalled magisk move certificate and I let AG move the certificate to system store, and my problem wasn't resolved, https filtering with http proxy still doesn't work, while it works fine in vpn mode, so this in not the case I think

patrickdrd commented 2 years ago

similar problems reported here: https://www.reddit.com/r/Adguard/comments/kj1sa6/ad_blocking_doesnt_work_local_http_proxy_mode/

please fix guys it's been a year already, I'm a big fan of http proxy and I would make the switch asap, one year with vpn is enough I think :(

techIndia-hacker commented 2 years ago

similar problems reported here: https://www.reddit.com/r/Adguard/comments/kj1sa6/ad_blocking_doesnt_work_local_http_proxy_mode/

please fix guys it's been a year already, I'm a big fan of http proxy and I would make the switch asap, one year with vpn is enough I think :(

Have u disabled ipv6? Otherwise it won't work

patrickdrd commented 2 years ago

thanks a lot @techIndia-hacker, I didn't know, it worked fine now

techIndia-hacker commented 2 years ago

Yeah, Android limitation. Root proxy didn't support ipv6. But the dev team is trying to rework the root proxy mode for adguard v4.0. Let's see what happens

patrickdrd commented 2 years ago

what a mess, I used mobile data today and I got a message from AG that dns blocking couldn't work because of http proxy and ipv6 incompatibility 😨 I had disabled ipv6 in low level settings in AG and it was working previously, I had to switch to vpn mode again 😡