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
Multi user (work-profile) support #20
Comments
Do both show in SD Maid? |
It is not showing in SD Maid either. Only one app is showing up, and I'm not sure which one it is. I'm using SD Maid v5.4.0 Beta |
Should I open a new ticket for SD Maid too on this issue? |
Which app shows 2? How do you know there should be 2? |
How do I know? I'm the one who has installed the app in both profiles. And it is not just this app. There are other apps too that have been installed in both profiles. But only one installation is shown in both SD Maid and Permissions Overview. Technically speaking, an app is installed only once in a device. Any other 'installation', be it in Work Profile or a Multi-User environment, is just creation of a Data folder for that user, and not a second installation as such. But when using AppControl, all such 'installations' must show up seperately. |
I'm not sure if I would consider work profile support as in scope. I'm currently installing shelter to see what is possible. Not sure if root support is something I'd consider for this app. |
When installed in the main profile it sees all the apps in the main profile, and if installed in the work profile only the ones in the work profile. Screenshot from 2022-07-17 20-05-13 As far as I can see, I could detect that an app has a work profile, but that's about it. For anything else we'd need to dive much deeper and do the same thing as Shelter does (if this is even possible in parallel with Shelter). So listing apps from other profiles is out of scope. I don't think this is a strong enough use-case to warrant adding support for using root. |
The app is seeing all the packages (apps) installed from the main profile. This includes all apps installed in the Work Profile, and also potentially apps installed in multi-users (I haven't tested Multi-Users yet).
Apps installed in Work Profile or Multi-User have very limited access, so they can't show apps from the main profile or other profiles. |
The app sees the packages that are visible in the profile it is in.
Work profile is just multi-user with a fancy name. I've checked the paths on a rooted device and the data for the main profile was
" It is only a matter of " 😁 If there is no API for it, then without root it can't really be done. I've checked all APIs I could think of, and there was none that could give me this information. If you know more, please tell me.
SD Maid does very elaborate queries to get even apps that are not really installed (out of scope for this app). The app that was only in the work profile was still visible to SD Maid. It was not visible as "work profile app", just as "it's not really installed, but still somehow here". When SD Maid asked the system to uninstall it, the system probably said "what app?" as from the main profile's perspective it is not installed.
Basically works like issuing |
Reopen as we have a chance using the |
Just a question, that API does exist on all Android version or just newer version? |
According to the docs, since API21: Code is already in the current builds. Should work on your Android version if it doesn't crash already. |
For apps installed in multiple profiles, can you not list all of them in the Apps Tab? Those from other profiles will have the briefcase badge. There will also be a separate filter for such apps as discussed. I'll open a new ticket for it. |
There is only one app installed, work profiles are still the same app (same APK version), just different data folders. Not super easy as I also identify every app by their package name, which isn't unique anymore if I want to display normal+work profile as they still have the same pkg name 🤔 Not sure if I need to split the UI for each too, might be more work than just "work profile badge" because work profile apps have less information than normal apps, e.g. |
You already have a way to find apps installed in other profiles, isn't it? Can't the output of that be used to list these in the Apps Tab? |
We have different amounts of information depending what app it is or rather what source the data comes from. Currently it doesn't feel like listing them as extra entry in the list is useful enough to warrant the additional code complexity. Can you elaborate on your use-case? |
The main use case for this is to be able to see (from the Main Profile) all apps installed in the device. Work Profile and Multi-Users (there is a distinct advantage of a Work Profile over Multi-Users and vice-versa, although they are simply new users 10, 11, 12, etc.) support independent installations, both via Store apps and via side-loading. This app, being one about permissions and information in one place, would give the user all the info he needs in one place. |
If an app is installed in both the Main Profile and the Work Profile, only one of them is shown in the Apps tab.
In the attached screenshot, you'll see that the File Manager is showing up only once, as being installed by Shelter app. So this app is from the Work Profile.
I have the same app installed in the main profile too using SAI. It is not showing up.
Screenshot_2022-07-17-20-15-12-95_ce34de6323cfaeb7a2880d42987990b1
The text was updated successfully, but these errors were encountered: