Skip to content

Instantly share code, notes, and snippets.

@vsnthdev
Created October 17, 2020 06:09
Show Gist options
  • Save vsnthdev/aa98694dab81e09ad97892a5d8bf771c to your computer and use it in GitHub Desktop.
Save vsnthdev/aa98694dab81e09ad97892a5d8bf771c to your computer and use it in GitHub Desktop.
MIUI Bloatware Removal Script
#!/usr/bin bash
# DEFINE THE BLOATWARE APPLICATIONS WHICH
# ARE SAFE TO BE REMOVED
declare -a bloatware=(
# Google Bloatware
"com.google.android.apps.docs" # Google Docs
"com.google.android.apps.maps" # Google Maps
"com.google.android.apps.photos" # Google Photos
"com.google.android.apps.tachyon" # Google Duo
"com.google.android.apps.subscriptions.red" # Google One
"com.google.android.music" # Google Play Music
"com.google.android.apps.youtube.music" # YouTube Music
"com.google.android.videos" # Google Play Movies & TV
"com.google.android.apps.googleassistant" # Google Assistant
"com.google.android.apps.docs" # Google Drive
"com.google.android.gm" # Gmail
"com.google.android.googlequicksearchbox" # Google
"com.google.ar.lens" # Google Lens
"com.google.android.apps.nbu.paisa.user" # Google Pay
"com.google.android.youtube" # YouTube
# MIUI Bloatware
"com.mi.globalbrowser" # Mi Browser
"com.mi.android.globalminusscreen" # App Vault
"com.mi.android.globalFileexplorer" # Mi File Manager
"com.android.deskclock" # MIUI Clock (with a confusing name)
"com.mipay.wallet.in" # Mi Wallet (India)
"com.google.android.feedback" # Feedback app
"com.miui.backup" # Backup app
"com.miui.bugreport" # Bug reporting app
"com.miui.calculator" # Mi Calculator
"com.miui.cleanmaster" # System Cleaner
"com.miui.compass" # MIUI Compass
"com.miui.fm" # MIUI FM
"com.miui.freeform" # MIUI Picture in Picture service
"com.miui.hybrid" # Quick Apps (data mining app)
"com.miui.hybrid.accessory" # Quick Apps (data mining app)
"com.miui.miservice" # Services & feedback
"com.miui.mishare.connectivity" # Mi Share
"com.miui.miwallpaper" # Wallpaper app (may not change lockscreen wallpaper after)
"com.miui.msa.global" # MSA or MIUI Ad Services
"com.miui.notes" # Notes
"com.miui.phrase" # Frequent phrases
"com.miui.player" # Music Player
"com.android.soundrecorder" # Sound Recorder
"com.miui.screenrecorder" # Screen Recorder
"com.miui.touchassistant" # Quick Ball feature
"com.miui.videoplayer" # MIUI Video player
"com.miui.weather2" # Weather app
"com.miui.yellowpage" # Yellow Page app
"com.xiaomi.calendar" # Mi Calendar
"com.xiaomi.glgm" # Games
"com.xiaomi.joyose" # Junk and safe to remove
"com.xiaomi.midrop" # Mi Drop
"com.xiaomi.mipicks" # GetApps (Xiaomi App Store)
"com.xiaomi.miplay_client"
"com.xiaomi.mirecycle" # Mi Recycle (MIUI Security)
"com.xiaomi.payment" # Mi Pay
"com.xiaomi.scanner" # Scanner app
"com.tencent.soter.soterserver" # Chinese Payment service
"com.android.providers.downloads" # Downloads
"com.android.providers.downloads.ui" # Downloads
"com.micredit.in" # Mi Credit
"com.duokan.phone.remotecontroller" # Mi Remote
"com.android.thememanager" # MIUI Themes
"com.android.thememanager.module" # MIUI Themes
"com.miui.newmidrive" # MIUI Drive
"com.xiaomi.mircs" # MIUI to MIUI Message
"com.miui.cloudservice" # Cloud service
"com.miui.micloudsync" # Cloud Sync
"com.miui.cloudservice.sysbase" # Cloud service
"com.miui.cloudbackup" # Cloud Backup service
"com.miui.analytics" # MIUI Analytics (spyware)
"com.xiaomi.discover" # Xiaomi System apps updater
# Packages to keep Mi Account working uncomment
# them to remove Mi Account functionality.
# Warning: Signout from device before removing these packages.
# Your phone won't be able to sync with Xiaomi servers after
# removal of the below packages.
# "com.xiaomi.account" # Mi Account
# "com.miui.daemon" # Miui Daemon
# "com.xiaomi.misettings" # Mi Settings
# "com.xiaomi.xmsf" # Xiaomi Service Framework
# "com.xiaomi.xmsfkeeper" # Xiaomi Service Framework
# Thirdparty Apps
"in.amazon.mShop.android.shopping" # Amazon
"com.facebook.appmanager" # Facebook
"com.facebook.services" # Facebook
"com.facebook.system" # Facebook
"com.facebook.katana" # Facebook
"com.netflix.partner.activation" # Netflix
"com.netflix.mediaclient" # Netflix
"com.booking" # Booking
"com.linkedin.android" # Linkedin
"com.igg.android.lordsmobile" # Lords Mobile
"cn.wps.moffice_eng" # WPS Office
"cn.wps.xiaomi.abroad.lite" # WPS Office
"com.funnypuri.client" # Zili
)
# WAIT FOR A DEVICE TO CONNECT
clear
tput civis
echo "This $(tput setaf 6)bash$(tput sgr0) script will 🧻 remove bloatware from a Xiaomi device"
echo "Waiting ⏳ for a device to be connected"
adb wait-for-device
# TAKE DEVICE MARKET NAME
device_name=$(adb shell getprop ro.product.odm.marketname)
if [ -z $device_name ]; then
device_name="$(adb shell getprop ro.product.manufacturer) $(adb shell getprop ro.product.model)"
fi
# LOOP THROUGH ☝️ THE ABOVE APPS
# AND REMOVE THEM
for i in "${bloatware[@]}"
do
clear
echo "πŸ› Removing: $(tput bold)$(tput setaf 6)$i$(tput sgr0)"
adb shell pm uninstall -k --user 0 "$i" > /dev/null 2>&1
done
# FINALLY, REBOOT THE DEVICE
clear
echo "Successfully debloated your $device_name πŸ₯³"
adb reboot &
echo "πŸ“± $device_name will reboot now"
echo "You can now safely πŸ”Œ unplug your $device_name"
echo ""
echo "Developed & Maintained by Vasanth Developer"
echo "For queries 🐦 tweet $(tput bold)$(tput setaf 6)@vasanthdevelop$(tput setaf 0)"
tput cnorm
@santosh
Copy link

santosh commented Oct 17, 2020

I skipped removing Google items. Yet I am seeing this void space at the left-most home screen. This is the place where news and all shows on a stock android.
What thing am I missing?

@vsnthdev
Copy link
Author

Is that a Poco X3 "Karna"? For other phones I am not really sure πŸ€·β€β™‚οΈ

@santosh
Copy link

santosh commented Oct 18, 2020

I did this on a Redmi 9A. πŸ™„

@vsnthdev
Copy link
Author

I'll need to know your device's stock packages before I can note what are missing πŸ€”

@santosh
Copy link

santosh commented Oct 18, 2020

How did you find it for your Poco?

@vsnthdev
Copy link
Author

Use the command πŸ‘‡

adb shell pm list packages

to get a list of all installed packages when the phone is in the stock state (that's when no third-party apps are installed). Then research for each package name and what it does and determine if it's bloatware πŸ™‚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment