Making Xiaomi/MI phones ad-free and Bloatware free

Making Android phones ad-free and Bloatware free

Video: Video on MI Phone

For more user-friendly of the same thing head over to https://github.com/Szaki/XiaomiADBFastbootTools.
The following is my version that I use. I like to have more control.

  1. Unlock Device from MIUI:
    Before going ahead. Unlock your device via en.miui.com/unlock which might require signing into MI account on your device(a pain in the a$$, I know) and a waiting period of few hours to a few days. This step is not needed but strongly recommended [1].
  2. After you have unlocked your bootloader, sign out of your Xiaomi account my going into settings->MI Account-> Sign out.
  3. Developer Options:
    Setting-> About Phone -> Click on the MIUI version (the below one) multiple times till a toast appears saying, “You’re now a developer.” (If only it was that easy to be a developer).
  4. OEM Unlocking check:
    Go to Settings-> Additional Settings -> Developer Options. Check if Mi Unlock status is unlocked. It should be if you have performed step 1 correctly. If not go back and make sure it’s on. Also make sure OEM Unlocking is turned on.
  5. USB Debugging:
    In the Developer options, scroll just a little bit and you will see the option to enable USB Debugging. Enable it, wait 5 seconds, read the warning if you want to, and then accept.
    Bonus1: Few Tweaks for faster experience:
    In Developer options under Drawing you will see the following options. Set them as specified:
    Window animation scale: Animation Off
    Transition animation scale: Animation Off
    Animator animation scale: Animation scale 0.5x
    Bonus2: Go all the way down and you will see the option, “Turn on MIUI optimisation.” This option is needed to be turned off when you are installing YouTube without ads (YouTube Vanced)
    DON’T CHANGE ANY OTHER SETTINGS.
  6. ADB Drivers:
    Now on your PC (Don’t connect phone yet), install ADB Drivers from here. Make sure during installation you
    select install for everyone.
  7. Connect via ADB:
    Now connect your phone to your PC and open Command Prompt from start menu.
    In Command Window type
    adb devices
    As soon as you type it on your phone it will ask for authorization. Select Yes. Now on your PC it should spit out a code. The code is not important to remember but it should show up.
    Driver Fix: If it doesn’t something needs to be revisited, check cable, check that you have enabled ADB in Developer option. Check that you have installed ADB Drivers. More likely than not it has to be a problem with Android Drivers not installing properly. To re-install drivers, visit this link by Google and then extract all files to any place on your PC. Go to the extracted files, right click android_winusb.inf and select Install.
  8. APK Name:
    Go into Setting->Apps->Manage Apps->Three Dots to the upper right->Show all apps
    Now there are many apps that you can see here but most of them are needed for crucial running of the system. You need the APK name name of the app to remove it. For that select an app you want to remove and click on the i option in the top right. It will show you the APK name.
  9. Command to remove an apk:
    Type the following followed by the package name:
    adb shell pm uninstall -k --user 0 <package name>
    For example,
    adb shell pm uninstall -k --user 0 com.micredit.in
  10. The following is the list of my commands that I use when setting up a new device.
    It also contains extra google apps because I can install them later from play store (because on many devices you can just install a lite version of the same apps if it’s too heavy for example, Maps Lie instead of Maps, Google lite instead of Google etc…). This list also removes msa (used for advertising).
    You can install Mi Music, Mi Calculator again from play store if needed and hence they are also being removed.
    You do not need to copy each lines one by one and then paste them, you can just copy all and paste in CMD.

adb shell pm uninstall -k --user 0 com.miui.android.fashiongallery
adb shell pm uninstall -k --user 0 com.micredit.in
adb shell pm uninstall -k --user 0 com.xiaomi.midrop
adb shell pm uninstall -k --user 0 com.miui.miservices
adb shell pm uninstall -k --user 0 com.miui.miservice
adb shell pm uninstall -k --user 0 com.miui.player
adb shell pm uninstall -k --user 0 com.miui.msa.global
adb shell pm uninstall -k --user 0 miui.daemon
adb shell pm uninstall -k --user 0 com.miui.daemon
adb shell pm uninstall -k --user 0 com.miui.hybrid
adb shell pm uninstall -k --user 0 com.mfashiongallery.emag
adb shell pm uninstall -k --user 0 com.miui.videoplayer
adb shell pm uninstall -k --user 0 com.xiaomi.mirecycle
adb shell pm uninstall -k --user 0 com.mipay.wallet.in
adb shell pm uninstall -k --user 0 com.mipay.wallet.id
adb shell pm uninstall -k --user 0 com.xiaomi.payment
adb shell pm uninstall -k --user 0 com.miui.mishareconnectivity
adb shell pm uninstall -k --user 0 com.miui.mishare.connectivity
adb shell pm uninstall -k --user 0 com.google.android.music
adb shell pm uninstall -k --user 0 com.google.android.videos
adb shell pm uninstall -k --user 0 com.xiaomi.mipicks
adb shell pm uninstall -k --user 0 com.xiaomi.glgm
adb shell pm uninstall -k --user 0 com.miui.bugreport
adb shell pm uninstall -k --user 0 com.facebook.services
adb shell pm uninstall -k --user 0 com.facebook.appmanager
adb shell pm uninstall -k --user 0 com.facebook.system
adb shell pm uninstall -k --user 0 com.google.android.apps.tachyon
adb shell pm uninstall -k --user 0 com.android.browser
adb shell pm uninstall -k --user 0 com.mi.globalbrowser
adb shell pm uninstall -k --user 0 com.miui.android.fashiongallery
adb shell pm uninstall -k --user 0 com.facemoji.lite.xiaomi
adb shell pm uninstall -k --user 0 com.google.android.apps.docs
adb shell pm uninstall -k --user 0 com.facebook.katana
adb shell pm uninstall -k --user 0 com.google.android.gm
adb shell pm uninstall -k --user 0 com.google.android.apps.maps
adb shell pm uninstall -k --user 0 com.google.android.projection.gearhead
pause

Iqoo Phones Bloatware:

adb shell pm uninstall -k --user 0 com.google.android.youtube
adb shell pm uninstall -k --user 0 com.facebook.appmanager
adb shell pm uninstall -k --user 0 com.facebook.system
adb shell pm uninstall -k --user 0 com.facebook.services
adb shell pm uninstall -k --user 0 com.vivo.Tips
adb shell pm uninstall -k --user 0 com.google.android.apps.messaging
adb shell pm uninstall -k --user 0 com.yozo.vivo.office
adb shell pm uninstall -k --user 0 com.vivo.game
adb shell pm uninstall -k --user 0 com.vivo.livewallpaper.plant
adb shell pm uninstall -k --user 0 com.vivo.desktopstickers
adb shell pm uninstall -k --user 0 com.vivo.browser
adb shell pm uninstall -k --user 0 com.vivo.notes
adb shell pm uninstall -k --user 0 com.vivo.feedback
adb shell pm uninstall -k --user 0 com.vivo.livewallpaper.behaviormountain
adb shell pm uninstall -k --user 0 com.google.android.apps.tachyon

Reinstall from Playstore
Not Required to Run Facebook
Not Required to Run Facebook
Not Required to Run Facebook
I uninstalled Tips. Who wants Tips.
Reinstall from Playstore if required. Just use SMS Organizer.
Install some other Document viewer.
Malware.
Install other livewallpaper if you really want them. They eat battery.
Stickers!
Malware
Use another notes app
It reinstalled itself again.
Live Wallpaper
Reinstall from Playstore


Note: System apps if deleted and then reinstalled become system apps again if reinstalled from playstore.

For some lines, it will say Failure or Failure[-1000], just ignore them. As far as I know the Wallpaper Carousel can’t be removed from all phones.

The following Apps are NOT RECOMMENEDED to remove but you can if you don’t use them. Remember you will have to use Google’s equivalent from the Play Store for these:
adb shell pm uninstall -k --user 0 com.android.deskclock
adb shell pm uninstall -k --user 0 com.miui.notes
adb shell pm uninstall -k --user 0 com.xiaomi.joyose | Neede for gaming features
adb shell pm uninstall -k --user 0 com.miui.cleanmaster

Also you can easily get rid of MI Calendar but don’t remove Calendar Storage or Calendar Services. They both are needed on your phone for any calendar to work.

adb shell pm uninstall -k --user 0 com.xiaomi.calendar

You can uninstall Google app and install a lighter version Google Go. This will not remove the google account from your phone just the search app.
adb shell pm uninstall -k --user 0 com.google.android.googlequicksearchbox
Also the Google Assistant won’t work with your voice if you remove this. You can still search from Google Go but Assistant won’t work, so you might as well remove it:
adb shell pm uninstall -k --user 0 com.google.android.apps.googleassistant

Authorization and Revoke:
Setting->Password & Security -> Authorization & Revocation -> Remove autorization for all apps. All of them. The ones that will be needed will be turned on automatically.
Search for “Special App Access” in settings.
In Usage Access-> Turn it off for everyone except Camera which stops working if not allowed.
In Display Over Other apps-> Turn it off for those apps that aren’t needed to show over other apps. Basically all Xiaomi apps because this is what they use to show full screen ads. Keep it enabled for the following:
Android Accessibility Suite, App vault, Screen Recorder, YouTube, VLC.

I am assuming you have already disabled normal ads in all the system apps, if not just go into those apps which show you ads especially security and turn off receive recommendations.

Further reading and explanation:
[1] Xiaomi’s updates are very bad. You can lock your device later if you wish to (via Xiaomi Flash tool) but it is not recommended. I had a new MI A2 and the first update that it had bricked(rendered it completely useless) because of an update and because the Bootloader was locked. This is just a safety step so that later if something goes wrong by Xiaomi or by You, you have a way to fix it.
[5] The reason to keep the animator scale at 0.5x is that loading icons stop working if set to zero.
[Bonus2] YouTube Vanced’s official website is vancedapp.com