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.
Then I came across Pavel Selivanov's post about removing unwanted miui apps which I found very helpful. In fact, this post derives from Pavel's content but from a different perspective.
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 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #!/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
echo $i
done
echo
for i in ${disable[@]}; do
#pm disable-user $i
echo $i
done
|
Disable Developer options
Once you are done, disable USB Debugging at Settings > Addtional 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.
References
https://selivan.github.io/2020/02/25/removing-bloatware-from-xiaomi-miui-android.html
https://developer.android.com/studio/releases/platform-tools
https://developer.android.com/studio/command-line/adb
https://gist.github.com/Biswa96/81fe477079fa5279f7cfd7b98d5519c7