No doubt that Xiaomi makes phones with exceptional value for money. The Mi9 and the Mi9T Pro are some of their most successful models this year. However they come pre-loaded with all sorts of apps. Some of them are completely useless, some are poorly done, others are clones of popular apps, and some are downright nasty.

Since these come pre-loaded with the phone one cannot simply uninstall them from the device. That would be too easy wouldn’t it? The method we’ll use here involves adb and a few simple shell commands in Linux.

This was tested with MIUI v.10 and v.11 so should work fine for most devices.

First things first we need to enable Developer Options on the phone and then enable USB Debugging. Plug the phone into your computer or laptop using a USB cable.

Developer options can be activated by tapping the “MIUI Version” label a few times in the “About Phone” screen. USB Debugging then needs to be enabled from the Developer Options menu.

Next we need to start the adb server from a terminal:

adb start-server

List all devices and see if ours shows up:

adb devices

Finally login to the shell:

adb shell

Tap the “Allow” message which pops up on the phone.

Removing packages

There are two main commands we will use, one is for listing available packages, the other for removal.

pm list packages
pm uninstall -k --user 0 <package_name>

I’ll split the list of packages that I found to be “safe to remove” into a few categories and explain the available options.

The clones

These apps are the safest to remove. You will not miss them. You’re better off using the corresponding Google apps and third party open source versions.

com.android.calendar
com.android.mms
com.miui.compass
com.miui.notes
com.miui.player # music player
com.miui.videoplayer
com.miui.weather2
com.miui.yellowpage
com.xiaomi.scanner

The Xiaomi music player can be reinstalled from the Google Play store if needed but there are better options out there.

  • VLC for Android is very well known and can play local music and video without a hitch.
  • Camera Roll is a nice and clean photo gallery app.
  • For barcode scanning I’ve used the excellent ZXing Barcode Scanner since Android 2.x days.

All of these are free and open source.
For everything else Google probably has an app for it.

The useless for me

These apps and services are actually fine, I just happen to not use them. But even if you uninstall them now, you can always reinstall them later from the Play store. No damage is done.

com.xiaomi.midrop
com.facebook.appmanager
com.facebook.services
com.facebook.system

The MiDrop is not too bad. I wonder if it proxies my data through China though.

The nasty

These apps deserve a special mention. Not only are they poor they also serve ads and (through that) probably invade your privacy. Let’s get rid of them.

com.android.browser

What looks like the stock Android browser is actually a Xiaomi flavoured abomination. This browser is incredibly poor and I recommend you never use it for any serious browsing.

com.miui.gallery

The gallery app actually serves ads, sometimes very inappropriate ads. Shred it.

Please note that removing the gallery app will render parts of the wallpaper system app non-functional.

com.android.providers.downloads.ui

The Downloader UI fetches some unwanted JSON files when first booting up or after a factory reset. Zap it.
Make sure to only remove the .ui package which is made by Xiaomi. You actually need com.android.providers.downloads which is a special Android provider package. Sneaky Xiaomi.

com.mi.android.globalFileexplorer

The file explorer is an abomination filled with ads. You can reinstall it from the Google Play store if you really want it.

The controversial

These apps and services are related to the Xiaomi Cloud backup. This cloud service is based in China at the time of writing this article. It’s not enabled by default but is presented to the user in a few places such as the gallery app or the contacts app as a product to safely backup your data.

I would argue that you should never use the cloud storage provided by Xiaomi and get rid of these. But each to their own.

com.miui.cloudbackup
com.miui.cloudservice
com.miui.cloudservice.sysbase

Take note that this disables the cloud backup service without any option to reinstall it, unless a factory reset is done.
The cloud backup is referenced in a couple of places in MIUI. This will not remove those references or menu options, so the app will crash when trying to access those menu options. However this service is not needed for the usual functioning of the device and is actually safe to remove.

Not safe to remove!

Tempting as it might be, you should never remove the following packages:

  • the security center app
  • the mi account app

Seriously, don’t even think about it. It will break everything and you’ll need a factory reset. Let them be.

And that’s pretty much it. Now you can unplug and enjoy a bloat-free device. Would’ve been nice to have this from the beginning, right Xiaomi?

Troubleshooting

Sometimes the adb devices command stubbornly refuses to show anything.

Removing the existing adb keys and try again:

rm -rf ~/.android/

If that still doesn’t work, we might need a special udev rule for our device. The following file needs to be created:

# /etc/udev/rules.d/51-android.rules
#
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", ATTR{idProduct}=="yyyy", MODE="0666", GROUP="plugdev"

Where the vendor and product IDs are found with the lsusb command. Then add your user to the aforementioned group:

gpasswd -a myuser plugdev

Unplug the device and try again. Good luck!