Open terrytw opened 1 year ago
@terrytw Hi! Please check if the issue persists on the latest nightly version. We have made some tweaks to the certificates installation flow recently.
Dear Diana,
Can you please confirm which verison of adguardcert module should I be using in combination with the lastest nightly Adguard Android? Should I use v2.0-beta4?
@terrytw Yes, please use this version
@Versty Dear Diana,
I have tried the latest nightly and adguardcert 2.0 beta4, and the problem persists.
If it helps, you can have the dev try https://play.google.com/store/apps/details?id=com.oasisfeng.island&hl=en_US on your test devices to create work profile and see for yourself.
The issue is actually quite straight forward, basically:
I have no idea how the intermediate cert schematic works. I hope you guys can figure out a way to make it work.
For now I manually move cert from user 0's user store to user 10's user store, and use a modified https://github.com/ngorskikh/adguardcert (cp
instead of mv
) to address the issue.
@terrytw At this point, certificates work in pair. If one of them is in the system store, the second one must be in the user store for correct HTTPS filtering.
adguardcert module only copies one cert into the system store.
Therefore, this behaviour is intended.
@Versty Yes, I know it is intended, which creates a legitimate problem: https filtering does not work in work profile.
@terrytw We have discussed this issue with developers and transferred it to the appropriate repository.
@Versty Dear Diana, any update? I saw that you assigned someone then removed the assignment later. Not asking any ETA, just want to know whether this is still being worked on.
This is still a problem but I found a workaround. You need root.
Yes I have figured it out as well, thank you for sharing anyway. Problem is that after Android 11, even with root permission you cannot write to system partition. I have modified movecert module myself to achieve this. It is just kinda disappointing that the devs just ignored this.
@terrytw please share the modified module. It may help people with same problem. and I agree, it's disappointing we still don't have fix from Adguard team. Work profile is getting more and more popular and this will affect more and more people. On Android 10 the above method worked.
I was going to but it is rather cumbersome. Oh well here it goes movecert-1.9-new.zip You will need to modify post-fs-data.sh because work profile user ID can be any number, for you it is 999 for me it is 10. Also since you cannot install cert to work profile directly, you will need to install it in main profile and move it from /data/misc/user/0/cacerts-added/ to /data/misc/user/10(or whatever you work profile user ID is)/cacerts-added/
There's also another problem that needs looking into by the devs. Adguard from main profile does not detect apps in the work profile, therefore excluding apps on the work profile from protection is impossible. Most of us uses work profile to sandbox dangerous intrusive apps like Facebook or Instagram and these works with default settings, but this may be a big problem in the future.
While using default VPN connection way maybe two Adguards can work together, but I am using automatic proxy mode with Root, so real 3rd party VPN can work with Adguard too.
I was going to but it is rather cumbersome. Oh well here it goes movecert-1.9-new.zip You will need to modify post-fs-data.sh because work profile user ID can be any number, for you it is 999 for me it is 10. Also since you cannot install cert to work profile directly, you will need to install it in main profile and move it from /data/misc/user/0/cacerts-added/ to /data/misc/user/10(or whatever you work profile user ID is)/cacerts-added/
Thanks for the module. I've so I've tried this and got the cert to successfully copied over. After reboot, there was also a notification saying a new system cert was installed. BUT, how do I enable HTTPS filtering in Work profile Adguard? I still saw in Adguard saying HTTPS filtering is not enable and to install a cert. Any idea what is the next step?
You will need to install 2 adguard, one for main profile one for work profile.
Yeah, I meant the work Adguard is showing that HTTPS filtering is not working.
For latest adguard, you need to make sure that the intermediate cert is still in user store while the other cert is in system store.
Yes, they are in the right stores. But my work profile Adguard still doesn't pick up the certs for HTTPS filtering in VPN mode, and proxy mode simply block all connections =<
You have to be doing something wrong. I have it set in auto proxy mode (ROOT) and HTTPS filtering works on both profiles with certs moved to stores.
EDIT:: If you are using proxy root mode then only ONE AdGuard is required, on the main profile.
Finally I've got Adguard to block ads on both profiles in Proxy (Root) Mode, but I'm running into a weird issue when Instagram and Twitter on my Work Profile simply don't load anything/ profiles. These apps work just fine in Main profile. The issue is only present when Adguard is On. Anyone got an idea on this?
Please answer the following questions for yourself before submitting an issue.
AdGuard version
4.1
Environment
Root access
What filters do you have enabled?
No response
What Stealth Mode options do you have enabled?
No response
Issue Details
The adguard cert seems to only move the last cert to system store.
This leaves a problem, if someone enables work profile, there will be 2 certs, either both in
/data/misc/user/0/cacerts-added
, or in/data/misc/user/0/cacerts-added
and/data/misc/user/10/cacerts-added
respectively and adguard only seems to move one of them to the system store.P.S. If both of them are in
/data/misc/user/0/cacerts-added
, one of them will end with .1 instead of .0Expected Behavior
Both regular user (0) and work profile user can have certificates in the system store.
Actual Behavior
For regular user(0) and work profile user, only one of them can have certificate in system store.
Screenshots
Screenshot 1:
Additional Information
No response