Universal-Debloater-Alliance / universal-android-debloater-next-generation

Cross-platform GUI written in Rust using ADB to debloat non-rooted Android devices. Improve your privacy, the security and battery life of your device.
GNU General Public License v3.0
2.51k stars 88 forks source link

bug(uninstalling): can't uninstall apps on legacy Android versions, even when rooted #401

Closed Lost-Entrepreneur439 closed 1 month ago

Lost-Entrepreneur439 commented 7 months ago

Describe the bug

Nothing appears to happen when uninstalling apps on older Android versions, I am unsure of the exact versions affected, however this issue does occur on my Motorola Milestone 3 (model number XT860, codename umts_solana) running CyanogenMod 10.1 (Android 4.2.2). In the wiki, it mentions you need root for Android Jellybean and earlier, but I'm rooted and still can't uninstall anything.

Expected behavior

I'd expect UAD to actually uninstall the application.

You have a solution?

No response

Provide logs

UAD_20240402.log

Acknowledgements

Tsumetaayz commented 7 months ago

The program uses the --user option to uninstall apps, Jelly Bean doesn't understand the "user" as it was not existent back then. a solution would be an option for rooted devices in the program that removes the --user key to remove it with root privileges. example: ADB shell pm uninstall "com.package.name" instead of ADB shell pm uninstall --user 0 "com.package.name", which JB can't run.

Frigyes06 commented 7 months ago

We could add a setting to remove the user tag, or detect android version and do it automatically.

lavafroth commented 2 months ago

This behavior does not seem to be triggered by the --user flag (see the logs) since we check for the android sdk. This xda thread mentions pm block. Our code in sync.rs is deferring to pm uninstall instead of pm block for SDK versions below 19 (@Lost-Entrepreneur439 has a device with SDK version 17). I'll follow up with a PR tomorrow.

Tsumetaayz commented 2 months ago

This behavior does not seem to be triggered by the --user flag (see the logs) since we check for the android sdk. This xda thread mentions pm block. Our code in sync.rs is deferring to pm uninstall instead of pm block for SDK versions below 19 (@Lost-Entrepreneur439 has a device with SDK version 17). I'll follow up with a PR tomorrow.

After doing another check at logs, the issue isnt related exactly the --user flag, which doesnt exist in older versions of Android. Logs are telling that it ADB Shell does not have Root permissions to uninstall these apps from the OS.

Unless he gets ADB Shell root access, the debloat is gonna fail (unless you disable them instead of uninstalling).