A Fire TV Stick that has run for years gets slow in a very specific way. Our test unit, a Fire TV Stick 2nd gen (model AFTT, codename "tank") on Fire OS 5.2.9.5, started the session with only about 138 MB of memory available and roughly 150 MB sitting in swap. The household watches almost nothing but YouTube. Everything else on it was weight.
So we handed the stick to Claude Code and asked it to debloat the device, with one extra twist: there was no physical remote. This post is the honest write-up. It covers what worked, what Fire OS 5 flatly refused, the workaround that gave the biggest felt improvement, and a short path you can follow on your own Fire TV. The tooling lives in a public repo, debloat-fire-stick-claude-code, built on the MIT-licensed CleanYourTV project.
TL;DR: questions people ask about debloating a Fire TV
| Question | Short answer |
|---|---|
| Can Claude Code debloat a Fire TV? | Yes over ADB on Wi-Fi, but how much depends on Fire OS. Newer versions allow disabling many Amazon packages; our Fire OS 5.2.9.5 did not. |
| Do I need a remote? | Not if the stick is on Wi-Fi. The repo includes a local-API client and a browser remote. |
| What did we actually remove? | Nothing from Amazon. We hid 7 unused user-installed apps and set animation scales to 0.5. |
| What helped most? | A tiny "YouTube Home" app that replaces the ad-filled home screen in practice. |
| Is it reversible? | Yes. Backups come first, pm hide is undone with pm unhide, and firehome/install.sh --remove removes the launcher. |
| Does CleanYourTV work on Fire TV? | Only the debloat half. Fire OS keeps Amazon's launcher as Home, so the custom launcher step does not apply. |
| Does Fire TV Stick 4K Select work? | No. It runs Vega OS and cannot be debloated over ADB. |
What is CleanYourTV, and how does the Fire TV repo relate to it?
CleanYourTV is an open-source prompt plus toolkit. You paste a prompt into a coding assistant, which connects to an Android TV over ADB on Wi-Fi, takes a backup, disables bloat with pm disable-user (never uninstall), and installs a clean launcher. It ships tested debloat lists for roughly 90 TV models, including the Fire TV Stick 4K (Fire OS 6) and Fire OS 7 TVs.
On Fire TV only the debloat half applies, because Fire OS keeps Amazon's launcher as Home. Our repo extends CleanYourTV with the pieces a stubborn, remote-less, old Fire stick needed: a way to drive the TV without a remote, a hide mode for Fire OS 5, safer restore scripts, and a replacement home screen. If you run Claude Code every day, the Claude Code commands reference covers the session mechanics we lean on here.
How do you control a Fire TV with no physical remote?
This was the first wall. ADB debugging is off by default on a Fire TV, and turning it on needs menu navigation. With no remote, there is no navigation.
Claude found the stick on the local network without being told where it was. Its MAC address prefix belonged to Amazon, port 8009 and port 60000 were open, and ADB on port 5555 was not yet listening. Port 8009 is a DIAL service, the same discovery mechanism the official Fire TV phone app uses.
The local API the Fire TV phone app uses
The sequence the repo's tools/firetv.py implements:
POST /apps/FireTVRemoteon port 8009 starts a FireTVRemote app on the stick, which opens an HTTPS API on port 8080.POST /v1/FireTV/pin/displaymakes the TV show a 4-digit PIN on screen.POST /v1/FireTV/pin/verifywith that PIN returns a client token.POST /v1/FireTV?action=dpad_up(ordpad_down,dpad_left,dpad_right,select,back,home,menu) presses a key.
Two gotchas cost us time, and they are worth knowing if you build on this. First, key presses must be sent with no request body at all. Even an empty JSON object makes the stick answer HTTP 500 with a NullPointerException. Second, the key names are dpad_up and friends, not up.
A usable remote in the browser
A key-press API is not a remote. So tools/remote.py serves a remote-control page from your Mac with a D-pad, OK, Back, Home and Menu, media and volume keys, keyboard shortcuts, typing into the TV, and a screen preview. It works over ADB, or over the Fire TV API alone with --no-adb.
This page is the unsung hero of the repo. Using it, the user turned on Settings > My Fire TV > Developer options > ADB debugging, then accepted the "Allow USB debugging?" prompt on screen. If Developer options is hidden, open My Fire TV > About and press select seven times on the device name.
How does Claude Code talk to the stick over ADB?
Once debugging is on, the stick listens for ADB on Wi-Fi. Two practical details shaped the setup.
On macOS, Local Network privacy can block the stock adb binary from reaching devices on your LAN. The repo uses a pure-Python ADB client (adb-shell) so that Claude Code's shell session is not at the mercy of that permission.
Second, Fire OS 5's adbd accepts only one connection at a time. If the browser remote holds an ADB session, your scripts cannot connect. So the remote runs with --no-adb (key presses go through the Fire TV API) while Claude's scripts own the ADB connection.
What should you back up before changing anything?
Before a single package was touched, Claude saved the package lists, getprop output and the system settings. Android 5.1 shaped the commands:
| Item | Old assumption | What worked on Android 5.1 |
|---|---|---|
| Read settings | settings list | Does not exist; use content query --uri content://settings/global (and secure, system) |
cmd utility | cmd package ... | Does not exist on this version |
| Package state | Query and toggle with cmd | Use pm directly |
The undo record is written before the change, not after. That habit mattered later. If you want the same discipline for other agent work, the loop engineering guide for coding agents walks through checkpointing and verify steps.
What did Fire OS 5.2.9.5 block?
Here is the part most debloat guides skip. This is what the firmware refused.
| Command | Result on Fire OS 5.2.9.5 |
|---|---|
pm disable-user | SecurityException: Permission Denial: attempt to change component state for every package, system or user-installed |
pm hide on user-installed apps | Works ("new hidden state: true"); undo with pm unhide |
pm hide on Amazon system apps | Returns "new hidden state: false", i.e. no effect |
pm uninstall -k --user 0 | Fails with DELETE_FAILED_INTERNAL_ERROR |
Enable an accessibility service via settings put secure enabled_accessibility_services | Silently ignored; the value reads back empty |
There was one more reason not to push harder. Android 5.1's pm has no install-existing command, so uninstalling a system app for user 0 could only be undone by a factory reset. And setting up a stick after a reset needs a physical remote. That path was off the table.
So the headline from the CleanYourTV approach, "disable with pm disable-user", simply does not work here. Amazon's own apps (Prime Video, Alexa, ads, telemetry and the launcher) stayed.
What did we actually do on the stick?
With the big levers locked, we pulled the small ones that Fire OS 5 allows.
- Hid seven unused user-installed apps: Netflix, JioHotstar, SonyLIV, Zee5, Jio, and two unknown video apps from the Appstore. The repo's disable and restore scripts gained a
HIDE=1mode that usespm hide, and the undo record is saved before any change. - Set the three animation scales to 0.5, which makes the interface feel snappier even when the hardware cannot do more.
Memory available rose, but modestly: later checks showed roughly 150 to 167 MB against the 138 MB we started with. Before the work, the biggest memory users were Amazon's home launcher at about 162 MB, Prime Video at about 49 MB and Alexa (com.amazon.vizzini) at about 35 MB. Storage sat at 4.7 of 5.9 GB used. None of those top three could be removed.
That is the honest result for a 2016 stick with 895 MB of RAM. If a guide promises a debloated Fire TV Stick 2nd gen will feel new, it is overselling.
Which packages must you never touch on a remote-less stick?
Debloat lists for Android TVs are written for people who own a working remote. Without one, a single wrong disable can cut off your only way back in. Keep everything that provides:
- Wi-Fi provisioning and the remote API:
dialservice,turnstile,firerestapiframework,storm.lightning,whisperlinkandwhisperplay, andssdp. If Wi-Fi breaks, there is no way back in. - Bluetooth and remote pairing, so a replacement remote can still pair.
- The keyboard, Settings, the Appstore and account sign-in.
Test any risky command on one harmless package first. We did exactly that with a restore test. Running pm install -r against a system APK turned the package into an "updated system app" copy in /data. We caught that in the verification step and reverted it with pm uninstall, which removes the update only. A one-package test turned a potentially stick-breaking mistake into a footnote.
For a broader look at how isolated, reversible agent workflows are set up, see the Capsem VM sandbox write-up. A TV is not a sandbox, so the lesson is: your undo record is the sandbox.
The workaround that helped most: a YouTube-only home screen
The slowest, most annoying part of the stick was not an app. It was Amazon's home screen: full-screen Prime Video ads and sponsored tiles that cannot be removed. For a household that opens only YouTube, that screen is the product.
Fire OS will not hand Home to another launcher, and it blocks accessibility services, which would be the usual trick. So Claude built a different mechanism.
How the YouTube Home app works
Claude built a tiny app, YouTube Home, at 17 KB with minSdk 22. It was built without Gradle, using the Android SDK's aapt2, javac, d8, zipalign and apksigner. The screen is black with a clock and date, one big YouTube tile, and Settings and "Fire TV home" buttons.
The trick is a foreground service. With the READ_LOGS permission granted through pm grant, the service reads the system log. Whenever ActivityManager logs a start of the HOME intent, which looks like START u0 {... cat=[android.intent.category.HOME] ... cmp=com.amazon.tv.launcher/...}, YouTube Home brings itself to the front. A BOOT_COMPLETED receiver opens it at startup.
We verified three behaviors on the stick:
- Pressing Home lands on YouTube Home.
- Pressing OK opens YouTube.
- Pressing Back from YouTube returns to YouTube Home.
On Fire OS the Settings intent opens the launcher's Settings grid, which is how the Settings button works. The app lives in the repo as firehome/, installed with install.sh and removed with install.sh --remove.
This is the biggest felt improvement, and it came from sidestepping the launcher rather than disabling it. The trade-off is plain: Amazon's launcher still runs in memory, and there is a brief moment after you press Home before YouTube Home takes over. If you like building small tools like this with an agent, see how Claude Code mods and plugins approach extending the agent itself.
How do you do this on your own Fire TV?
A short, practical path. Read the safety section above first.
- Enable ADB debugging. Settings > My Fire TV > Developer options > ADB debugging. If Developer options is missing, go to My Fire TV > About and press select seven times on the device name.
- Find the stick's IP. Settings > My Fire TV > About > Network. We use
192.168.1.50as the example below. - Clone the reference repo and create the Python environment:
git clone https://github.com/whyashthakker/debloat-fire-stick-claude-code
cd debloat-fire-stick-claude-code
python3 -m venv tools/venv && tools/venv/bin/pip install -r tools/requirements.txt
- Probe the device:
TV_HOST=192.168.1.50 tools/venv/bin/python -I tools/tv.py --probe
- Give Claude Code the job. Open Claude Code in the repo and use the prompt from its README: back up first, ask which apps you use, keep Wi-Fi, remote, Bluetooth and Appstore services, and work in small batches.
- Back up first, then apply a debloat list in small batches, taking a screenshot after each batch.
- Restore anything with
tools/restore.sh.
Variations by situation
| Your situation | What to do |
|---|---|
| Fire OS 5 (older sticks) | Use HIDE=1 for the disable and restore scripts; expect pm disable-user to be denied |
| Fire OS 6 or 7 | Use CleanYourTV's Fire TV Stick 4K or Fire OS 7 lists; some packages are protected |
| No physical remote | Run tools/firetv.py pair, read the PIN on the TV, then tools/firetv.py verify with that PIN, then tools/remote.py --no-adb |
| You only watch YouTube | TV_HOST=192.168.1.50 firehome/install.sh for the YouTube-only home |
Close ADB debugging in Developer options when you are done. A stick with ADB open on your Wi-Fi is an unnecessary door.
What people are asking about Fire TV debloating
Is newer Fire OS better for debloating?
Yes. Fire OS 6 and 7 allow disabling many Amazon packages over ADB, and CleanYourTV's Fire TV Stick 4K and Fire OS 7 lists show which ones. Some packages are protected. Fire OS 5.2.9.5 essentially allowed none of it, which is exactly why this post exists.
Should I root the stick instead?
Rooting a 2nd-gen stick is possible through a community hardware unlock, but it is risky: it means opening the case and it can brick the device. We did not do it, and we are not providing instructions. Treat it as a caveat, not a plan.
Is there anything else that reduces ads?
Router-level DNS ad blocking is an optional extra. It does not make the stick faster, but it can cut ad traffic for the whole network.
What about the Fire TV Stick 4K Select?
It runs Vega OS, which is not Android-based, so it cannot be debloated over ADB. The approach here is for Android-based Fire OS only.
Will a 2016 stick feel fast after this?
No. It has 895 MB of RAM, and it stays slowish. The home-screen swap is the biggest felt improvement. If you want smooth playback and menus, a newer stick is the real fix.
Limitations and honest caveats
- Our numbers come from a single device. Memory readings vary with what is running, so treat 150 to 167 MB as a range, not a promise.
- We did not measure boot time or app launch time, so we make no speed claim beyond what we observed.
- The log-watching approach depends on Fire OS 5 logging launcher intents the way we saw. A different firmware may not.
- Hiding apps does not free storage. It stops them from appearing and running.
Related reading
- Claude Code commands: the complete reference
- Loop engineering for coding agents with Claude Code
- Claude Code mods: the official TypeScript plugin guide
- Capsem: a VM sandbox for Claude Code, Gemini CLI and Codex
- Claude Code reverse-engineers hardware: a Linux driver story
- BigArrow: AI agents that point at your screen
- What are agent skills? The complete guide
- External: debloat-fire-stick-claude-code and CleanYourTV (MIT)
Details here are accurate as of October 20, 2026, from one session on a Fire TV Stick 2nd gen running Fire OS 5.2.9.5. Fire OS versions, package names and repo contents change; back up before you run anything on your own device.
