Personalising home TV hardware
I have a TV box that kept showing me adverts, and an AV receiver whose control apps were switched off years ago. Both still work fine. The problem was the software around them.
A couple of weekends with a coding agent fixed that. Neither is a big project, but together they changed how I think about the gadgets in my house.
Better TV
github.com/pipetogrep/better-tv ↗

The stock Google TV home screen is mostly an advertising surface. Rows of recommendations for things I never asked for. I wanted a grid of my apps, the weather, and a nice background. Something closer to tvOS.
Finding a starting point
I didn’t start from a blank page. I went looking and found Hume Launcher by Petrobot, an open source Android TV launcher written in plain Java. No Gradle, no third-party runtime libraries, just a build script. It was exactly the kind of small, understandable codebase I wanted to build on, and Better TV wouldn’t exist without it. Thanks, Petrobot.
This is something I think is changing. With more people vibe coding, code feels a lot more fluid than it used to. An existing open source project isn’t something you have to take as it is, or spend weeks learning before you can change it. It’s a starting point you can shape into what you want: a different layout, a feature removed, a whole new look. Finding something close and bending it to fit is often faster than designing from scratch, and the original work still gets the credit.
Shaping it
I asked the agent to restyle it after tvOS: a glass dock, focus lift and zoom-to-open, a weather pill, photo backgrounds. Then I kept going, adding features (profiles, a control centre, a carousel) that I didn’t really need. It was the false sense of progress I talked about in my last post, and I had to admit I was in it. A lot of the later work was taking those back out. The APK is about 2 MB, and most of that is the three built-in backgrounds.
The constraints helped the agent as much as they helped me. A small codebase with no framework magic is easy for it to reason about, and easy for me to review.
The thing that made this project work was the TV being on the network. The agent could build the APK, install it over adb, launch it, and read back how long the cold start took. A scripts/dev.sh perf command logs frame stats while navigating and counts frames drawn while Home is sitting idle. So instead of “it feels a bit slow”, every change came with numbers:
- Cold start went from about 1.0s to about 0.72s, partly by storing fonts uncompressed in the APK so they aren’t inflated on first use.
- Memory went from 131 MB to 104 MB by redrawing app banners once at the size they’re shown, rather than holding large copies.
- Navigation drops well under 1% of frames, and nothing redraws while Home is idle.
Most of the work after that was taking things away. Dead code from the features I’d trimmed. Permissions it didn’t need. The weather lookup was asking an IP-location service on every refresh, up to ~96 times a day. Now it’s once a day, and coordinates are rounded to about 1 km before they leave the TV. The README lists every network request the app makes.
Settings fits on one page. There are no ads, accounts, analytics or crash reporting.
Packaging and installing
Android TV has its own well-worn way of getting apps onto a TV outside the Play Store. Most people sideload with Downloader, a free app that turns a short numeric code into a download link, so nobody has to type a long URL with a remote.
Better TV is packaged to fit that. GitHub Actions builds and signs the APK on every push, and tagging a version publishes a release. Each release also attaches the APK as better-tv.apk, so .../releases/latest/download/better-tv.apk always serves the newest version. Downloader’s code points at that link, so one code keeps working for every release. Releases are signed with the same key, so each one installs over the last as an update.
To install it, open Downloader on your TV and enter 9211994.
Sony STR-DN1050 remote
github.com/pipetogrep/sony-str-dn1050-remote ↗
My receiver is a Sony STR-DN1050 from around 2013. It sounds great. But the vocals on some recordings were harsh and sibilant, and changing the EQ meant digging through menus on the TV with the IR remote, one click at a time.
Sony’s apps for it (TV SideView, the old network remote) are gone. The receiver still listens on the network, though. It just speaks a protocol Sony never published for this model.
Reverse engineering with a human in the loop
This is where working with an agent got interesting. I’ve never reverse engineered a binary protocol. The agent hadn’t seen this receiver. Between us we figured it out:
- Look around. A port scan found the receiver with a few ports open. Most were UPnP or a basic network settings page. Port
33335was the interesting one. A Crestron driver note confirmed it’s the control port. - Find prior art. A public gist with captures for a related model, the STR-DN2030, gave us the message framing and checksum. Later a scanned Sony RS-232C spec turned out to be the same protocol carried over TCP.
- Scan safely. Request opcodes only read values, so the agent swept every category and request opcode to see what replied.
- Map it by hand. This was my favourite part. The agent ran a recorder polling every register about once a second. I stood at the receiver and changed one menu item at a time, about five seconds apart. Matching up the timestamps showed which register was the front bass, the centre level, the sound field and so on.
- Work out the writes. The receiver acknowledges plenty of commands it then ignores, so every write was read back to check it worked, and every test value was put back straight away.
The result is one Python file using only the standard library. It serves a small web page that works on my phone, with volume, inputs, sound fields, bass and treble per speaker group, and individual speaker levels. The receiver pushes a status update whenever something changes, so the page updates live when someone uses the IR remote. It runs happily in Docker on a NAS, idling at about 14 MB of RAM.
The honest ending: my original goal was “lots of EQ sliders” to fix the sibilance, and the hardware only has a bass and treble shelf per speaker group. No protocol trick adds more bands. Cutting the treble a few dB is the best the receiver can do. But I can do it from my phone in two seconds now, and the protocol notes are in the README for anyone with a similar Sony.
Why this matters
We own a lot of hardware that’s held back by its software. Smart TVs that put ads on the home screen. Receivers, printers, cameras and speakers whose apps are abandoned once the product line moves on. The hardware is usually fine. It just goes to landfill when the company stops caring.
Fixing that used to need a specialist: someone who knew Android internals, or who’d spent evenings in Wireshark. That’s a small group of people, and they were never going to get round to my particular receiver.
Coding agents change who can do this. The things that made these projects work weren’t special:
- The device was on the network. If the agent can talk to the hardware directly (over
adbor a TCP socket) it can test its own work, measure it, and tell me what actually happened, not what it hoped happened. - I stayed in the loop. I knew what I wanted from the TV and could press the buttons on the receiver. The agent knew how to read a checksum. Neither of us would have got there alone.
- Small and boring code. One Python file. Plain Java with a build script. Easy to read, easy to review, easy to come back to in a year.
- Read it back. Hardware is literal. Checking every change against what the device reports kept us honest and kept my receiver in one piece.
I’m not saying everyone should reverse engineer their kitchen appliances. But the next time a gadget annoys you, it’s worth asking whether the problem is the hardware, or just the software someone else stopped caring about.
Both projects are open source. If you have an Android TV box, or a Sony receiver from around the same era, give them a try.