Benjamin-Loison / android

0 stars 0 forks source link

Uninstall apps *Not installed for this user* #84

Open Benjamin-Loison opened 3 weeks ago

Benjamin-Loison commented 3 weeks ago

image

image

image

image

image

image

Could try with adb.

Benjamin-Loison commented 3 weeks ago
adb uninstall com.carrefour.fid.android
Success

is correctly removed in the list too.

Source: the Stack Overflow answer 25927723

Benjamin-Loison commented 3 weeks ago

image

image

image

image

image

image

image

image

Benjamin-Loison commented 3 weeks ago
adb shell pm list users
Users:
    UserInfo{0:Benjamin Loison:4c13} running
    UserInfo{10:CENSORED:410}
    UserInfo{15:My guest user:410}

Source: the Stack Overflow question 37495126

Does 4c13 mean administrator and 410 regular users?

Benjamin-Loison commented 3 weeks ago
adb uninstall -h
Error: Unknown option: -h
adb uninstall --help
Error: Unknown option: --help
Benjamin-Loison commented 3 weeks ago
adb uninstall --user 0 openfoodfacts.github.scrachx.openfood
Success

Source: the Stack Overflow answer 62834429

removes only my user entry.

Benjamin-Loison commented 3 weeks ago
adb uninstall --user 10 openfoodfacts.github.scrachx.openfood 
Failure [not installed for 10]
adb uninstall --user 15 openfoodfacts.github.scrachx.openfood
Failure [not installed for 15]
adb uninstall openfoodfacts.github.scrachx.openfood
Failure [DELETE_FAILED_INTERNAL_ERROR]

Graphically still unable to remove the other user entry.

Benjamin-Loison commented 3 weeks ago

Searching DuckDuckGo for "adb uninstall" "Failure [DELETE_FAILED_INTERNAL_ERROR]".

Benjamin-Loison commented 3 weeks ago
adb shell whoami
shell

Still have the same error after:

adb root
restarting adbd as root
Benjamin-Loison commented 3 weeks ago
adb uninstall --user 0 openfoodfacts.github.scrachx.openfood
Failure [not installed for 0]
adb uninstall --user 'CENSORED' openfoodfacts.github.scrachx.openfood 
Exception occurred while executing 'uninstall':
java.lang.IllegalArgumentException: Bad user number: CENSORED
    at android.os.UserHandle.parseUserArg(UserHandle.java:550)
    at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:2466)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:283)
    at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
    at android.os.ShellCommand.exec(ShellCommand.java:38)
    at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6609)
    at android.os.Binder.shellCommand(Binder.java:1230)
    at android.os.Binder.onTransact(Binder.java:1043)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4617)
    at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6593)
    at android.os.Binder.execTransactInternal(Binder.java:1505)
    at android.os.Binder.execTransact(Binder.java:1444)

Same error without quotes.

for user in `seq 0 30`
do
    adb uninstall --user $user openfoodfacts.github.scrachx.openfood
done
Failure [not installed for 0]
Failure [user 1 doesn't exist]
Failure [user 2 doesn't exist]
Failure [user 3 doesn't exist]
Failure [user 4 doesn't exist]
Failure [user 5 doesn't exist]
Failure [user 6 doesn't exist]
Failure [user 7 doesn't exist]
Failure [user 8 doesn't exist]
Failure [user 9 doesn't exist]
Failure [not installed for 10]
Failure [user 11 doesn't exist]
Failure [user 12 doesn't exist]
Failure [user 13 doesn't exist]
Failure [user 14 doesn't exist]
Failure [not installed for 15]
Failure [user 16 doesn't exist]
Failure [user 17 doesn't exist]
Failure [user 18 doesn't exist]
Failure [user 19 doesn't exist]
Failure [user 20 doesn't exist]
Failure [user 21 doesn't exist]
Failure [user 22 doesn't exist]
Failure [user 23 doesn't exist]
Failure [user 24 doesn't exist]
Failure [user 25 doesn't exist]
Failure [user 26 doesn't exist]
Failure [user 27 doesn't exist]
Failure [user 28 doesn't exist]
Failure [user 29 doesn't exist]
Failure [user 30 doesn't exist]
Benjamin-Loison commented 3 weeks ago
adb uninstall -k --user 0 openfoodfacts.github.scrachx.openfood
The -k option uninstalls the application while retaining the data/cache.
At the moment, there is no way to remove the remaining data.
You will have to reinstall the application with the same signature, and fully uninstall it.
If you truly wish to continue, execute 'adb shell cmd package uninstall -k'.

Source: the Stack Overflow answer 62834429