This repository contains a list of Android Debug Bridge (ADB) commands to remove bloatware from HyperOS Android. Debloating helps remove unwanted system apps to improve performance, battery life, and privacy.
The lists are categorized into three different profiles:
- Safe: Removes only the most common and non-essential bloatware. Very low risk of causing issues.
- Balanced: Aims for a good balance between debloating and retaining features. Some apps you might use could be removed.
- Agressive: Removes a large number of apps, including some that provide certain system features. This is for users who want a minimal system, but it has a higher chance of breaking some functionalities.
⚠️ USE AT YOUR OWN RISK! While these commands are generally safe and reversible, debloating can have unintended consequences. It might break system functionalities or cause instability. Always back up your important data before proceeding. It's highly recommended to read through the list you choose to use and comment out any apps you want to keep.
-
Android Debug Bridge (ADB): You need ADB installed on your computer.
- Recommended: Minimal ADB and Fastboot from XDA forums for a quick setup.
- Official: Download the official Android SDK Platform Tools.
-
Enable Developer Options on your phone:
- Go to
Settings > About phone. - Tap on
MIUI version(orOS versionon HyperOS) multiple times until you see the message "You are now a developer!".
- Go to
-
Enable USB Debugging:
- Go to
Settings > Additional settings > Developer options. - Enable
Developer options. - Enable
USB debugging. - (Optional but recommended) Enable
Install via USBif you plan to sideload apps.
- Go to
Search for a Minimal ADB installer : https://xdaforums.com/t/tool-minimal-adb-and-fastboot-2-9-18.2317790/ Further reading on ADB can be found here: https://developer.android.com/studio/command-line/adb#Enabling.
-
Connect your phone to your computer with USB debugging enabled.
-
Verify the ADB connection by opening a terminal and running the following command.
adb devices
You should see the device name listed as a "device". If it says "unauthorized", your device should prompt you to accept USB debugging from your computer. Tap "Allow".
-
Enter your device's shell with the following command:
adb shell
-
Choose and run a debloat profile. Select one of the files (
debloat_safe.txt,debloat_balanced.txt,debloat_agressive.txt). It is highly recommended to review the list of apps inside the file first. -
Once in the shell, you can copy and paste the commands from your chosen file to remove the packages. For example, a command from the list would look like this:
pm uninstall -k --user 0 com.miui.calculator
This repository uses the pm uninstall command, which removes the application for the current user (user 0).
-
pm uninstall -k --user 0 <package_name>- This command uninstalls the app for the current user (
user 0). The-kflag keeps the app's data and cache. This makes the uninstallation reversible. This is the recommended and safest method.
- This command uninstalls the app for the current user (
-
pm disable-user --user 0 <package_name>- This command disables the app for the current user. The app is not removed, just disabled. It's a less aggressive alternative to uninstalling.
-
cmd package uninstall --user 0 <package_name>- This is another way to uninstall a package. In some cases, it can be more "permanent" but is still generally reversible.
To find the package name of an app you want to remove, you can use the following command from within the adb shell:
pm list packages | grep '<query>'Replace <query> with a part of the app's name (e.g., to find the calculator app, you could use grep 'calculator').
If you accidentally removed an app you need, you can reinstall it with the following command from your computer's terminal:
adb shell pm install-existing --user 0 <package_name>For example, to restore the Mi Calculator:
adb shell pm install-existing --user 0 com.miui.calculatorIf you use the aggressive debloat list, some features might break. Here are some common fixes to restore essential functionalities by running these commands from your computer's terminal.
-
To re-enable Wallpapers:
adb shell pm install-existing --user 0 com.android.wallpaper.livepicker adb shell pm install-existing --user 0 com.android.wallpapercropper adb shell pm install-existing --user 0 com.miui.miwallpaper
-
To fix Android Auto issues:
adb shell pm install-existing --user 0 com.google.android.projection.gearhead
-
To fix Bluetooth functionality:
adb shell pm install-existing --user 0 com.miui.miservice adb shell pm install-existing --user 0 com.xiaomi.bluetooth
-
To re-enable OTA Updates:
adb shell pm install-existing --user 0 com.xiaomi.xmsf adb shell pm install-existing --user 0 com.xiaomi.xmsfkeeper adb shell pm install-existing --user 0 com.miui.cloudservice adb shell pm install-existing --user 0 com.miui.cloudservice.sysbase adb shell pm install-existing --user 0 com.xiaomi.micloud.sdk adb shell pm install-existing --user 0 com.miui.daemon adb shell pm install-existing --user 0 com.xiaomi.simactivate.service
Then reboot and change region in Settings > Additional settings > Region.
You are welcome to contribute to this project! If you find an app that can be safely removed, or if you have improvements for the lists, please open an issue or a pull request.
This project is open source and available under the MIT License.