Skip to content
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

[Root Install] Add support for multiple profiles #457

Open
YuruiHong opened this issue Sep 29, 2023 · 2 comments
Open

[Root Install] Add support for multiple profiles #457

YuruiHong opened this issue Sep 29, 2023 · 2 comments

Comments

@YuruiHong
Copy link

I use Insular to manage my work profile and when I use APKUpdater to update apps outside, I find them automatically installed into the work profile. These include stock apps including Play Store, which are difficult to remove. Is it possible to stop the installation? I think that updating within the profile where APKUpdater is located sounds more reasonable.

@rumboalla
Copy link
Owner

I've never used Insular, so not sure why would this happen. If anyone has more information or knows how to avoid this please let me know.

@YuruiHong
Copy link
Author

YuruiHong commented Oct 5, 2023

I've never used Insular, so not sure why would this happen. If anyone has more information or knows how to avoid this please let me know.

Frankly speaking I know nothing about Android development, but I noticed that you are using pm commands for root installation:

fun rootInstall(file: File): Boolean {
val res = Shell.Pool.SU.run("pm install -r ${file.absolutePath}") == 0
file.delete()
return res
}

The work profile is treated as "user", which is 11 as for me. When I use adb to perform installation, I always specify the target user, which is something like:

pm install --user USER_ID PATH_TO_APK

Otherwise the apk will be installed for all users ("0" as for default profile and "11" as for work profile). Perhaps that is the case.

@rumboalla rumboalla changed the title Updated apps installed to work profile [Root Install] Add support for multiple profiles Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants