Quick status check before anyone gets ahead of me: nothing has been flashed yet. This post is about the plan and the prep work, not a victory lap. If you came from part 2 expecting "and then I fixed it," this is the "and here's why that's harder than it sounds" post instead.
Recap: the box in question turned out to be infected with a BadBox-pattern dropper — fake-Google-named packages, a persistent root daemon, SELinux left in permissive mode. The malicious apps are removed, but that was always treating a symptom. The actual fix is replacing or cleaning the firmware itself, and that's a much less reversible operation than uninstalling an app.
So before any of that happens, step one is: back up everything.
Know your hardware first
The board inside this thing is an Allwinner "homlet" SoC, and it's Project Treble–compliant — which matters a lot here, because it means the device uses dynamic partitions (the super partition scheme, logical partitions carved out of it instead of fixed physical ones) plus AVB (Android Verified Boot). That combination raises the stakes on a botched flash: get the partition layout or the verified-boot chain wrong and you're not looking at "reflash and try again," you're looking at a brick.
Which is exactly why nothing gets written until everything's backed up first.
Backups, done
Before touching anything, I pulled a full backup of the partitions that matter: bootloader, recovery, misc, vbmeta, vbmeta_system, vbmeta_vendor. If anything goes wrong later — wrong image, bad flash, anything — there's a known-good copy of the box's original state to fall back to. This part's done.
The write path turned out to be the hard part
Here's where "in progress" actually means in progress. The obvious move for Allwinner silicon is FEL mode — Allwinner's USB boot-ROM recovery mode, the standard low-level way to get a fresh image onto this kind of board over a USB cable, no OS cooperation required.
That's not available on this hardware. The USB-C port on this particular box is wired for power only — no data lines to the SoC's USB OTG controller, which means no FEL, full stop. Whatever this specific device's board design does with FEL mode, it's not reachable through the port you'd normally use for it.
So the alternative being evaluated now is an SD-card based update — the mechanism a lot of these Allwinner-based boxes support for applying a full system update by booting from a prepared SD card instead of over USB. That's the path I'm currently investigating: whether this board's bootloader will actually pick up and apply an update from SD, and what exactly a valid update package needs to look like for it to accept one.
Two routes, still undecided
Once there's a working write path, there are two real options for what actually goes onto the device, and I haven't committed to one yet:
- Re-patch the existing images. Keep the vendor's original firmware — which presumably has whatever hardware-specific blobs (Wi-Fi, Bluetooth, display, etc.) this board needs to actually work — but strip out the dropper, the rogue root daemon, and flip SELinux back to
enforcing. Lower risk of breaking hardware support, but means trusting that I've found everything malicious in an image I didn't build and can't fully audit. - Replace it with an official Google Generic System Image (GSI). Since the board is Treble-compliant, it's a legitimate candidate for a GSI — a clean, Google-built system image decoupled from the vendor's modifications. Higher confidence the OS itself is trustworthy top to bottom, but Treble-compliant doesn't automatically mean every device-specific driver and blob plays nicely with a generic image on the first try.
Both are legitimate paths. Which one actually happens depends on what the SD-card update investigation turns up — if the vendor partition and hardware blobs turn out to be more deeply entangled with the vendor image than expected, that pushes toward option 1; if a GSI boots clean with working Wi-Fi/display/Bluetooth, option 2 wins on trust alone.
Where this stands
- ✅ Full partition backup taken
- ✅ Board identified: Allwinner "homlet," Treble-compliant, dynamic partitions + AVB
- ❌ FEL over USB — not available on this hardware (USB-C is power-only)
- 🔄 Evaluating SD-card update as the write path
- ❓ Re-patch vs. GSI — undecided, pending the above
Nothing on this box has been overwritten. That's deliberate — a device that's already compromised is still a device you don't want to turn into a brick while trying to fix it.
The remote-control app that started this whole series, if you want to see the code: github.com/duvanjamid/tv-remote
To be continued — once there's an actual write path and a decision on repatch-vs-GSI, part 4 is where something actually gets flashed.

