This skill should be used when the user asks to "remove bloatware", "debloat phone", "uninstall system apps", "clean up phone apps", "remove pre-installed apps", "disable bloatware", "free up phone space", "remove Xiaomi apps", "remove Samsung apps", "remove Google apps", "phone has too many apps", or wants to remove unwanted pre-installed applications from an Android device via ADB.
Safe removal of pre-installed bloatware from Android devices without root access. Uses per-user uninstall with data preservation for full reversibility.
adb shell pm uninstall -k --user <USER_ID> <package>
-k preserves app data (reinstallable from Play Store)--user removes only for that user profile (no root needed)adb shell cmd package install-existing --user <USER_ID> <package>Essential packages that will brick/break the device if removed:
com.android.systemui - System UI (status bar, notifications)com.android.settings - Settings appcom.android.phone - Phone/dialercom.android.providers.contacts - Contacts databasecom.android.providers.telephony - Telephony databasecom.google.android.gms - Google Play Servicescom.android.vending - Play Storecom.google.android.gsf - Google Services Frameworkcom.google.android.webview - WebView (breaks all apps using web content)com.google.android.inputmethod.latin - Gboard (keyboard)com.spreadtrum.ims / com.qualcomm.ims - IMS/VoLTEcom.google.android.permissioncontroller - Permission systemadb shell cmd shortcut get-default-launcher)adb shell cmd shortcut get-default-launcheradb shell pm list usersadb shell pm list packages -d# Detect user profiles
adb shell pm list users
# List third-party apps
adb shell pm list packages -3
# List all system apps
adb shell pm list packages -s
# List already disabled
adb shell pm list packages -d
Consult references/bloatware-database.md for known bloatware per vendor
(Xiaomi, Samsung, Google, Carrier, etc.).
adb shell pm list packages | sed 's/package://' | sort > /var/www/adb_tools/data/backup_$(date +%Y%m%d).txt
Execute removals per category (Xiaomi, Facebook, Google, Other), per active user:
for user in $(adb shell pm list users | grep -oP '\{\K\d+'); do
adb shell pm uninstall -k --user "$user" "$PACKAGE"
done
# Check remaining apps
adb shell pm list packages -3
# Screenshot the app drawer
adb shell screencap -p /sdcard/after.png && adb pull /sdcard/after.png /tmp/after.png
# Check for boot issues
adb shell dumpsys activity processes | grep -c "\*"
Create a restore script listing all removed packages with
adb shell cmd package install-existing --user $USER $PACKAGE for each.
Pre-built scripts at /var/www/adb_tools/scripts/:
cleanup_bloatware.sh - Interactive/automated bloatware removal
--all removes everything without prompting--dry-run shows what would be removed--category xiaomi|facebook|google|other targets one category--package com.x.y removes a single packagerestore_bloatware.sh - Reverses removals
--list shows all restorable packages--category google restores one categorycom.x.y restores a single packagereferences/bloatware-database.md - Known bloatware by vendor with risk levels