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
14.81k stars 803 forks source link

How to make a great Universal android de-bloater. idea's #82

Open VeH-c opened 2 years ago

VeH-c commented 2 years ago

Preface

What the goal of Uad? certainly not to do some thing that can't be accomplished by other means, it's to make it intuitive, accessible, organized, repeatable AND universal. the amount of useful information that can be displayed & acted upon could take hours to learn & execute manually though ADB commands (trust me, i did that). with those goals in mind i have suggestions.

TAB idea's Help / FAQ things to know when De-boating

General improvements

  1. Make "Select all" a toggle to un-selcet all and visa-vera. closes https://github.com/0x192/universal-android-debloater/issues/68
  2. Clearly Highlight the last selected menu list item, it's way too easy to forget where your at when scrolling
  3. set colors for Recommended(Green), Advanced(teal), Expert(Yellow), Unsafe(red) Unlisted(white?) to have left of the check box a vertical line of that color.
  4. Case sensitive search warning; don't leave it up to me to guess
  5. make all non clickable text highlight copy'able or copy on right click; who wants to type when you have to cross reference?
  6. add "-s: Filter to only show system packages." & "-3: Filter to only show third party packages." to the second drop down list i know user installed packages are always filtered, but in general more filter are better.
  7. Get APP icon & put it before the Package name: gives clues about all kinds of thing
  8. Allow opening a custom de-bloat list & filter to have just those.

Far out/maybe idea's

  1. add an exclude box, too allow exuding arbitrary things from the list
  2. allow freeze & disable,like: [Freeze](blue ice colored) [Disable](Grey colored) Uninstall or maybe on holding Alt switch to it to allow advanced per adjustment. the reason i think [Uninstall] should be Orange is because you can always re-install & red should be reserved for APPs that can Brick devices.

    • Parse APP names, & put them to the left of the package name, and also make them search able. closes https://github.com/0x192/universal-android-debloater/issues/59

      Related Links https://stackoverflow.com/questions/16650765/get-application-name-label-via-adb-shell-or-terminal https://android.stackexchange.com/questions/90141/obtain-package-name-and-common-name-of-apps-via-adb https://gokulnc.github.io/blog/find-app-name-adb/ https://developer.android.com/studio/command-line/aapt2

Device Specific storage

When a new device is found make a Folder for it(like "Unihertz Jelly2_EEA"), and store all related things there(de-bloat list, logs ect)

############## Uad 0.3.0 | Date:2021-12-02

PHONE: Unihertz Jelly2_EEA
Android version.release]: [11]
ANDROID_SDK: 30

com.google.android.apps.youtube.music

About the Description box

  1. Make description box's text select'able: make these results darkened & below the normal package matches so as to not clutter up the results
  2. Include the interesting parts of the path where to app is located in: /system, /vendor, /data, /product, ect. have this on the bottom & maybe make each have a color and a FAQ about the meaning of each path in terms of Disabling/uninstalling
  3. Allow creation/editing of descriptions directly in the UadGui box, if this can't be done then just open a text editor with a Template, closes https://github.com/0x192/universal-android-debloater/issues/28

    rough template idea

{ "id": "PAKAGE_NAME", "list": "Oem", "description": "NAME OF APP\n, what does it do?\nlink to something useful\nwhat else should we know?\n", "dependencies": null, "neededBy": null, "labels": null, "removal": "Recommended" },

things i think should be added if "list": "Oem" is true then i think uad should record what Phone it was found on(append to the list) "list": "Oem", Google: Pixel 5, Nexus, Samsung: Galaxy tab a, S7,
consequence of removal: Brick, lost of normal functionality(and what is lost), maybe this is already covered by "removal"?

what i want is a better template to give users a guide how how to write a good description, and a better idea of what each line means & how to choose

More about root

With Root can remove apps from /system (System apps), but as the User's can't write to /system there is little advantage compared to simply uninstalling for all users
I think Uad should not try to support Root removal as not all cases will have Root & there are already utilities for that Magisk-Modules-Repo/Debloater (Terminal based) De-Bloater APP

Details & Related Links APP `com.oem.bloat` stored in `/system` ``` adb shell su pm uninstall com.oem.bloat // Failure [DELETE_FAILED_INTERNAL_ERROR] pm uninstall --user 0 com.oem.bloat // Success ``` // about uninstalling apps from /system https://www.reddit.com/r/AndroidQuestions/comments/b5jqzs/adb_to_debloatsome_tricks_to_make_it_easier/ https://askmeaboutlinux.com/2021/10/03/how-to-restore-or-reinstall-package-uninstalled-on-android-using-adb/ https://stackoverflow.com/questions/37145145/app-hidden-by-device-owner-is-not-listed-as-installed https://gist.github.com/davidnunez/1404789 https://android.stackexchange.com/questions/226964/how-to-list-system-packages-uninstalled-for-a-user-via-adb https://ihax.io/freeze-and-uninstall-system-apps-on-android-without-root/ https://www.reddit.com/r/AndroidQuestions/comments/f598zq/how_to_remove_left_over_orphaned_files_after_pm/

