adguardcert: adguard cert does not work with work profile

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

AdGuard version

4.1

Environment

- OS: Android 12
- Device: Xperia 5 II
- Firmware: Latest

Root access

  • Yes, I have it.

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 .0

Expected 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

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 2
  • Comments: 19

Most upvoted comments

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/