Open My1 opened 5 months ago
good catch & even better diagnostic @My1. I'll look into this.
thanks no problem, I have used my decent share of adb and I basically just traced back the code from the app manager java file (which was pretty easy thanks to github's auto tracer), because I knew somewhere it has to invoke adb and then I was able to just test stuff out via the good old terminal
According to this section https://github.com/ibilux/MobyDroid/blob/master/src/com/hq/mobydroid/device/TaskPackageMangerList.java#L41
the app manager invokes
adb shell pm list packages
however that command basically fails completely when you have multiple users like Samsung's Secure Folder or an Android Enterprise Work Profile.
users can be pulled like this:
now when you use
adb shell pm list packages --user 0
to only query the normal user, it works fine in the shell.so you could query who the current user is with
adb shell am get-current-user
and only list that user's app or invoke for each user on its own.