wrap up

Similar utilities(ADB App Removal GUIs) - https://github.com/Szaki/XiaomiADBFastbootTools // uses a [predifined list](https://github.com/Szaki/XiaomiADBFastbootTools/blob/1f173ddd78f0668d39e36e50a1048854964d511e/src/main/resources/apps.yml) of APPs remove - [[TOOL] ADB AppControl 1.7.1 🚀 Ultimate App Manager & Debloat Tool + Tweaks](https://forum.xda-developers.com/t/tool-adb-appcontrol-1-7-1-ultimate-app-manager-debloat-tool-tweaks.4147837/) things i like; the package names are listed next to the app name, it's icon, & it's size, very nice! you can dump APKs neatly https://github.com/patrickfav/uber-adb-tools // CMD | adb installing and uninstalling apps like wildcards

getting a list of uninstalled APPS getting a list of uninstalled APPS from the device might be tricky, but it appears the Uad already does this some how https://gist.github.com/davidnunez/1404789 https://android.stackexchange.com/questions/230254/generate-a-root-debloat-script-from-a-package-list-after-a-successful-non-root-d https://android.stackexchange.com/questions/83030/history-of-installed-uninstalled-apps https://www.reddit.com/r/AndroidQuestions/comments/lr88w6/uninstall_bloatware_with_adb_list_of_uninstalled/ https://www.reddit.com/r/linux4noobs/comments/b5pvdn/adb_shell_scripting_for_debloating_android_phones/ pm list packages -u | awk -F: '{print $NF}

More about adb "Freeze" apps (stop apps from running in background) https://developer.android.com/topic/performance/background-optimization#kotlin https://forum.xda-developers.com/t/how-to-get-notification-without-freezing-gsf.4213065/ https://stackoverflow.com/questions/66947747/how-to-use-adb-to-stop-app-from-running-in-background https://www.droidviews.com/freeze-background-apps-on-android-nougat-and-above-without-root/ https://www.xda-developers.com/freeze-app-background-processes-without-root-android-nougat/ https://github.com/PeterCxy/Shelter // has a freeze option https://technastic.com/freeze-uninstall-system-apps-android/ // has general info about

Contributing should be easier, find a new app, make a description, uninstall it, test your system, edit description & open pull request/issue with the results

I have more idea's but i'm out of time, and not sure if the Dev team has time/motivation & likes my idea's, not all are well thought through, look at this as inspiration

Pulled APKs.zip contains CallRecorderService.apk & MDMConfig.apk , some one wanted the APK's(in the package description), not sure how to get it to them.

0x192 commented 2 years ago

I have more idea's but i'm out of time, and not sure if the Dev team has time/motivation & likes my idea's, not all are well thought through, look at this as inspiration

Your ideas of improvement are relevant and know that I'm well aware of the limitation of the current UAD build. The main issue is that there isn't really a dev team. It's just me for now and since the 0.3 release, my time for this project has been limited. On the bright side, I will have more time in 2022!

Everything not mentioned below is on the roadmap with no blocking point at first sight. That however doesn't mean those are high priority features

General improvement

make all non clickable text highlight copy'able or copy on right click; who wants to type when you have to cross reference?

