Jailbreaking the Fire TV Stick 3 (sheldonp) — From Bootrom to Lean LineageOS 20 TV
A complete walkthrough of hardware Y-splitting, GhostLock preloader downgrade, Kamakiri bootrom recovery, resolving OTA/watchdog bootloops, and optimizing Android 13 TV for 1 GB RAM.
The Amazon Fire TV Stick 3rd Gen (Model AFTSSS, codename sheldon / sheldonp, released in 2020) is practically everywhere. You can find them on sale for £20 to £25, and on paper, the silicon under the plastic housing is surprisingly capable for the price: a MediaTek MT8695 SoC with four ARM Cortex-A53 cores clocked up to 1.69 GHz, an Imagination PowerVR Rogue GE8300 GPU, and 8 GB of eMMC storage.
Unfortunately, it also ships with FireOS. Over the years, Amazon has turned FireOS 7 into an aggressive ad billboard. It pushes fullscreen autoplay video trailers, telemetry daemons, unremovable home screen recommendations, and blocks custom third-party launchers. To make matters worse, the device has an ultra-constrained 1 GB of LPDDR4 RAM (~897 MB usable).
I already had one of these sticks lying around, but it had degraded into a completely unusable paperweight on stock FireOS—simple launcher navigations were taking over 30 seconds just to register a single remote click or tile movement. Under stock FireOS, background services and ad daemons choke the memory so badly that even navigating the settings menu drops frames.
I wanted to liberate this stick: strip out Amazon entirely, flash clean LineageOS 20 TV (Android 13), install an ad-free launcher, and hook it up to Tailscale so I can remotely manage and debug it over wireless ADB from anywhere in the world.
What I expected to be an afternoon flashing project quickly turned into a multi-day gauntlet of hardware watchdog resets, poisoned backups, unbootable TrustZone mismatches, ghost OTA updates, and power-cycling boot issues that had me constantly eyeing my USB power meter thinking I had fried the hardware.
Here is the complete story of how I broke it, how I diagnosed it, the mistakes I made along the way, and the exact working steps to turn this £20 dongle into a lean, blazing-fast Android TV 13 box.
[!WARNING] Low-level exploits involving the MediaTek Boot ROM, preloader downgrades, and partition table manipulation carry inherent risks of bricking your device. Proceed entirely at your own risk. While Kamakiri’s bootrom recovery harness can recover almost all soft-bricks, hardware failure is always possible.
1. Power & Data Splitting: The Sacrificial Y-Cable
The first obstacle with the Fire TV Stick 3 is physical: it powers and communicates over a single micro-USB port. To exploit the MediaTek bootrom and flash partitions, you need an active USB data connection to your PC.
Here is the trap: standard PC USB 2.0 ports strictly throttle current delivery to 500 mA.
During normal video playback, the stick sips power. But during Boot ROM handshakes, partition writing in TWRP, and early kernel initialization, the MT8695 frequently spikes past 1 A. If you try to power the stick purely off your computer’s USB port, you will experience sudden brownouts, kernel panics, and corrupted partition writes mid-flash.
I solved this by building a dedicated Micro-USB Y-Splitter with a 5V USB-C PD Trigger Board:
Host PC (Data + Common GND) External 5V USB-C PD Supply
[USB-A / USB-C] [PD Trigger Board]
│ │
D+ │ D- │ GND +5V │ GND
────┼──────┼──── ─────┼────
│ │ │
└──────┼───────────────┬────────────────┘
│ │ (D+, D-, +5V, GND)
▼ ▼
[Micro-USB Male Plug]
│
[Fire TV Stick 3]
The Wiring Architecture
- Data Lines (D+ and D-): Routed directly to the host PC for ADB, fastboot, and MediaTek bootrom serial communication.
- Ground (GND): Shared across the host PC, the power supply, and the Fire TV Stick. You must keep ground tied to the host PC—USB differential signaling requires a common ground reference between the host controller and the device.
- Power (VBUS / +5V): Completely severed from the host PC side and fed exclusively by an external USB-C Power Delivery (PD) trigger board set to 5V.
Assembly
- Take a sacrificial micro-USB data cable and strip back the outer jacket.
- Locate the four internal wires: Red (+5V VBUS), Black (GND), White (D-), and Green (D+).
- Cut the Red wire on the PC-facing side. This is critical: if you leave it connected, you will backfeed 5V from your external power supply straight into your computer’s USB controller or motherboard.
- Solder the Fire TV Stick side’s Red wire to the
VBUSpad of a 5V USB-C PD trigger board. - Tap the Black (GND) wire and solder a lead to the PD trigger board’s
GNDpad, ensuring that the host PC’s ground, the PD board’s ground, and the Fire TV Stick’s ground are all tied together into a single common ground. - Plug the PD trigger board into a reliable 5V/2A+ USB-C power adapter or power bank, and the USB-A side into your Linux PC.
With this cable, the Fire TV Stick gets clean, uninterrupted high-amperage power while passing high-speed USB 2.0 data directly to the host.
2. GhostLock: In-Software Preloader Downgrade via Temp Root
Traditionally, unlocking MediaTek Fire TV sticks with the Kamakiri exploit required cracking open the plastic casing, removing the soldered metal EMI shield, and shorting a microscopic resistor (CLK to GND) with a paperclip or tin foil to force the SoC into bootrom handshake mode.
Fortunately, modern FireOS 7 firmware builds running on Linux kernel 4.4 can be downgraded completely in-software using GhostLock by R0rt1z2 (discussed on XDA).
The Exploit: Linux 4.4 Futex-PI Race Condition
GhostLock exploits a known memory corruption vulnerability in the Linux kernel’s futex (fast userspace mutex) Priority Inheritance (futex-PI) implementation. By racing lock states across concurrent threads from an unprivileged ADB shell (UID 2000), the exploit corrupts kernel memory structures and writes controlled credentials, instantly elevating the process to root (UID 0) in memory.
The No-Teardown Workflow
- Boot the Fire TV Stick into stock FireOS.
- Go to Settings -> My Fire TV -> About, and click the device name 7 times to enable Developer Options.
- Under Developer Options, turn ADB Debugging ON.
- Plug the stick into your Linux PC using our Y-cable and verify ADB:
adb devices
- Clone the GhostLock 4.4 branch on your host machine:
git clone https://github.com/R0rt1z2/GhostLock.git -b 4.4
cd GhostLock
- Flash the Vulnerable Preloader (
downgrade.sh): Execute the downgrade script:
./downgrade.sh
[!NOTE]
downgrade.shexecutes the futex temp-rooting exploit itself as part of its automated run. You do not need to runroot.shbeforehand. (root.shis provided in the repository purely as an optional standalone test if you want to verify that the temp-root exploit succeeds on your specific FireOS build without flashing anything).
Under the hood, downgrade.sh runs the temp-root payload to elevate its ADB session, unlocks the bootloader preloader partition (/dev/block/mmcblk0boot0), and overwrites it with an older preloader binary vulnerable to the Kamakiri bootrom exploit.
Once finished, the device is prepped for the bootrom stage—no screwdrivers, no paperclips, and no hardware disassembly required.
3. Kamakiri Bootrom Exploit, TWRP & The “Golden Backup”
Now that the preloader is downgraded, we use the Kamakiri exploit suite (discussed on XDA) to permanently unlock the bootloader and flash TWRP recovery.
The BROM Handshake
MediaTek SoCs feature a read-only Boot ROM burned into silicon. When the preloader is downgraded or corrupted, the SoC drops into USB serial download protocol (handshake mode) on /dev/ttyACM0. Kamakiri injects a payload via a buffer overflow in this protocol, bypasses hardware cryptographic signature verification, installs a patched little kernel (lk), and writes a custom microloader.
Executing the Unlock
- Kill ModemManager: On modern Linux distros,
ModemManagerattempts to probe any newly discovered serial port as an AT modem, which corrupts the time-critical BROM handshake:
sudo systemctl stop ModemManager
sudo systemctl disable ModemManager
- Clone Kamakiri checking out the dedicated
sheldonbranch:
git clone https://github.com/amonet-kamakiri/kamakiri.git -b sheldon
cd kamakiri
- Launch the bootrom listener:
sudo ./bootrom-step.sh
- Power-cycle the Fire TV Stick by unplugging the USB-C power lead and plugging it back in.
- The script immediately catches the preloader handshake, runs the payload, patches
lk, and writes Kamakiri’s custommicroloader.bin. - Next, run the fastboot step:
sudo ./fastboot-step.sh
This unlocks the bootloader flags and flashes TWRP (Team Win Recovery Project) to the recovery partition. The stick will reboot into TWRP.
The Backup I Thought I Made
At this point, I felt like a responsible hacker. The golden rule of device modding is to take a full eMMC backup before touching anything. In TWRP, I ran:
adb shell twrp backup SDBOM
adb pull /data/media/0/TWRP/BACKUPS ./twrp_factory_backup
I had my System, Data, Boot, OEM, and Misc partitions backed up safely on my hard drive. Or so I thought. As I would find out an hour later, this backup had a fatal flaw.
4. The Bootloop Nightmare: Watchdogs, Poisoned Backups & Staged OTAs
With TWRP running, my next goal was to achieve root on stock FireOS before doing anything else.
I grabbed the latest Magisk (v31.1), patched the boot image, flashed it, and rebooted.
And that is where everything went completely wrong.
The white Amazon logo appeared on screen. It stayed there. And stayed there. Exactly 60 seconds later, the screen went black, the stick power-cycled, and the Amazon logo came back. A continuous, perfectly timed 60-second bootloop.
This bootloop and relentless power cycling was what genuinely convinced me I had bricked the stick. To monitor what the hardware was actually doing, I hooked up an inline Kowsi KWS-X1 USB-C PD power meter:
- On cold boot, current drew around 0.85 A to 1.1 A as the MT8695 and memory initialized.
- Once the white Amazon logo appeared, current stabilized at ~0.62 A.
- Then, at exactly the 60-second mark, current abruptly collapsed to 0.00 A, the voltage dipped, and the meter showed the board executing a full hardware power-cycle before climbing back to 0.85 A.
Over on my Linux laptop, dmesg -w was firing a non-stop sequence of USB disconnects and resets:
[ 142.104521] usb 1-1.2: USB disconnect, device number 42
[ 143.512089] usb 1-1.2: new high-speed USB device number 43 using xhci_hcd
[ 143.641205] usb 1-1.2: New USB device found, idVendor=0e8d, idProduct=2000, bcdDevice= 1.00
[ 143.641212] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 143.641216] usb 1-1.2: Product: MT65xx Preloader
[ 143.641219] usb 1-1.2: Manufacturer: MediaTek
[ 144.205112] usb 1-1.2: reset high-speed USB device number 43 using xhci_hcd
Every single minute, like clockwork, the stick died and restarted.
Naturally, I thought: “No problem, I’ll just restore my clean TWRP backup.”
I booted back into TWRP, restored boot.emmc.win, and rebooted.
It was still bootlooping. Every 60 seconds, on the dot.
Failure 1: The 60-Second Hardware Watchdog (mtk-wdt)
Why was it rebooting every exactly 60 seconds?
MediaTek’s MT8695 arms a hardware watchdog timer (wdt) in silicon during boot. In stock FireOS, the /init process regularly writes to /dev/watchdog (“petting” the dog) to prove the OS is alive.
Starting around version 26, Magisk overhauled its early-init hijacking mechanism, introducing dynamic init-ld linking and overlay.d injection. On older 32-bit MediaTek kernels (like FireOS 7’s Linux 4.4.190), Magisk’s patched init hung indefinitely waiting on proprietary Amazon system properties. Because /init froze, it stopped petting the watchdog. After exactly 60 seconds, the hardware watchdog barked, pulled the SoC’s reset line, and hard-rebooted the stick.
[!IMPORTANT] Magisk Compatibility on FireOS 7: If you are rooting stock FireOS 7 on
sheldon/sheldonp, do not flash modern Magisk (v26–v31). The last fully working version is Magisk v25.2 (orMagisk-25.1.FTV.apk).
Failure 2: The Poisoned Backup
Why did restoring my TWRP backup fail to fix it?
When I investigated the timestamps, I realized the mistake: I had originally installed Magisk before I pulled my initial TWRP backup. My “golden backup” was already infected with the broken Magisk patch. Restoring boot.emmc.win was faithfully reinstalling the watchdog crash every single time.
Failure 3: The Ghost OTA Chunks
Even after getting a stock boot image in place, the device still refused to boot.
It turns out FireOS had silently downloaded a 125 MB system update in the background prior to unlocking and staged the update chunks inside /cache/ and /data/local/tmp/gl. With an unlocked bootloader and downgraded preloader, FireOS detected these staged update files on boot and attempted to verify and apply them. Because the signatures and partition hashes no longer matched, the update engine threw an unhandled exception and panicked the kernel.
The Lifesaver: Kamakiri ./boot-recovery.sh
At this stage, the stick appeared hard-bricked. It wouldn’t boot to Android, ADB was dead, fastboot wouldn’t respond, and recovery key combos on OTG keyboards were ignored.
This is where the magic of Kamakiri shines. Because Kamakiri exploits the low-level MediaTek Boot ROM, the device is practically impossible to brick by software mistakes.
Whenever the stick got stuck in a reboot loop:
- I put Kamakiri’s recovery script into listening mode on my laptop:
cd kamakiri sudo ./boot-recovery.shBash
- Unplugged and replugged the USB power cable.
- The script caught the SoC during its initial silicon handshake, bypassed the broken bootloader and eMMC partitions, and booted straight into TWRP recovery.
Rebuilding Stock: The Microloader Sector Layout
Once back inside TWRP, I needed to rebuild the stock boot partition from scratch.
First, I found pristine factory binaries: Magisk automatically stores a pristine, compressed copy of the original factory boot image on /data before it patches anything:
adb shell "gzip -d /data/magisk_backup_29942e5b53fdc4af98a546b091f4ad5f35b1bcf2/boot.img.gz"
adb pull /data/magisk_backup_*/boot.img ./stock_boot.img
Now came the tricky part: you cannot simply flash stock_boot.img raw to /dev/block/by-name/boot on an unlocked device.
Kamakiri’s patched bootloader (lk) does not boot Android images directly; it expects a 1024-byte payload called microloader.bin positioned at Sector 2 of the boot partition.
The exact sector layout required is:
- Sectors 0–1 (Offset
0x000–0x3FF, 1024 bytes): Original Android Boot Image Header (ANDROID!). - Sectors 2–3 (Offset
0x400–0x7FF, 1024 bytes): Kamakirimicroloader.bin. - Sector 4+ (Offset
0x800+): Real Android Kernel & Ramdisk.
Here is the correct two-step procedure to flash stock boot while preserving Kamakiri:
# 1. Flash the pristine stock boot image to the boot partition
adb push stock_boot.img /tmp/stock_boot.img
adb shell "dd if=/tmp/stock_boot.img of=/dev/block/by-name/boot bs=4M && sync"
# 2. Re-inject the 1024-byte microloader into Sector 2 (Offset 0x400)
adb push bin/microloader.bin /tmp/microloader.bin
adb shell "dd if=/tmp/microloader.bin of=/dev/block/by-name/boot seek=2 bs=512 count=2 && sync"
Next, I flashed the TrustZone update (sheldon-tz-PS7669.zip) to align the secure monitor partitions (tee1_real and tee2_real):
adb push sheldon-tz-PS7669.zip /tmp/
adb shell twrp install /tmp/sheldon-tz-PS7669.zip
Finally, I purged the poisonous staged Amazon OTA files:
adb shell "rm -rf /cache/* /data/local/tmp/gl"
I typed adb reboot. The Amazon logo showed up… and after 30 seconds, the FireOS home screen loaded cleanly. Stock was alive again.
This time, I immediately made a true, pristine TWRP backup and archived it safely.
5. Flashing LineageOS 20 TV (Android 13)
Now that I knew the hardware was intact and I had an uncorrupted recovery path, I said goodbye to FireOS and moved to LineageOS 20 TV (Android 13).
The ROM Package
I used the unofficial LineageOS 20 build maintained by R0rt1z2 on XDA, hosted on GitHub amazon-oss releases:
- ROM:
lineage-20.0-20260923-UNOFFICIAL-sheldon.zip - TrustZone:
sheldon-tz-PS7669.zip - GApps:
MindTheGapps-13.0.0-arm-ATV-minimal-20240311_051455.zip
Installation
- Boot into TWRP via
adb reboot recovery(or via./boot-recovery.sh). - Perform a full wipe: Wipe -> Advanced Wipe -> System, Data, Cache, Dalvik.
- Flash the packages in order:
# 1. TrustZone firmware
adb push sheldon-tz-PS7669.zip /tmp/
adb shell twrp install /tmp/sheldon-tz-PS7669.zip
# 2. LineageOS 20 ROM
adb push lineage-20.0-*-sheldon.zip /tmp/rom.zip
adb shell twrp install /tmp/rom.zip
# 3. MindTheGapps Minimal
adb push MindTheGapps-13.0.0-arm-ATV-minimal-*.zip /tmp/gapps.zip
adb shell twrp install /tmp/gapps.zip
- Reboot:
adb reboot
6. The Headless First-Boot & The USB MTP Trap
The device rebooted. The LineageOS boot animation played, finished, and… nothing.
I had the stick plugged into my laptop via the Y-cable without an HDMI display attached. I ran adb devices.
List of devices attached
(blank)
No device. lsusb showed a MediaTek USB device (idVendor=0000, idProduct=03a1), but ADB was completely deaf.
The Cause: Default Gadget Mode
Clean Android 13 installations default the USB gadget driver to MTP only. USB Debugging is turned off by default, and incoming connections require interactive authorization via an on-screen dialog. Since I didn’t have a screen or a paired Bluetooth remote, I was locked out.
The Solution: Injecting ADB Keys and Props via TWRP
I rebooted into TWRP via ./boot-recovery.sh and mounted /data. We can force Android to authorize our PC and enable wireless ADB before Android even boots:
Inject the Host’s Public Key: Android stores authorized ADB keys in
/data/misc/adb/adb_keys. I pushed my workstation’s key (~/.android/adbkey.pub) and set the proper ownership:adb push ~/.android/adbkey.pub /data/misc/adb/adb_keys adb shell "chown system:shell /data/misc/adb/adb_keys && chmod 640 /data/misc/adb/adb_keys"Bash
Injecting Persistent Properties via TWRP: Android properties live in two places:
- System defaults:
/system/build.prop(located under/system_root/system/in recovery). - Persistent runtime properties:
/data/property/persistent_properties(a binary Protocol Buffer).
Under normal Android operation, executing
setprop persist.*communicates with theproperty_servicedaemon insideinit, which encodes and commits keys to/data/property/persistent_properties. But inside TWRP, Android’s userland property service is not running.To guarantee that ADB and networking would start unconditionally on first boot without relying on any UI interaction, we used a two-pronged injection:
A. Appending directly to
/system/build.prop: Mount/system_rootread-write in TWRP and append the debug properties:adb shell mount /system_root cat << 'EOF' | adb shell "cat >> /system_root/system/build.prop" # Force ADB & root on first boot persist.sys.usb.config=mtp,adb persist.service.adb.enable=1 persist.adb.tcp.port=5555 service.adb.tcp.port=5555 ro.adb.secure=0 ro.debuggable=1 persist.sys.root_access=3 EOFBash
B. Injecting into
/data/property/persistent_properties: Because Android 13 reads persistent runtime overrides directly from/data/property/persistent_properties(a binary protobuf format containing repeatedPersistentPropertyRecordmessages withnameandvaluefields), we pushed a Python script to TWRP (or parsed and updated the binary protobuf) to write the matching keys:persist.sys.usb.config=mtp,adbpersist.service.adb.enable=1persist.adb.tcp.port=5555persist.sys.root_access=3
We then locked down permissions and ownership so Android’s
initwould accept the file without rejecting it:adb shell "chmod 600 /data/property/persistent_properties && chown root:root /data/property/persistent_properties"Bash
When the stick rebooted into LineageOS, both USB ADB and Wireless ADB came up immediately on port 5555, authenticated with root privileges ready.
- System defaults:
Bypassing Google TV SetupWraith Headlessly
Even with ADB working, looking at the display via scrcpy revealed another roadblock: MindTheGapps bundles Google TV’s SetupWraith (com.google.android.tungsten.setupwraith). The stick was stuck on an infinite looping video demanding that I hold buttons on a Bluetooth remote to pair it.
We bypassed the setup wizard and marked the device fully provisioned with three commands:
# 1. Mark user setup and provisioning complete
adb shell settings put secure user_setup_complete 1
adb shell settings put global device_provisioned 1
adb shell settings put secure tv_user_setup_complete 1
# 2. Disable the setup wizards entirely
adb shell pm disable-user --user 0 com.google.android.tungsten.setupwraith
adb shell pm disable-user --user 0 org.lineageos.setupwizard
# 3. Launch the Android TV home screen
adb shell am start -a android.intent.action.MAIN -c android.intent.category.HOME
Immediately, the remote pairing screen vanished, and the Android TV home screen appeared.
7. The 30-Second Latency Mystery: The Headless HDMI VSYNC Trap
I fired up scrcpy to start interacting with the system.
Modern versions of scrcpy (v2.0+) default to forwarding audio using the opus codec. On the MT8695 running this LineageOS 20 build, MediaCodec lacks an Opus encoder (java.lang.IllegalArgumentException: Failed to initialize audio/opus, error 0xfffffffe (NAME_NOT_FOUND)), which causes scrcpy to crash immediately on startup. Passing --no-audio was required:
scrcpy --no-audio -m 1280 -b 4M --max-fps 30
This bypassed the missing audio codec and saved critical CPU encoding overhead.
And then I ran into the most infuriating bug of the entire project: the system was ridiculously, agonizingly laggy.
I would press an arrow key on my keyboard, and the UI wouldn’t move. Ten seconds later, nothing. Twenty seconds later, nothing. At around 30 to 35 seconds, the focus box would finally move one tile. Opening settings took nearly two minutes.
I didn’t suspect a hardware failure—we had already verified the eMMC was healthy and the bootloader was working. Instead, my immediate thought was that LineageOS 20 was simply way too heavy for 1 GB of RAM:
- Was Android 13’s new SurfaceFlinger and rendering pipeline completely choking the MT8695?
- Was the system thrashing ZRAM into oblivion before even launching an app?
- Had the custom ROM maintainer missed vital GPU hardware acceleration drivers?
Profiling the System
I opened an ADB shell and started digging into hardware metrics:
- Thermals:
/sys/class/thermal/thermal_zone*/tempshowed the board at 34.7°C and the SoC at 45.5°C. Barely warm. - CPU Clock: All four Cortex-A53 cores were pinned at 1.69 GHz.
- Storage I/O: Tested sequential write and read speeds using
dd conv=fsyncon/data. Writes clocked in at 23 MB/s and reads at 338 MB/s. The eMMC was completely healthy.
The Smoking Gun in dmesg
Next, I checked the kernel ring buffer (dmesg). The output was flying by so fast my terminal buffer was choking:
[ 1065.561266] mtkfb soc:mtkfb: [HW]hdmi plug out, drop video layer
[ 1065.577996] mtkfb soc:mtkfb: [HW]hdmi plug out, drop video layer
[ 1065.594702] mtkfb soc:mtkfb: [HW]hdmi plug out, drop video layer
[ 1065.611303] mtkfb soc:mtkfb: [HW]hdmi plug out, drop video layer
This single line was being logged 60 times every single second.
I ran dumpsys SurfaceFlinger --latency:
16666666
9223372036854775807 358560088536 9223372036854775807
9223372036854775807 358576755202 9223372036854775807
In SurfaceFlinger, 9223372036854775807 is 0x7FFFFFFFFFFFFFFF (INT64_MAX). The display composer had never retired a single frame.
The Technical Explanation
- MediaTek’s framebuffer driver (
mtkfb) and Hardware Composer (android.hardware.graphics.composer@2.1-service) rely on physical HDMI Hot-Plug Detect (HPD) interrupts to drive Android’s hardware VSYNC clock. - When the Fire TV Stick is powered headlessly on your desk without an HDMI cable plugged into a live display (
/sys/class/switch/hdmi/state = 0), the driver assumes there is nowhere to send video and drops every single video layer. - SurfaceFlinger and Android’s Choreographer wait on display retire fences that never signal. The main thread’s message queue gets completely clogged, and input events queue up waiting on 30-second timeouts.
- That 30-second input lag? It was entirely caused by running the stick without an HDMI monitor plugged in.
I picked up the stick, walked over to my living room, and plugged it directly into an HDMI port on my TV.
The 30-second lag instantly vanished. The UI responded immediately.
Even better: since we had pre-injected persist.adb.tcp.port=5555 directly into persistent properties in TWRP, I didn’t need to stay tethered to the PC with the Y-cable anymore. I sat on the sofa, opened my laptop, and connected to the stick wirelessly over local Wi-Fi:
adb connect 192.168.0.20:5555
The wireless ADB connection was instant and rock-solid. For the rest of the session, I was able to debloat, optimize, and test completely wirelessly from the sofa while watching the TV directly.
8. Taming Android 13 on 1 GB of RAM: The Bloatware Purge
Even with the display plugged in, running modern Android 13 with Google Play Services on 897 MB of usable RAM pushed the device to its absolute limit:
Total RAM: 897 MB | Used: 854 MB | Free: 43 MB | Swap used: 248 MB
With only 43 MB of free RAM, the Linux kernel was thrashing kswapd to continuously compress memory into ZRAM. Opening any app forced background processes to be aggressively killed and paged back in.
I ran dumpsys meminfo and ps -eo pid,user,rss,args --sort=-rss to see who was eating all the memory.
The Memory Hogs
- Google Play Store (
com.android.vending): Ate ~255 MB across three persistent processes (vending,background, andinstant_app_installer) constantly checking for self-updates. That is over 28% of the entire stick’s hardware RAM! - Google Assistant (
com.google.android.katniss): Ate ~65 MB across two processes constantly polling for microphone input and search feeds. - Chromecast Receiver (
com.google.android.apps.mediashell): Was stuck in a continuous 40x crash loop generating tombstones every few seconds:Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libcast_bluetooth_2.0.so" not found - Google TV Recommendations (
com.google.android.tvrecommendations): Used 25 MB downloading sponsored video banners.
The Debloating Script
I disabled the crashing services, voice assistants, and background sync engines:
# Crash loopers & Voice Search
adb shell pm disable-user --user 0 com.google.android.katniss
adb shell pm disable-user --user 0 com.google.android.apps.mediashell
adb shell pm disable-user --user 0 com.google.android.tvrecommendations
# Useless TV background bloat
adb shell pm disable-user --user 0 com.android.printspooler
adb shell pm disable-user --user 0 com.google.android.syncadapters.calendar
adb shell pm disable-user --user 0 com.android.providers.calendar
adb shell pm disable-user --user 0 com.google.android.feedback
adb shell pm disable-user --user 0 org.lineageos.updater
adb shell pm disable-user --user 0 com.google.android.tts
adb shell pm disable-user --user 0 com.android.dreams.basic
adb shell pm disable-user --user 0 com.google.android.backdrop
adb shell pm disable-user --user 0 com.android.companiondevicemanager
adb shell pm disable-user --user 0 com.android.providers.userdictionary
Ditching Google TV Launcher for FLauncher
Google’s stock Leanback TV Launcher takes over 100 MB of RAM. I replaced it with FLauncher, an open-source, ad-free Flutter launcher that uses only ~25 MB of RAM:
- Download and install FLauncher:
adb install -r flauncher-0.18.0.apk adb shell cmd package compile -m speed -f me.efesser.flauncherBash
- Disable the bloated Google TV Launcher:
adb shell pm disable-user --user 0 com.google.android.tvlauncherBash
Free RAM instantly jumped from 43 MB to ~125+ MB free, and CPU utilization dropped to 95% idle.
Android Go & Low-RAM Optimizations
To ensure the Android framework treats the 1 GB hardware as an entry-level device, I appended Android Go low-memory configurations to /system/build.prop:
# Android Go low-memory profile
ro.config.low_ram=true
ro.sys.fw.bg_apps_limit=8
ro.config.max_starting_bg=4
# 1GB Dalvik VM Heap Constraints
dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapsize=256m
dalvik.vm.heapstartsize=8m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=8m
Ahead-of-Time (AOT) Package Compilation
Android 13 leaves freshly installed packages in verify (interpreted / JIT) mode until overnight idle maintenance runs. On a low-power Cortex-A53, JIT compilation causes noticeable micro-stuttering whenever you open an app.
I forced ahead-of-time compilation with the speed profile on all core apps:
adb shell cmd package compile -m speed -f com.android.systemui
adb shell cmd package compile -m speed -f me.efesser.flauncher
adb shell cmd package compile -m speed -f com.looker.droidify
adb shell cmd package compile -m speed -f org.smarttube.stable
Tuning CPU Governor Responsiveness
Checking /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load, I discovered that MediaTek configured go_hispeed_load = 99. This meant the CPU would refuse to boost from 754 MHz to 1.69 GHz until system load literally hit 99%!
I re-tuned the governor to ramp up much more aggressively during UI interaction:
adb shell "for cpu in /sys/devices/system/cpu/cpu*/cpufreq/interactive; do echo 80 > \$cpu/go_hispeed_load; echo '75 1248000:85 1456000:90' > \$cpu/target_loads; done"
And eliminated window animation durations:
adb shell settings put global window_animation_scale 0.0
adb shell settings put global transition_animation_scale 0.0
adb shell settings put global animator_duration_scale 0.0
The difference was night and day. The UI felt snappy, responsive, and completely fluid.
9. TV Quirks & Remote Deployment
Once deployed to the living room TV, I tackled three real-world quirks:
Quirk 1: HDMI-CEC Double Keypresses
When navigating with my physical TV remote over HDMI-CEC, single taps on the directional pad often jumped two tiles.
To diagnose why this was happening, I ran dumpsys hdmi_control:
mDeviceInfos:
- logical_address: 0x00, physical_address: 0x0000, device_type: TV, cec_version: 5, vendor_id: ...
- logical_address: 0x04, physical_address: 0x1000, device_type: Playback, cec_version: 6, vendor_id: ...
This immediately revealed the culprit:
- The living room TV reported
cec_version: 5(CEC 1.4). - LineageOS was advertising
mCecVersion: 6(CEC 2.0).
Under the TV’s older CEC 1.4 implementation, pressing a button sent two rapid <User Control Pressed> (0x44) opcode packets within ~120 ms before sending <User Control Release> (0x45). Because LineageOS was expecting CEC 2.0 message semantics and timing cadences, it treated each opcode packet as an independent click.
We forced LineageOS to match the TV’s exact CEC version:
adb shell cmd hdmi_control cec_setting set hdmi_cec_version 5
The moment LineageOS stepped down to CEC version 5, the duplicate key events disappeared completely.
(Alternatively, pairing the official Fire TV Bluetooth remote completely bypasses HDMI-CEC over low-latency Bluetooth LE HID).
Quirk 2: Random Video Hitching & Refresh Rate Jumping
While testing video playback in Stremio and SmartTube, playback would randomly hitch and stutter. Even worse, at completely random points during video playback, the TV screen would cut black for 2 to 3 seconds. Whenever video returned, the TV’s on-screen display (OSD) banner would pop up in the corner showing that the refresh rate was actively changing (e.g., jumping between 60 Hz and 24 Hz mid-stream).
Movies are typically encoded at 23.976 / 24 fps, while the Android TV interface runs at 60 Hz. The video players were requesting dynamic refresh rate switching (Auto Frame Rate / AFR) on the fly whenever scenes or stream buffers fluctuated. Because the MT8695 lacks HDMI 2.1 Quick Media Switching (QMS), the TV has to completely drop HDMI sync and renegotiate clock timing on every switch, causing these random mid-playback blackouts.
I locked the system display output to a rock-solid 60 Hz:
adb shell settings put secure match_content_frame_rate 0
adb shell settings put global match_content_frame_rate 0
And disabled frame rate matching inside the player apps:
- Stremio: Settings -> Playback -> Frame rate matching -> Disabled.
- SmartTube: Settings -> Player -> Video -> Auto frame rate (AFR) -> Disabled.
Playback became buttery smooth—no blackouts, no audio hitching, and no unsolicited refresh rate renegotiation banners.
Quirk 3: Stick Sleeping When the TV Turns Off
When the TV was switched off or changed inputs, HDMI-CEC standby broadcasts were ordering the stick to enter deep sleep.
I decoupled CEC power commands and instructed the stick to stay awake:
adb shell cmd hdmi_control cec_setting set power_state_change_on_active_source_lost none
adb shell cmd hdmi_control cec_setting set power_control_mode none
adb shell cmd hdmi_control cec_setting set tv_send_standby_on_sleep 0
adb shell setprop persist.sys.hdmi.keep_awake true
adb shell settings put global stay_on_while_plugged_in 7
(Note: Ensure the stick is powered via its dedicated USB-C wall adapter. If you plug into the TV’s USB port, the TV physically cuts 5V power when placed in standby).
10. The App Ecosystem & Remote Tailscale Management
32-Bit ARMv7a App Compatibility
The MT8695 runs a 32-bit armeabi-v7a userland.
When searching for SmartTube inside Droid-ify, the app card was greyed out with an “Incompatible” warning. This wasn’t a bug: the repository index only listed the 64-bit (arm64-v8a) APK. Downloading the official armeabi-v7a APK directly from SmartTube’s GitHub releases installed and worked flawlessly.
Remote Management via Tailscale
To manage this stick once deployed in the living room without having to be on the same local Wi-Fi, I installed Tailscale:
- Install Tailscale and whitelist it from Android Doze battery optimizations:
adb install -r tailscale-universal.apk adb shell dumpsys deviceidle whitelist +com.tailscale.ipnBash
- Open Tailscale, authenticate via the QR code, and assign it to your Tailnet.
- The Split Tunneling Rule:
- By default, Tailscale on Android only routes Tailnet-internal traffic (
100.x.y.z). It never intercepts streaming traffic from Netflix, Stremio, or SmartTube unless an Exit Node is assigned. - If you enable App Split Tunneling, never use “Include Mode” (Allowlist). On Android,
adbdis a native binary running as UID 2000 (com.android.shell) or UID 0 (root). Because UID 0 has no APK package identity, Include Mode drops all ADB return packets. Always use “Exclude Mode” (Denylist) and exclude only the streaming apps you want isolated.
- By default, Tailscale on Android only routes Tailnet-internal traffic (
With Tailscale active, I can connect to the stick from my laptop anywhere in the world:
adb connect 100.x.y.z:5555
Conclusion
Resurrecting the Fire TV Stick 3 taught me a few invaluable lessons:
- Boot ROM Exploits Are Forgiving: Kamakiri’s
./boot-recovery.shintercepts the SoC at silicon level. Even when boot partitions are totally trashed, the hardware is almost always recoverable. - Watchdogs Are Real: Hardware watchdog timers on MediaTek platforms will ruthlessly pull the plug if early init hangs. Don’t flash modern Magisk versions on legacy kernels without verifying compatibility.
- Never Diagnose Headless: Display drivers like
mtkfbrely on hardware HDMI HPD interrupts to pace frames. Running headless can mimic catastrophic system lag that disappears the second a monitor is plugged in. - 1 GB RAM Is Usable with Intentional Tuning: By purging Google Play Store update loops, ditching the OEM launcher for FLauncher, and enabling Android Go properties, a £20 Amazon stick transforms into a responsive, ad-free Android TV 13 device.