-
Notifications
You must be signed in to change notification settings - Fork 453
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] Unable to find packages of other users. (multiuser) #1192
Comments
Afwall is lacking support of real multiuser :( it does support work profile but does not show app of other users (other than work profile) testing on android 11 (lineage) |
The problem is here https://github.com/ukanth/afwall/blob/beta/app/src/main/java/dev/ukanth/ufirewall/Api.java#L1402 and stems from the fact the Android API (as available to apps) does not let you get all users. One way to solve this is to call I can code this up if you're willing to accept it, @ukanth ? |
To be honest, I think it would be simplest to rip out all the existing code for work profiles and just list all packages for all users together in the main UI. Output of
This suggests the uid for app base uid X with user Y is just Y * 100000 + X. Not sure if this is always the case, but if not then we can also iterate through Thoughts @ukanth ? |
|
Please make a PR. I will look into it. |
@ukanth Are you happy for me to replace (i.e. delete) the existing code relating to work profiles? It adds complexity to the logic, and I do not have the feature on my own phone so I cannot test it. If I understand correctly work profiles should "just work" if proper multiuser support is implemented, since work profiles are just implemented as another user. |
I have a basic version up and the basic iptables functionality works, there is a big UI problem. For applications not installed on the user AFWall is running as, there is no simple way to get (1) the application common name (2) the application icon, because these two things are done through the Android API - which as mentioned doesn't allow access to other users. I've done a web search but it seems:
If anyone has some tips, such as other apps which have similar functionality, please let me know. |
The problem is solved by copying what LSPosed does, with some slight differences as AFWall only has su/libsu and cannot rely on Magisk Module functionality like LSPosed. See PR for details. |
Describe the bug
Unable to find packages of other users from PackageManager either with or without
Enable multi-user support
. Expected showing 2 and more for apps like google play store and unique apps of some secondary users.Firewall Logs
N/A (not related)
Smartphone (please complete the following information):
Additional context
I tried the following steps with
adb
The following only can get packages of primary user, but none from the others:
Find user id here:
And apply here can found packages of that user:
I can find people use
pm list packages
worked in the past. Is that changed on android 11?The text was updated successfully, but these errors were encountered: