A Windows batch script that removes bloatware from Android devices via ADB while keeping all critical system services intact.
- Third-party bloatware - Facebook, Netflix, LinkedIn, WPS Office
- Google services & apps - Play Services, Play Store, Gmail, YouTube, Chrome, Maps, Photos, Drive, and more
- Mi/MIUI apps (Xaomi phones) - Mi Music, Mi Weather, Mi Notes, Mi Browser components, GetApps Store, etc.
- MIUI ads & analytics - MSA (system ads), MIUI Analytics, Joyose tracking
- Misc bloat - Android Easter Egg, Daydreams
- MIUI/Xiaomi system services and frameworks
- Security Center and account services
- Core system components required for stability
Note: Google Play Services is removed.
- ADB installed and available in your system PATH (download)
- USB Debugging enabled on your Android device (Settings > Developer Options > USB Debugging)
- Device connected to your PC via USB
- Connect your device via USB and confirm the USB debugging prompt on the phone.
- Open a terminal and verify the connection:
You should see your device listed.
adb devices - Run the script:
debloat-android-safe.bat - Follow the on-screen prompts. The script will show
[OK]for each successfully removed package. - Reboot your device after the script completes.
The script uses adb shell pm uninstall -k --user 0 <package> for each app. This:
- Uninstalls the app for the current user only (user 0)
- Keeps the app data (
-kflag) so a factory reset can restore everything - Does not modify the system partition
Since packages are only uninstalled for user 0, a factory reset will restore all removed apps. To restore a single app without resetting:
adb shell cmd package install-existing <package.name>
Use at your own risk. While this script avoids removing critical system components, results may vary across devices and Android versions. Always check the uninstalled packages.