Android Debloating
Last updated : 7/11/2023
Introduction
Various mini-guides for debloating Android, cut off the system apps page.
Debloating methods
There are 3 methods of debloating I've used at the moment, ranging from most recommended to least : TWRP delete, pm uninstall, & freezing / disabling.
TWRP Delete
How to debloat with TWRP / any other TWRP-based recovery of choice :
- Boot to recovery of choice. As long as the recovery has read/write access for the system, you're good to go.
- Enter the Mount option, tick System, as well as any partition you'd like to debloat, like Product, System, & Vendor. Again, make sure these partitions aren't read-only.
- Head to the file manager, which is usually in Advanced > File Manager.
- In the file manager, browse your way to the corresponding folder of the app you'd like to delete (such as system/app/Stk). Do not delete the entire app folder (like system/app, system/priv-app; or /system) or you might have to reflash.
- In that folder, select the folder logo on the bottom right corner & select Delete. Follow the prompt.
- (optional) Wipe Dalvik & cache (and package cache if available) before booting to system after you're done debloating.
Advantages:
- Doesn't require root access
- Doesn't require computer unless TWRP has to be booted using fastboot command
- Completely wipes the app off the system, potentially allowing you to get some extra bytes of internal storage.
Disadvantages:
- Debloating (and / or system app replacements maybe, assuming you did it) doesn't persist across dirty flashes
I could pass this off as a minor issue since I clean flash all the time... though after all those clean flashes it feels like a chore. However, for those who uses OTA updates and/or regularly dirty flash, this could be a problem.
- Can only be done on unlocked bootloaders, since it requires custom recoveries - specifically the likes of TWRP & its forks.
pm uninstall
pm, which is another shorted word for package manager. The classic uninstall method that also works on non-rooted Android devices (ADB), and the common method to temporarily debloat some stock ROMs.
Setup (adb shell, PC):
- Enable USB debugging on Android device (Settings > System > Developer options > USB debugging)
- Setup adb/fastboot on PC (skip if already done)
- Connect Android device & PC
- Open terminal program in PC (or command prompt / PowerShell for Windows)
- In the terminal program, type in adb devices to enable ADB server, detect the Android device, & trigger USB debugging prompt in Android, which needs to be accepted.
- Type in adb shell.
Setup (rooted terminal, no PC; not recommended):
- Install terminal app on Android device
- Open it & give it root access
Post-setup guide:
- Package listing : pm list packages / pm list packages | grep [oem/carrier/app name]
- "Uninstall" : pm uninstall --user 0 [package name]
- universal-android-debloater for GUI-based approach (only for adb shell with PC)
General advantages:
- For terminal users, the experience of typing commands.
General disadvantages:
- You'll need to know the package name of the app you want to uninstall
For example, you can't just type pm uninstall --user 0 Phone - it's pm uninstall --user 0 com.android.dialer
- The app's codes remain on the phone, free to potential abuses by the system.
Advantages (ADB / PC terminal):
- No root access required for the phone
- Works regardless of bootloader status and/or ROMs
- Generally faster command typing, since you'll be using an actual keyboard
Disadvantages (ADB / PC Terminal):
- Requires a PC with ADB / fastboot tools & USB cable to connect PC & phone
- Requires you to turn on USB debugging, which may re-enable itself on boot if it's disabled by default (this depends on the ROM)
Advantages (root / Android terminal):
- Doesn't require you to enable USB debugging & risk it re-enabling itself on boot
- You can do it on the go, no USB cable necessary (unless you have to charge of course)
Disadvantages (root / Android terminal):
- Your phone has to be rooted, which usually also translates to unlocked bootloader.
- I find typing on a phone to be far slower & not as satisfying (if at all), but this one's subjective. In fact, this method is the slowest of them all.
- Depends on the terminal application to work, which tends to change with Android updates.
Freeze / Disable
Personally, this is not a method I'd go to despite the advantages as it's the least consistent. However, for the sake of completion, here it is.
Guide (for the ones that can be disabled from settings) :
- Enter Settings > Apps & notifications > see all apps & browse to the app you'd like to disable. Alternatively, long-press the app from the launcher & press the more info button.
- Tap the disable button, accepting its prompts.
Guide (for the ones that can't be disabled from settings; root required)
- Open your app manager (SD Maid is used for this one) & grant it root access if it's not granted beforehand
- Browse to the app you'd like to disable
- Tap Freeze app
Guide (adb) :
- Setup adb environment (guide linked above)
- pm disable [package name]
Advantages:
- Debloating process persists across dirty flashes
This means that whenever you're doing OTA updates, you don't have to debloat again.
Disadvantages:
- Doesn't work on all system apps.
- Requires elevated access (either adb and/or root) for peskier apps.
- The app's codes remain on the phone, free to potential abuses by the system.
Back to top
Index - cellphone
Main Page