Debloat your android phone with Magisk modules
December 16th 2020 on Dušan's blog
Useless junk apps that you can't uninstall have always bugged me, ever since I got my first Android phone. These apps, otherwise known as bloatware, take up valuable disk space and system resources, and are generally marketing stunts by the manufacturer in a misguided attempt to sway your habits to use their junk platform. Needless to say I despise them, they offer nothing of value to the end user, just a lot of headaches and annoyance. Let's get rid of them!
Before we begin I must issue a standard disclaimer: I am not responsible, in any way, shape or form, for the potential damages to the software/hardware of the device as a result of following this guide. You do this of your own volition and on your own risk!
This guide assumes the following:
- Your bootloader is unlocked.
- You've enabled USB debugging in the developer options.
- You've already installed Magisk and Magisk manager from its official repository.
- You have some kind of terminal emulator app installed on your system. My recommendation.
- You know how to install Magisk modules.
Download and install these two Magisk modules:
- Busybox for Android NDK (By osm0sis)
- Debloater (By veez21)
Reboot after installing.
Launch your terminal emulator and request root access by typing su:
If you've configured Magisk properly earlier you'll be greeted with the root shell. To start the debloating process invoke the debloater with the debloat command:
You'll be presented with a menu that looks something like this:
========================================= Debloater (Terminal Emulator) v17.3.3(76) by veez21 ========================================= BusyBox v1.31.1-osm0sis /system/xbin/busybox ========================================= 1 - System Apps 2 - System Priv-Apps 3 - Vendor Apps 4 - System Product Apps 5 - System Product Priv-Apps c - Enter Custom System Apps dir r - Reinstall Uninstalled Apps e - Export Config i - Import Config (/sdcard/import-debloat.txt) 0 - Exit [CHOICE]:
From here on it's a bit of a trial and error process until you find the app you're looking to uninstall, you need to look through these menus by typing the number in front of the menu entry and eventually you'll find it.
I found the two apps I want to uninstall under System Apps (Note: output has been truncated to show only the entries of interest.)
33 - Lens (Lens) 35 - Mail (Email)
Type their corresponding numbers (Yours will be different) to the prompt and the debloater program will take it from there.
To uninstall multiple apps, enter multiple numbers. Example: "1 6 21" x - Back to Menu r - Refresh list 0 - Exit ========================================= [CHOICE]: 33 35
Answer yes to any prompts that occur:
Uninstalling Lens (/system/app/Lens) App Label: com.google.ar.lens App Dir: /system/app/Lens Proceed? < (y)es | (n)o | (a)ll >: y Uninstalling Mail (/system/app/Email) App Label: com.android.email App Dir: /system/app/Email Proceed? < (y)es | (n)o | (a)ll >: y
The program will inform you when done, from there you can choose to delete more apps or stop the program. Reboot to apply changes. After the reboot, the app may appear to still be installed, but this time you can uninstall it like any other app.
Once again, apply extreme caution not to delete any app that might be required for the system to boot or function normally. Hopefully manufacturers will get their act together some day so we don't have to jump through these kinds of hoops just to uninstall their junk apps.