-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE] Work Profile apps are not shown in Android 12 even enabling in Preferences #1280
Comments
The main cause of this issue is https://developer.android.com/training/package-visibility I am playing around with that on my end, and I wonder if we could either: Use the <queries>
<intent>
<action android:name="android.intent.action.ALL_APPS"/> <!-- I am unsure of what to actually use here. I'm not even 100% sure if this something that would help us here -->
</intent>
</queries> along with Intent intent = new Intent(Intent.ACTION_ALL_APPS); to get all the installed applications, or (instert another way here... 😆 ). Worst-case scenario is doing something like
which is very clearly not ideal. I think however that a possible (not spiked this yet) approach is to use as suggested in the code already, try {
Process su = Runtime.getRuntime().exec("su -c pm list packages --user 0");
installed_packages = new BufferedReader(new InputStreamReader(su.getInputStream()));
}
etc... |
I've another idea but that requires user to install AfWall+ to the other profile (which I believe is not a job that makes the life harder but easy). I believe this would be efficient in every way possible. After installing AfWall+ to the other profile (workProfile), apps in tht profile will then become visible. Now, your only job is that you should find and link AfWall+ from workProfile with the mainProfile in order for them to work together. The same has to be applied to multiple users as well. You've root access, you can do it. |
Correct me if I'm wrong, but you're describing inter-process communications here?
Using the steps you've described wouldn't help here as we need to get the package/application info so that we can check if an application has networking permissions. This can only be done using the function I described above. |
I've very little idea about Android Apps, learning to develop apps BTW. But what I meant to say was AfWall+ if installed on a workProfile, it can see the workProfile installed apps. |
@pixincreate I think you are looking for this. #1249 (comment) This works by reading the saved configuration from the secondary (or work profile) user's AFWall+ data directory and applying those rules directly. |
This actually never worked for me. All that I got was an elf indicating that the rules cannot be applied. |
I was able to replicate this error. Made some edits to the script to resolve the errors seen while applying rules. Perhaps it would work for you too. [Link] p.s: If it still doesn't work, looking at the logs with a logcat app, like Logcat Reader might help figure out the problem. You'd need to filter by Tag 'AFWall' so as not to get overwhelmed. |
Latest compiled APK (BETA2) https://www.dropbox.com/s/jhc2j606s17idb5/AFWall_3.5.3_BETA2.apk?dl=0 |
Duplicate of #1249 |
Describe the bug
Work profile apps are not shown even after enabling allowance of those apps in Android 12
Firewall Logs
IPv4rules.log
Smartphone (please complete the following information):
Additional context
When work profile exist, Afwall+ restrict internet access to them but doesn't allow apps to show there
The text was updated successfully, but these errors were encountered: