Remove OEM apps (Redmi 7)

An experience of removing unwanted OEM apps from a Redmi 7 phone without root access.

I got hold of a Redmi 7 phone with MIUI 11 running on Android 9 recently and noticed the presence of a lot of apps that its user didn't need, like 'ShareMe' and 'Google Duo'. These OEM apps cannot be uninstalled the way other apps may be removed.

Then I came across Pavel Selivanov's post about removing unwanted miui apps which I found very helpful (and I would urge you to check it out). The following is a description of what I did after reading Pavel's post.

Android SDK Platform-Tools

Go here and download the SDK tool package for your OS. I used Linux but choose as per your platform.

For our purposes, we need adb (Android Debug Bridge), a tool that can be used to execute commands on an Android device.

Windows users will need to install USB drivers as well.

Prepare the phone

Enable Developer options

Go to Settings > About phone.

Keep tapping on MIUI version till a message says 'You are now a developer'.

Now we can access developer options.

Enable USB debugging

Go to Settings > Additional settings > Developer options.

Under DEBUGGING section, enable the USB debugging option.

A confirmation pop-up will appear. Tap OK.

Removing unnecessary apps

Connect to PC

After connecting phone to the computer via USB, open a terminal (or command prompt), navigate to the directory where platform-tools have been extracted. Then run,

adb devices

A daemon would start now (if it wasn't running already).

Your device may be listed now as 'Unauthorized'.

Accept the connection on your phone.

Re-run adb devices and your device would now appear as 'trusted'.

Drop to the shell with

adb shell

Finding apk name

We can use pm tool (package manager) to uninstall apps from inside adb shell.

To change the status of an app in phone, you need to know its apk name.

Go to Settings > Manage apps.

Select the app you wish to uninstall and click on the info icon on the top right corner.

The package name is displayed under APK name.

Disabling an app

Before uninstalling an app, you can try disabling it and use the phone to check if everything works fine without the app.

pm disable-user <apk_name>

This way, if something goes wrong due to the unavailability of that app, you can just re-enable it with

pm enable <apk_name>

If the system doesn't miss the app, you can uninstall it.

Uninstalling an app

Uninstall an app with

pm uninstall --user 0 <apk_name>

where <app_name> is the app that you need uninstalled.

0 is the user id for root.

Script

You could use a script like the one below to uninstall or disable packages.

#!/bin/bash

# Packages to uninstall
uninstall=(
    #
    # Add or delete as needed
    #

    # Xiaomi
    "com.xiaomi.glgm"                                 # Games?
    "com.xiaomi.mipicks"                              # Mi App manager
    "com.xiaomi.midrop"                               # ShareMe
    "com.xiaomi.payment"                              # 
    "com.mi.globalbrowser"                            # Mi browser
    "com.mipay.wallet.in"                             # India only [[WARNING]]

    # MIUI
    "com.miui.msa.global"                             # MIUI System Ads
    "com.miui.bugreport"                              # Bug report
    "com.miui.miservice"
    "com.miui.android.fashiongallery"
    "com.miui.weather"2                               # Weather
    "com.miui.cloudservice"
    "com.miui.videoplayer"
    "com.miui.player"
    "com.miui.cloudbackup"
    "com.miui.compass"                                # Compass

    # Google
    "com.google.music"
    "com.google.videos"
    "com.google.ar.lens"                              # Google Lens

    # Android
    "com.google.android.youtube"                      # YouTube
    "com.google.android.apps.photos"                  # Google photos
    "com.google.android.videos"
    "com.google.android.music"
    "com.google.android.apps.tachyon"                 # Google Duo
    "com.google.android.apps.googlequicksearchbox"    # Google search
    "com.google.android.apps.wellbeing"               # Digital Wellbeing

    # Default Facebook
    "com.facebook.services"
    "com.facebook.system"
    "com.facebook.appmanager"

    # Others
    "com.opera.branding"
)

# Packages to disable
disable=(
    #
    # Add or delete as needed
    #
    "com.android.calendar"                            # Calendar
    "com.android.providers.downloads.ui"              # Downloads
    "com.android.thememanager"                        # Themes
    "com.xiaomi.account"
)

for i in ${uninstall[@]}; do
    #pm uninstall --user 0 $i  # uncomment as needed
    echo $i
done

echo

for i in ${disable[@]}; do
    #pm disable-user $i  # uncomment as needed
    echo $i
done

Disable Developer options

Once you are done, disable USB Debugging at Settings > Additional settings > Developer options if you no longer need it.

Caution

Uninstalling some apps can cause problems for your phone.

For example, people have shared here that uninstalling apps like 'MIUI Gallery' (com.miui.gallery) and 'Xiaomi Find Device' (com.xiaomi.finddevice) can result in soft-bricking the phone.

See more