0x192 / universal-android-debloater

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
15.28k stars 813 forks source link

Wiko U Feel — Debloat has no effect #89

Closed Booteille closed 1 year ago

Booteille commented 2 years ago

Describe the bug I used the 0.3.0 version of the app to try to debloat a Wiko U Feel but nothing has changed on the phone: Apps are still activated on the phone. Though, UAD detects those apps as deactivated.

I also tried to uninstall those apps through UAD: same behavior.

Expected behavior I expected apps I choosed to deactivate to be disabled after the debloat.

You have a solution? What to do to fix the issue.

UAD log uad.log

0x192 commented 2 years ago

I got my old Android KitKat phone back and I think I may finally understand the issue here. My guess is that ADB on Android Lollipop has the same crappy errors handling as on Android KitKat.

ADB commands can return the 0 exit code even if there is an error. ADB doesn't check if the package exists. It does not return any error if you try to pm block a non-existent package. Some commands are even killed by ADB before finishing and UAD can't catch the output. It seems to be the (questionable) behavior when the privileges are not high enough. https://github.com/0x192/universal-android-debloater/issues/78#issuecomment-1015050094

In a nutshell, pm disable-user --user <user> <package> probably also needs root on Android Lollipop (5.x / SDK API 21).

The question is why is there no pm uninstall --user <user> <package> in the log. It may be related to #78 (Weren't the uninstall/remove buttons greyed?)

Let's be sure what works without root and what doesn't. Considering you still have com.android.dreams.basic, open an interactive adb shell and gives the output of each command:

adb shell # open an interactive shell
adb shell dumpsys package com.android.dreams.basic # let's see the package state
pm disable --user 0 com.android.dreams.basic # should be killed
pm disable-user --user 0 com.android.dreams.basic # should be killed
pm enable --user 0 com.android.dreams.basic # should be killed
pm uninstall --user 0 com.android.dreams.basic # should be killed
pm hide --user 0 com.android.dreams.basic # should work
pm unhide --user 0 com.android.dreams.basic # should work

And for each successful command (no error or wasn't killed) run then these commands to see the state of the package

adb shell dumpsys package com.android.dreams.basic # let's see the package state
adb shell pm list packages -s | grep dreams # see if the package is still marked as enabled
adb shell pm list packages -s -d | grep dreams # see if the package is marked as disabled
adb shell pm list packages -s -u | grep dreams # see if the package is enabled or uninstalled

According to this android.stackexchange answer, pm hide will not even hide the app in the application list (from the settings). With pm disable, the app disappears from installed apps but it needs root. Can you confirm this?

On Android Lollipop, pm hide doesn't delete /data/app/<package> (same as pm uninstall -k) but:

Puts the package in a hidden state, which is almost like an uninstalled state, making the package unavailable, but it doesn't remove the data or the actual package file. Application can be unhidden by either resetting the hidden state or by installing it https://github.com/0x192/universal-android-debloater/wiki/ADB-reference#pm-hide-android-5-sdk-api-21

Booteille commented 2 years ago

Hi!

I would love to help you to debug this but I won't have the hand on this smartphone until some time. I'll try to do it next time I can!

Thanks for your work!