universal-android-debloater icon indicating copy to clipboard operation
universal-android-debloater copied to clipboard

Google Work Profile causes crashing

Open shiftykey opened this issue 3 years ago • 3 comments

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 avatar Sep 08 '22 19:09 shiftykey

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.

mklopp avatar Sep 21 '22 12:09 mklopp

@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.

mklopp avatar Sep 21 '22 12:09 mklopp

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 avatar Sep 22 '22 00:09 0x192

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 avatar Sep 26 '22 22:09 0x192

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! :slightly_smiling_face:

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

image

0x192 avatar Nov 20 '22 01:11 0x192

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

henkiejan1 avatar Dec 10 '22 14:12 henkiejan1