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

UAD crash when interacting with a work Profile #377

Closed
shiftykey opened this issue Sep 8, 2022 · 5 comments
Closed

UAD crash when interacting with a work Profile #377

shiftykey opened this issue Sep 8, 2022 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@shiftykey
Copy link

Describe the bug
When you attempt to run the app with a work profile (Which has several restrictions on it) it causes a crash:

022-09-08 15:09:31 ERROR [src/core/utils.rs:228] [Recommended] pm uninstall --user 10 com.vzw.apnlib -> 
Exception occurred while executing 'uninstall':
java.lang.SecurityException: Shell does not have permission to access user 10
 com.android.server.am.ActivityManagerService.handleIncomingUser:14180 android.app.ActivityManager.handleIncomingUser:4540 com.android.server.pm.PackageManagerShellCommand.translateUserId:3228 
        at com.android.server.am.UserController.handleIncomingUser(UserController.java:2511)
        at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:14180)
        at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:4540)
        at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3228)
        at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:2089)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:248)
        at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
        at android.os.ShellCommand.exec(ShellCommand.java:38)
        at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:29803)
        at android.os.Binder.shellCommand(Binder.java:986)
        at android.os.Binder.onTransact(Binder.java:860)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:5411)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:9925)
        at android.os.Binder.execTransactInternal(Binder.java:1220)
        at android.os.Binder.execTransact(Binder.java:1179)
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 433', src/gui/views/list.rs:348:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrack

I identified it as the google work profile via:

me@ME-MacBook-Air ~ % adb shell pm list users
Users:
        UserInfo{0:me:c13} running
        UserInfo{10:Work profile:10101030} running

Note: I don't, nor did i ever select the other user in the UAD UI.

@shiftykey shiftykey added the bug Something isn't working label Sep 8, 2022
@mklopp
Copy link

mklopp commented Sep 21, 2022

I ran in to the same issue. I also have a work profile activated and I got the same crash. I also have user 0 selected and not user 10.

@shiftykey I just found out that there is a setting that disables that all useres are affected. Probably shouldn't crash the whole application though.

@0x192
Copy link
Owner

0x192 commented Sep 22, 2022

Same reason as #386

@mklopp @shiftykey
What are your phone model (and Android version)?

Does it work if you switch to disable mode in the settings?

UAD should obviously not crash when adb crashes. I'll try to reproduce the crash by triggering an ADB crash

@0x192
Copy link
Owner

0x192 commented Sep 26, 2022

I was not able to reproduce the program crash :/

I triggered the same kind of ADB error and UAD didn't crash (as expected).

@0x192 0x192 added this to the 0.6 milestone Nov 20, 2022
0x192 added a commit that referenced this issue Nov 20, 2022
On recent Android devices, you can't interact with the user of the work profile.

Closes #413, #386, #377
@0x192 0x192 closed this as completed Nov 20, 2022
@0x192 0x192 changed the title Google Work Profile causes crashing UAD crash when interacting with a work Profile Nov 20, 2022
@0x192
Copy link
Owner

0x192 commented Nov 20, 2022

I finally understood what was happening. The fix has been merged (#448). The fix will not be backported in the current v0.5 branch but a new release (v0.6) is coming soon! 🙂

In the meantime, as a workaround, you can disable the multi users setting:

image

@0x192 0x192 pinned this issue Nov 20, 2022
Repository owner deleted a comment from mklopp Nov 20, 2022
@henkiejan1
Copy link

Sadly, even when i disable Affect all the users of the phone and i have user10 selected UAD crashes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants