A non-root, automated ADB utility to debloat, privacy-harden, accelerate, and tune Xiaomi, Redmi, and generic Android TV / Google TV devices.
Tip
Looking for Samsung device optimizations? Check out:
- Galaxy Watch 4 / 4 Classic Optimizer & Debloater (
python3 optimize_galaxy_watch.py) - Samsung Galaxy Tab A8 Optimizer (
python3 optimize_samsung_tablet.py)
- 🗑️ Safe Debloating: Disables 20+ intrusive OEM telemetry, tracking, demo, and PatchWall services for
user 0(100% reversible without root). - 🛡️ Privacy & Anti-Telemetry Hardening: Disables automated crash dumps, background diagnostic reporting, and personalized ad tracking IDs.
- 📶 Wi-Fi Standby & 15-min Doze Disconnect Fix: Resolves the common Android TV bug where Wi-Fi drops after 15 minutes of inactivity due to Android Doze mode and aggressive Wi-Fi chip sleep.
- 🛑 Ad-Blocking via Private DNS (DNS-over-TLS): Configures system-wide encrypted DNS (NextDNS, AdGuard, Cloudflare) to block network-level ads and trackers across all apps.
- ⚡ Snappy UI Performance: Accelerates system animations to
0.5xfor responsive navigation. - 🔊 Soundbar & Picture Calibration: Configures uncompressed HDMI-ARC bitstream audio, eliminates remote click latency, and removes artificial MEMC motion smoothing (Soap Opera Effect).
- 🏠 Clean Launcher Setup: Seamlessly configures Projectivy Launcher as the default ad-free home screen.
- 🔒 Tailscale Anti-Doze: Whitelists Tailscale from Android battery optimization to maintain persistent mesh VPN connections.
- 🧹 Storage Cache Purge: Deep trims system cache and purges gigabytes of temporary streaming data.
-
Enable Developer Options on TV:
- Go to Settings
$\rightarrow$ Device Preferences$\rightarrow$ About. - Click Build 7 times until you see "You are now a developer!".
- Go to Settings
-
Enable USB / Network Debugging:
- Go to Settings
$\rightarrow$ Device Preferences$\rightarrow$ Developer options. - Turn ON USB debugging / Network debugging.
- Go to Settings
-
Find your TV's IP Address:
- Go to Settings
$\rightarrow$ Network & Internet$\rightarrow$ select your connected Wi-Fi/Ethernet network.
- Go to Settings
Run the interactive menu to select specific tweaks or inspect device health:
python3 optimize_tv.pyExecute all optimizations in unattended mode:
python3 optimize_tv.py --auto <TV_IP>(Example: python3 optimize_tv.py --auto 192.168.1.50)
# Debloat bloatware packages only
python3 optimize_tv.py --debloat
# Purge streaming app caches & temp files
python3 optimize_tv.py --clean
# Configure system-wide Private DNS (AdGuard / NextDNS placeholder)
python3 optimize_tv.py --dns <YOUR_PROFILE_ID>.dns.nextdns.io
# Or using AdGuard:
python3 optimize_tv.py --dns dns.adguard-dns.com
# To disable Private DNS:
python3 optimize_tv.py --dns off
# Boost UI animation scale (0.5x), cap background processes & apply Wi-Fi sleep fixes
python3 optimize_tv.py --speed
# Pair over Wi-Fi debugging (Android 11+ / Google TV)
python3 optimize_tv.py --pair <IP:PORT> <PAIRING_CODE>
# 1-Click Complete Restore (Restore all uninstalled stock apps, power timeouts & settings)
python3 optimize_tv.py --restoreClick to view debloated packages list
| Package Name | Category | Purpose |
|---|---|---|
com.miui.tv.analytics |
Telemetry | Xiaomi MIUI TV Analytics Engine |
com.xiaomi.statistic |
Telemetry | Xiaomi Background Statistics Service |
com.google.android.feedback |
Telemetry | Google Feedback Reporter |
com.google.android.tv.bugreportsender |
Telemetry | TV Bug Report Sender |
android.autoinstalls.config.xiaomi.amelie |
Bloatware | Xiaomi Partner Auto-Installer |
com.xiaomi.floatingframe |
Bloatware | Promotional Overlay Frame |
com.duokan.factorytest |
Bloatware | Factory Diagnostic Leftovers |
fusion.android.tv.demo |
Bloatware | Retail Demo Mode |
com.mitv.tvhome.atv |
PatchWall | PatchWall Launcher ATV Service |
com.mitv.tvhome.mitvplus |
PatchWall | Mi TV+ Sponsored Channels |
com.mitv.tvhome.michannel |
PatchWall | Mi Channels Service |
com.xiaomi.mimusic2 |
Bloatware | Stock Mi Music Player |
com.mitv.gallery |
Bloatware | Stock Mi Gallery |
com.mitv.videoplayer |
Bloatware | Stock Mi Video Player |
com.xiaomi.mitv.tvmanager |
Bloatware | Mi TV Manager RAM Booster |
com.xiaomi.mitv.mediaexplorer |
Bloatware | Stock File Explorer |
com.xiaomi.mitv.smartshare |
Bloatware | Redundant Screen Mirroring Service |
com.google.android.tvrecommendations |
Ads | Sponsored Home Row Recommendation Ads |
com.google.android.marvin.talkback |
Accessibility | Background Screen Reader Service |
com.android.printspooler |
Utility | Android Print Spooler (Unneeded on TV) |
stay_on_while_plugged_in = 3(Prevents Doze mode from shutting down networking while on AC)screen_off_timeout = 1800000(Extends inactivity timeout to 30 mins to prevent 15-minute Doze drops)wifi_sleep_policy = 2(Never disconnect Wi-Fi during standby)wifi_power_save = 0(Disable aggressive radio power throttling)wifi_suspend_optimizations_enabled = 0(Prevent Wi-Fi driver suspend freeze)network_wow = 1(Wake-on-Wireless)network_wol = 1(Wake-on-LAN)wifi_max_dhcp_retry_count = 5(Automatic DHCP re-acquisition on wake)ntp_server = time.google.com(Reliable clock sync to prevent SSL/cert timeouts)
private_dns_mode = hostnameprivate_dns_specifier = <YOUR_PROFILE_ID>.dns.nextdns.ioordns.adguard-dns.com
sound_effects_enabled = 0(Eliminates UI click audio stream downsampling & soundbar pops)tv_input_hdmi_edid_version = 1(Enables HDMI 2.0 Enhanced EDID)tv_picture_advance_video_mjc_effect = 0(Disables MEMC / Soap Opera Effect)tv_picture_advance_video_mpeg_nr = 0(Disables MPEG texture smudging)tv_picture_advance_video_dnr = 0(Disables Digital Noise Reduction blur)tv_picture_video_blue_stretch = 0(Restores natural color temperature)tv_picture_video_di_film_mode = 1(Enables 24 FPS Film Mode Cadence)
- No Root Required: All uninstalls are performed via
pm uninstall -k --user 0and can be restored anytime withcmd package install-existing. - Zero Identifiers: This repository contains no hardcoded private IP addresses, device serial numbers, or user-specific DNS tokens.
This project is licensed under the MIT License.