A cross-platform PowerShell tool to debloat and optimize Android TV devices. Runs on Windows, macOS, and Linux. Supports Nvidia Shield TV, Onn 4K Pro, Chromecast with Google TV, and other Android TV devices.
- Cross-Platform - Runs on Windows, macOS, and Linux (requires PowerShell 7+)
- Multi-Device Support - Auto-detects Shield, Onn 4K, Chromecast, Google TV Streamer
- Device-Specific Debloat - Different app lists for Shield vs Google TV devices
- Launcher Wizard - Install Projectivy/FLauncher/ATV/Wolf Launcher, safely disable stock
- APK Sideloading - Install APK files from local folder or custom path
- Health Reports - Temperature, RAM, storage, bloat scan with memory usage and recommended actions
- Live Monitor - Real-time vitals dashboard with auto-refresh (temp, RAM, top memory apps)
- Fast Network Scan - Parallel subnet scanning finds devices in seconds
- Performance Tuning - Animation speed, background process limits
- Safe Defaults - Disables rather than uninstalls, easy restore/recovery
- Keyboard Navigation - Arrow keys, letter shortcuts, ESC to cancel
These features have been implemented but not yet tested on real devices:
| Feature | Description | Notes |
|---|---|---|
| USB Device Support | Connect to Android devices via USB cable | Displays [USB] tag in device list. Note: Shield TV doesn't support USB debugging (host ports only). Works with phones/tablets. |
| PIN Pairing | Pair with Android 11+ / Google TV devices using network debugging | Experimental. For newer Chromecasts with Google TV and Android TV devices that require pairing codes. Not needed for Shield TV (use standard Connect IP instead). |
| Device | Status |
|---|---|
| Nvidia Shield TV (2015/2017/2019) | Fully tested |
| Onn 4K Pro (Walmart) | Fully tested |
| Chromecast with Google TV | Should work (Google TV profile) |
| Google TV Streamer (2024) | Should work (Google TV profile) |
| Platform | Status |
|---|---|
| Windows 10/11 (PowerShell 7+) | Fully tested |
| macOS (PowerShell 7+) | Fully tested |
| Linux/Ubuntu (PowerShell 7+) | Should work |
- PowerShell 7+ on all platforms (see installation below)
- Android TV with Developer Options enabled:
- Settings > Device Preferences > About > Click Build 7 times
- Settings > Developer Options > Enable Network Debugging
PowerShell 7 is required. Windows Terminal is also recommended for the best experience.
Option 1: winget (recommended)
winget install --id Microsoft.PowerShell; winget install --id Microsoft.WindowsTerminalOption 2: Download installers
- PowerShell 7: GitHub releases - get the
.msifile - Windows Terminal: Microsoft Store
After installing, open Windows Terminal, select PowerShell 7, and run:
pwsh .\Shield-Optimizer.ps1The easiest way to install PowerShell is via Homebrew:
# Install Homebrew if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install PowerShell
brew install powershell/tap/powershellAlternative: Download the .pkg installer from PowerShell releases.
# Install PowerShell
sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common
wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y powershell
# Run the script
pwsh ./Shield-Optimizer.ps1Option 1: Download from Releases (Recommended)
- Go to the Releases page
- Download
Source code (zip)orSource code (tar.gz) - Extract to a folder you'll remember (e.g.,
DownloadsorDocuments)
Option 2: Clone with git
git clone https://github.com/bryanroscoe/shield_optimizer.git
cd shield_optimizerImportant: You must run the script from the folder where it's located. The commands below assume you're in that folder.
- Open Terminal (macOS/Linux) or PowerShell 7 (Windows)
- Navigate to the folder containing the script:
cd /path/to/shield_optimizer - Run the script:
pwsh ./Shield-Optimizer.ps1
Force re-download ADB tools:
pwsh ./Shield-Optimizer.ps1 -ForceAdbDownloadTheme auto-detection:
The script automatically detects your system's light/dark mode setting. Override with -LightMode or -DarkMode if needed:
pwsh ./Shield-Optimizer.ps1 -LightMode # Force light theme
pwsh ./Shield-Optimizer.ps1 -DarkMode # Force dark themeADB tools download automatically on first run (platform-appropriate version). Accept the debugging prompt on your TV.
| Key | Action |
|---|---|
↑ ↓ |
Navigate menu |
← → |
Toggle options (YES/NO) |
1-9 |
Select device by number |
A-Z |
Select option by highlighted letter |
Enter |
Confirm |
ESC |
Back / Cancel / Abort |
This happens because PowerShell blocks unsigned scripts by default. Fix it with one of these options:
Option 1: Change execution policy (recommended)
- Open PowerShell 7 as Administrator
- Run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Option 2: Bypass for a single run
pwsh -ExecutionPolicy Bypass -File .\Shield-Optimizer.ps1Make sure you're using PowerShell 7, not Windows PowerShell:
| App | Version | Icon Color |
|---|---|---|
| PowerShell 7 (correct) | 7.x | Black/Dark |
| Windows PowerShell (wrong) | 5.x | Blue |
How to check: Run $PSVersionTable.PSVersion - major version should be 7+.
How to launch PowerShell 7:
- Open Windows Terminal
- Click the dropdown arrow next to the tab
- Select "PowerShell" (not "Windows PowerShell")
| Problem | Solution |
|---|---|
| Device not found | Enable Network Debugging, try Scan Network, check TV for auth prompt |
| Device shows UNAUTHORIZED | Look at your TV screen and accept the "Allow USB debugging?" prompt |
| Launcher won't switch | Use Launcher Wizard, press Home after disabling stock |
| Something broke | Use Recovery mode to re-enable all disabled packages |
| Wrong device type | Check Profile view, detection uses brand/model/packages |
| Scan finds nothing (macOS/Linux) | Make sure devices have Network Debugging enabled; try Connect IP |
| Colors hard to read | Theme auto-detects, but try -LightMode or -DarkMode to override |
- Disable over Uninstall - All changes reversible via Restore mode
- Recovery Mode - Emergency re-enable of all disabled packages
- Abort Anytime - ESC cancels mid-operation with partial summary
- Debloat research from community guides including florisse.nl/shield-debloat
- Built with AI assistance Gemini Pro and Claude Opus ( by an actual software engineer ) , tested on real devices
Use at your own risk. Modifying system apps carries some risk, but this tool prioritizes safe, reversible changes.
