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

Search This thread

w1nst0n_fr

Member
Dec 27, 2019
45
72
gitlab.com
Sorry for the late replies. If you find a bug, it's better to create an issue directly on Gitlab. I'm much more reactive over there.

hi i am getting the following error. how can i solve this?
Please upgrade to a bash version >= 4.4

The code checking the bash version wasn't very robust. The issue is fixed in the master branch. I'll release a (v2.9.1) tonight with other bugfixes.

Hey bro, magisk safetynet error, You know what app could have caused that? Realme X2 Pro... Thx
I can't help you without the list of the packages you removed. Did you use the root method? I don't think you can break safetynet with the non-root method.


How to completely remove the APK with root?
I got this error when I try to delete chrome

Code:
Clearing app data...
com.android.chrome -->
Exception occurred while executing 'clear':
java.lang.SecurityException: PID 29500 does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package com.android.chrome

Mhm... Have you an Xiaomi phone? It seems you need to enable the Disable Permission Monitoring option in the settings.

Using latest version 2.9 with root. Followed all your guide.
In the end, I'm getting a error talking about no such command zip.
So I figure i need to sudo apt install zip
Thanks. (y)
I forgot zip isn't installed by default in most Linux distributions.

I'll update the README.
 

__infin1ty

Senior Member
May 27, 2014
88
14
Noob question but if i understand correctly this can be installed via Magisk too? I can't find the flashable zip for Magisk,can someone guide me through the process ?




  • Installation of alternative open-source apps replacing stock apps (list in the WIKI section) (Not yet : WIP)

This sounds very promising!
Very good work,thank you for this script.


EDIT: i managed to debloat packages and APK's,hoever this ended up in a bootloop.
Device : Xiaomi Mi 9 , MIUI 12
 
Last edited:

lebigmac

