• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[SCRIPT] [2021-01-30] [v2.9] Universal Android Debloater

Search This thread

l54apk

Member
May 16, 2020
10
1
Universal Android Debloater

[Logo to be created]


Bash script using ADB to debloat rooted and non-rooted smartphones. Improve your privacy and increase your battery life.

DISCLAIMER : Use this script at your own risk. I am not responsible for anything that could happen to your phone.


Summary
I try to maintain a universal tool which removes bloatwares on any Android phones by using ADB.

The main goal is to improve battery performance and privacy by removing unnecessary and obscure system apps. This can also contribute to improve security by reducing the attack surface. The script has a menu that lets you choose what debloat list you want to use. I strongly encourage you to take a look at the lists because the default selection may not suit you. All packages are as well documented as possible in order to provide a better understanding of what you can delete or not.

This script should be safe with the default selection. The worse thing which could happen is preventing an essential system process to be loaded during boot causing then an unfortunate bootloop. If you used the non-root solution, after about 5 failed system boots, the phone will automatically reboot in recovery mode and you'll have to perform a FACTORY RESET. So make a backup!


If you have a rooted device you can also physically delete the apks. Ironically this solution is safer because the script saves the apks before their removal. In case of bootloop you just need to run the script from a recovery with ADB support (e.g TWRP) and restore them.


In any case, you can NOT brick your device with this script ! That's the main thing, right ? :)

Features
  • Quick search among all the packages of an android device
  • Uninstallation of system/user packages (manually or with the debloat lists)
  • Reinstallation of system packages (manually or with the debloat lists)
  • ADB backup/restore (not really reliable, see the FAQ)
  • Device brand detection and auto-selection of the appropriate manufacturer debloat list
  • Logging: debloated_packages.txt, remaining_packages.txt, deleted_apks.txt (for root users)
  • Root support (system and systemless with Magisk)
  • Installation of alternative open-source apps replacing stock apps (list in the WIKI section) (Not yet : WIP)

NB : The non-root method is NOT a real uninstallation for system apps (see the FAQ)

Universal debloat lists
  • GFAM (Google/Facebook/Amazon/Microsoft)
  • AOSP
  • Manufacturers (OEM)
  • Mobile carriers
  • Qualcomm / Mediatek / Miscellaneous

Manufacturers debloat lists
  • Asus
  • LG
  • Google
  • Huawei
  • Motorola
  • Nokia
  • OnePlus
  • Oppo
  • Samsung
  • Sony
  • Xiaomi

Mobile carriers debloat lists
  • French carriers : SFR / Orange / Free / Bouygues / Sosh
  • US carriers : T-mobile / Verizon / AT&T / Sprint
  • German carriers : Telekom

Download

How to use

Acknowledgement
Hi!
Please show me how to completely remove 2 applications "GameOptimizingService" and "Link to Windows Service". I used ADB and have removed a lot of unnecessary applications only these 2 are still showing up in the update section of the "Galaxy Store" on my Samsung S10.
Thanks.
 

Attachments

  • Screenshot_20210808-153130_Galaxy Store.jpg
    Screenshot_20210808-153130_Galaxy Store.jpg
    120.8 KB · Views: 57

Top Liked Posts

  • There are no posts matching your filters.
  • 49
    Universal Android Debloater

    [Logo to be created]


    Bash script using ADB to debloat rooted and non-rooted smartphones. Improve your privacy and increase your battery life.

    DISCLAIMER : Use this script at your own risk. I am not responsible for anything that could happen to your phone.


    Summary
    I try to maintain a universal tool which removes bloatwares on any Android phones by using ADB.

    The main goal is to improve battery performance and privacy by removing unnecessary and obscure system apps. This can also contribute to improve security by reducing the attack surface. The script has a menu that lets you choose what debloat list you want to use. I strongly encourage you to take a look at the lists because the default selection may not suit you. All packages are as well documented as possible in order to provide a better understanding of what you can delete or not.

    This script should be safe with the default selection. The worse thing which could happen is preventing an essential system process to be loaded during boot causing then an unfortunate bootloop. If you used the non-root solution, after about 5 failed system boots, the phone will automatically reboot in recovery mode and you'll have to perform a FACTORY RESET. So make a backup!


    If you have a rooted device you can also physically delete the apks. Ironically this solution is safer because the script saves the apks before their removal. In case of bootloop you just need to run the script from a recovery with ADB support (e.g TWRP) and restore them.


    In any case, you can NOT brick your device with this script ! That's the main thing, right ? :)

    Features
    • Quick search among all the packages of an android device
    • Uninstallation of system/user packages (manually or with the debloat lists)
    • Reinstallation of system packages (manually or with the debloat lists)
    • ADB backup/restore (not really reliable, see the FAQ)
    • Device brand detection and auto-selection of the appropriate manufacturer debloat list
    • Logging: debloated_packages.txt, remaining_packages.txt, deleted_apks.txt (for root users)
    • Root support (system and systemless with Magisk)
    • Installation of alternative open-source apps replacing stock apps (list in the WIKI section) (Not yet : WIP)

    NB : The non-root method is NOT a real uninstallation for system apps (see the FAQ)

    Universal debloat lists
    • GFAM (Google/Facebook/Amazon/Microsoft)
    • AOSP
    • Manufacturers (OEM)
    • Mobile carriers
    • Qualcomm / Mediatek / Miscellaneous

    Manufacturers debloat lists
    • Asus
    • LG
    • Google
    • Huawei
    • Motorola
    • Nokia
    • OnePlus
    • Oppo
    • Samsung
    • Sony
    • Xiaomi

    Mobile carriers debloat lists
    • French carriers : SFR / Orange / Free / Bouygues / Sosh
    • US carriers : T-mobile / Verizon / AT&T / Sprint
    • German carriers : Telekom

    Download

    How to use

    Acknowledgement
    3
    Hi,

    So I went through with the whole (well documented) debloating instructions and debloated everything there was to debloat until the script said "nothing to debloat :)" on every selectable option. [...] Now the phone wont boot anymore.
    [...] Is this a known issue already? I can be a tester if there are some fixes on the way.

    A new big release (v2.8) is coming soon.

    As for the bootloop, I'm sorry. It seems this only happens (for now) on newer Samsung devices with OneUI 3.0. This is a known issue (see #39). The faulty package seems to be a Google one but hasn't been found yet.

    Only users of those phones can identify it. I can't do anything alone. I would be delighted if you help me on this. Come over to Gitlab. It's easier to track issues. :)

    Any idea why the debloat script won't recognize that I've updated bash to the latest version and set it to default on my MacBook?
    Well... I dunno how I could have failed this but here it is:

    On the 4th line of code, in the if it should be:
    "${BASH_VERSINFO[0]}" < 5 instead of BASH_VERSINFO < 5

    It will be fixed in the next release.
    3
    How to contribute

    Fetch the list of all the system packages of your phone. My script automatically exports this list in a file called remaining_packages.txt after choosing any action in the main menu.

    1. Seek for new packages not present in my debloat lists. You can use this script to check if your list has no duplicate with the current lists in the repository.
    2. Try to document each new packages and create a new issue on Gitlab.

    How to decompile an APK

    - Apktool
    - Jadx (what I use)
    - Bytecode Viewer


    How to report bugs

    Open an issue on Gitlab and precisely explain the issue. Screenshot(s) can help.
    3
    @freeelect & @sapphirexda

    I'm really sorry. I messed up with a variable name. Non-root features in v2.8, v2.8.1 and v2.8.2 are broken.

    I've just released a third (and hopefully last) hotfix fixing this issue.

    3
    Happy new year!

    I wouldn't have thought this release would take me this long! Finally, here is the v2.8:


    The changelog is on Gitlab, as usual. This is the last major update for the bash script. I'm sure a lot of people will be happy to know that I added root support. You can even generate a flashable zip if you want!

    I am now focusing on developing a cross-platform GUI.

    EDIT: I reworked the logic behind the flashable zip generation. There was an issue. It is now much simpler and correctly works. I also added a backup of the apks before the flashable zip generation. It's safer.

    I released an hotfix (v2.8.1) with these changes.