This is the feature I want the most but unfortunately it is a lot trickier than expected (see #43). I will probably implement a copy on click feature as a workaround for the 0.5 release.

Case sensitive search warning; don't leave it up to me to guess

I must admit that no case sensitivity is more suitable for search. I'll change that.

set colors for Recommended(Green), Advanced(teal), Expert(Yellow), Unsafe(red) Unlisted(white?)

This is a really good suggestion. I just have to find colors that looks good with the theming.

Far out/maybe idea's

allow freeze & disable,like: [Freeze](blue ice colored) [Disable](Grey colored) Uninstall or maybe on holding Alt switch to it to allow advanced per adjustment. [...]

Alt switch is a nice idea. Thanks!

Device Specific storage

When a new device is found make a Folder for it(like "Unihertz Jelly2_EEA"), and store all related things there(de-bloat list, logs ect)

This a sensible suggestion. Persistent logging is also something really important I want to have. For now if you close UAD and launch it again, it will overwrite the previous logfile.

Auto make an device specific uninstall list that appends over secession's: so all uninstalled apps from that devices are in that list

Not sure about this one. UAD already has a filter to see all uninstalled apps.

About the Description box

Make description box search'able

I'll see how it goes. I fear it will pollute a lot the search results. I have initially planned to bind packages with some kinds of tags to find related apps.

More about root

With Root can remove apps from /system (System apps), but as the User's can't write to /system there is little advantage compared to simply uninstalling for all users.

Root support will probably come one day but this is not a priority at all. The target of UAD is non-rooted android devices. If you can root your device, just install an AOSP custom ROM. Don't use UAD.

Wrap up

Contributing should be easier, find a new app, make a description, uninstall it, test your system, edit description & open pull request/issue with the results

Absolutely. I'm not very happy with the current situation and #28 is really annoying.

FrederikSchack commented 2 years ago

Absolutely. I'm not very happy with the current situation and #28 is really annoying.

I think this app is absolutely brilliant, especially the information contained in it.

I just started wit adb a few days ago and kept track of all changes in excel. I used trial and error, when uninstalling. This app does it all, gives you clues and easy.

KarlRamstedt commented 2 years ago

Most changes seem like good ideas. Just got a couple of comments:

Make description box search'able

That'd be a BIG NO from me. Would clutter the results way too much.

add an exclude box

Or, better yet, add exclusionary functionality to the existing box. For example like how search engines do it, by putting a - in front of text. E.g: a search for oem -overlay would return any package containing "oem", excluding ones also containing "overlay".

consequence of removal: Brick, lost of normal functionality(and what is lost), maybe this is already covered by "removal"?

Already covered by "removal", but we could use clear definitions on exactly what each removal category means. I've got a set of definitions I plan to suggest in a larger post similar to this one.

if "list": "Oem" is true then i think uad should record what Phone it was found on(append to the list)

Seems messy and hard to implement well. Also doesn't seem very useful. You only ever have one phone selected, so any listed packages are obviously part of that OEM.

allow freeze

Freezing could be nice, but I've seen some comments across the web indicating that AppOps settings will reset on reboot in Android 11, which would make it pretty pointless. Most notably by an AppOps manager app: https://appops.rikka.app/guide/technical/system_behaviors/

VeH-c commented 2 years ago

Hi KarlRamstedt and thanks for your input! i was not quite as knowledgeable about Uad as i should have been when i wrote that, but allow me to further explain what i meant & didn't understand

Make description box's text select'able:

I think by the Description Box text matches being below all normal package results & Greyed out/darkened it will be very out of the way of normal use. one of the reasons for this change is some package should be removed as a set but won't necessarily have similar package names, also if you know the general functionality of an Package but the package name is non descriptive you could search for it's function & you might get lucky, as an example com.google.android.cellbroadcastreceiver ​is part of the "Wireless emergency alerts" package set but with out Prior Knowledge of that you could not easily find it. and other meta'ish functions :)

I like the exclusionary functionality of search engines idea, i tried to keep some of my idea's simple so the coders might actually try it but this is a great idea, one i wish i thought of.

Already covered by "removal", but we could use clear definitions on exactly what each removal category means. I've got a set of definitions I plan to suggest in a larger post similar to this one.

True, my lack of understanding is coming though there. also please do! i might have gone though that thought experiment but time is not on my side.... current way leaves way to much to be desired.

if "list": "Oem" is true then i think uad should record what Phone it was found on(append to the list)

yeah, the hope was that the list could contain more meta data for future use like is your phone model was already been contributed or if you will have to do that your self, like i will be trying to add "Unihertz" to the "Manufacturers debloat lists" but i have have only one of their phones, one might see that and assume all models will have a complete de-bloat list, but your probably right about "messy and hard to implement well." AKA no worth the time as an APP thats bloat-ware is probably safe to remove on any device & Android version.

KarlRamstedt commented 2 years ago

I think by the Description Box text matches being below all normal package results & Greyed out/darkened it will be very out of the way of normal use. one of the reasons for this change is some package should be removed as a set but won't necessarily have similar package names, also if you know the general functionality of an Package but the package name is non descriptive you could search for it's function & you might get lucky

Good point. If they're clearly differentiated from the dotted package name results I think it could be a good feature.

yeah, the hope was that the list could contain more meta data for future use like is your phone model was already been contributed

That could be useful, but the issue then is that different OS versions will have different packages, even on the same phone. It quickly becomes messy 😅 Probably too much effort/mess to be worth it.