Senior Member
Jan 31, 2017
687
343
In 2.9 it will be a systemless debloat for Android 10+ devices (see the release notes for v2.9-temp if you don't understand why)


Systemless debloat is the only solution for Android 10+ users because system can't be mounted in read-write anymore.

Hi w1nst0n. You did a great job with your debloater script. Thanks for sharing it! Keep up the great work!

It is possible to mount system as read-write in Android 10 and newer.

There are 2 tools that can do this. My oldschool script and the new sophisticated superrepack tool by @munjeni
 
Last edited:
  • Like
Reactions: munjeni

nongrata23

Senior Member
  • Aug 25, 2009
    93
    7
    Hi, i applied the magisk module generated for lg g7(uad_magisk_v2.9.1_DEBLOAT.zip), but the phone is in Logo mode and not booting what can i do? to make it work?

    Thank you
     

    0mart

    New member
    Apr 28, 2021
    2
    0
    Hi Guys, searched the thread but could not find others with my problem.

    I receive the message "Your phone is not detected by ADB.", yet when I run "adb devices" my phone shows up. I can also run other commands such as adb reboot.
    I'm using a oneplus 8 pro, rooted with magisk and running 11.0.5.5
    Any help appreciated.
     

    DrScrad

    Member
    May 12, 2018
    11
    0
    34
    Pearl, MS
    my.bio
    Hi Guys, searched the thread but could not find others with my problem.

    I receive the message "Your phone is not detected by ADB.", yet when I run "adb devices" my phone shows up. I can also run other commands such as adb reboot.
    I'm using a oneplus 8 pro, rooted with magisk and running 11.0.5.5
    Any help appreciated.
    Are you running as root?
     

    DBJ9080

    Member
    Mar 21, 2021
    8
    1
    So I got it successfully running on my Huawei P20. I've ran the Huawei and the AOSP method.
    The phone got shipped with Netflix, Huawei Translator, Microsoft Swiftkey Keyboard and some Google Apps (Google Movies, Google Music).

    Is there a way I can remove them? The phone isn't rooted and won't be. :)
     
    • Like
    Reactions: kurtn

    kurtn

    Senior Member
    Jan 28, 2017
    3,930
    1,691
    Small town in Bavaria
    So I got it successfully running on my Huawei P20. I've ran the Huawei and the AOSP method.
    The phone got shipped with Netflix, Huawei Translator, Microsoft Swiftkey Keyboard and some Google Apps (Google Movies, Google Music).

    Is there a way I can remove them? The phone isn't rooted and won't be. :)
    Google and Microsoft are in an extra list
    GAFM
     
    • Like
    Reactions: DBJ9080

    Top Liked Posts

    • There are no posts matching your filters.
    • 1
      In 2.9 it will be a systemless debloat for Android 10+ devices (see the release notes for v2.9-temp if you don't understand why)


      Systemless debloat is the only solution for Android 10+ users because system can't be mounted in read-write anymore.

      Hi w1nst0n. You did a great job with your debloater script. Thanks for sharing it! Keep up the great work!

      It is possible to mount system as read-write in Android 10 and newer.

      There are 2 tools that can do this. My oldschool script and the new sophisticated superrepack tool by @munjeni
      1
      So I got it successfully running on my Huawei P20. I've ran the Huawei and the AOSP method.
      The phone got shipped with Netflix, Huawei Translator, Microsoft Swiftkey Keyboard and some Google Apps (Google Movies, Google Music).

      Is there a way I can remove them? The phone isn't rooted and won't be. :)
      1
      So I got it successfully running on my Huawei P20. I've ran the Huawei and the AOSP method.
      The phone got shipped with Netflix, Huawei Translator, Microsoft Swiftkey Keyboard and some Google Apps (Google Movies, Google Music).

      Is there a way I can remove them? The phone isn't rooted and won't be. :)
      Google and Microsoft are in an extra list
      GAFM
      1
      At least I got rid of the useless google music app (it's youtube music now) and the movie and book app. Thank you. But now I licked some blood with all the debloating and I still would like to remove Netflix, Microsoft Swift Keyboard (it didn't remove with the microsoft option in the script). How would I do that?

      And do you know by any chance which line of the code I would have to remove if I want to exclude YouTube from the google option?
      Each app has a unique identifier. YouTube is com.google.android.youtube
      Find that in the list and delete or comment out.
      Get the identifiers of Netflix and keyboard and add them to a list.
    • 39
      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
      -------------- New Version (v2.9) --------------

      Systemless debloat support. Root features should finally work for all Android versions. Check the full changelog on Gitlab.

      Note: The debloat_script.sh is now in maintenance mode and won't receive any more features. The focus is on the developement of a GUI.

      -------------------------------------------------------

      Will systemless debloat be used on all devices after V2.9 or will older devices still mount system and delete the APK?

      You can choose between the 2 methods.

      By just deleting the APK folder, do you get any orphan data left over (i.e. in shared storage folders within /data/data)?. Maybe if the app is never run then these folders are not created? Would using pm clear com.yourapp.packagename before removing the app clear off any data folders that are remaining?

      Yes, you'll get a bunch of orphan files (apps data, cache, oat files) if the apps already run on your phone.

      Performing pm clear only remove app data and cache. It doesn't remove the folders nor oat files (precompiled code of the app) but that's well enough.

      v2.9 does this before any root debloat.

      Maybe SD Maid or similar app can find the orphan files afterwards and delete them. Or I guess they are probably only small (especially if you have never used the app) so maybe it is not worth the effort and they are doing no harm?

      Yes. That's it. It is not worth the effort all the more so SD Maid exists. This is a really good app, made by a nice person on top of that.

      I believe it is because I missed the countdown the first time I was prompted to accept the action on the device. How can I get the prompt again so I can accept the deletions? (I know this is possibly more a Magisk question, but I figured I'd ask...)

      The error being line 414, you indeed missed the countdown.

      In Magisk Manager (last version), click on the shield icon in the dock (at the bottom of the app). Then, allow superuser rights to Shell
      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.
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone