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

[Samsung] Can't uninstall system apps for user 150 (Work Folder) #386

Closed
m4jki opened this issue Sep 21, 2022 · 6 comments
Closed

[Samsung] Can't uninstall system apps for user 150 (Work Folder) #386

m4jki opened this issue Sep 21, 2022 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@m4jki
Copy link

m4jki commented Sep 21, 2022

Application crash when i choose some action but app on phone is uninstalled

ERROR [src/core/utils.rs:228] [Recommended] pm uninstall --user 150 com.samsung.faceservice -> Exception occurred while executing 'uninstall': java.lang.SecurityException: Shell does not have permission to access user 150 com.android.server.am.ActivityManagerService.handleIncomingUser:14170 android.app.ActivityManager.handleIncomingUser:4540 com.android.server.pm.PackageManagerShellCommand.translateUserId:3219 at com.android.server.am.UserController.handleIncomingUser(UserController.java:2511) at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:14170) at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:4540) at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3219) at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:2080) at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:246) 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:29791) 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:9921) 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 314', src/gui/views/list.rs:348:69 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

@m4jki m4jki added the bug Something isn't working label Sep 21, 2022
@0x192
Copy link
Owner

0x192 commented Sep 21, 2022

Yeah unfortunately Samsung is now restricting ADB for the user 150 (secure folder). You can no longer pm uninstall. 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 0x192 changed the title App crash after taking some action [Samsung] Can't uninstall system apps for user 150 (Work Folder) Sep 21, 2022
@0x192 0x192 added this to the 0.6 milestone Sep 22, 2022
@m4jki
Copy link
Author

m4jki commented Sep 22, 2022

Yeah unfortunately Samsung is now restricting ADB for the user 150 (secure folder). You can no longer pm uninstall. 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

I am trying to uninstall the app for user0 but the application also tries for user150 and here I get an error. the app for user0 is successfully uninstalled despite the program crash. it looks like your program trying to uninstall/disable app for both users at once.

edit: i'm really blind :)

image

after disable this option everything works!

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

@tbertels
Copy link

tbertels commented Feb 10, 2023

Still a problem.
Note that it also crashes if I just select user150 in the list.
I'm using the secure folder, maybe it only crashes if the user does use it.

EDIT: the commit above is dated from Nov 20, 2022 and the latest release (0.5.1) is from Jul 3, 2022, so it should be fixed in the future 0.5.2.

2023-02-10 11:35:31 DEBUG [src\core\update.rs:178] Checking for UAD update 2023-02-10 11:35:31 WARN [src\gui\mod.rs:102] Trying to download remote UAD list 2023-02-10 11:35:32 INFO [src\gui\mod.rs:457] ----------------------------------------------------------------- 2023-02-10 11:35:32 INFO [src\gui\mod.rs:458] ANDROID_SDK: 31 | PHONE: samsung SM-G970F 2023-02-10 11:35:32 INFO [src\gui\views\list.rs:141] Custom selection has been successfully imported 2023-02-10 11:35:37 ERROR [src\core\utils.rs:228] [Recommended] pm uninstall --user 150 com.google.android.gm -> Exception occurred while executing 'uninstall': java.lang.SecurityException: Shell does not have permission to access user 150 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:29818) 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:9923) at android.os.Binder.execTransactInternal(Binder.java:1220) at android.os.Binder.execTransact(Binder.java:1179) 2023-02-10 11:35:39 INFO [src\core\utils.rs:222] [Recommended] pm uninstall --user 0 com.google.android.gm -> Success

@MylesGit
Copy link

Yeah unfortunately Samsung is now restricting ADB for the user 150 (secure folder). You can no longer pm uninstall. 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

I am trying to uninstall the app for user0 but the application also tries for user150 and here I get an error. the app for user0 is successfully uninstalled despite the program crash. it looks like your program trying to uninstall/disable app for both users at once.

edit: i'm really blind :)

image

after disable this option everything works!

I was having the same exact issue. App would crash on my linux system everytime I tried to uninstall something. Disabling the "Affect all other users" has fixed it for me.

@john2545
Copy link

john2545 commented Mar 22, 2024

Same happened for me. The 'Non-persistent settings' were so frustrating.
I thought that would just mean 'closing app doesn't save the setting' but it resets every single time i press refresh button. Every noob who use work folder like you and me would face the same issue.
Now i get that the button is for reconnecting adb, not refreshing app list tho.
I think the dev should explicitly notice user like "this is reconnect adb button, you'll lose current UAD settings."

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

5 participants