writing / post18 nov 2026

Replacing the home screen of a TV

The home screen of my TV kept putting ads above my own apps, so I swapped it for a fork of an open-source Android launcher, which took one category in a file and three commands, and four things stayed out of reach.

this post

published
2026-11-18
reading
07 min
parts
7
the exhibit: ~ / work / terminal-home

Ads above my own apps

On 24 October 2026 the home screen of my TV became one of my own. The TV is a Grundig with Google TV, on Android 14, and out of the box its home put sponsored rows and ads above my apps. I didn't like that. A home screen should show my apps first. Now it shows terminal home.

The page Terminal Home in the Lab of this site shows it, lets you move through it with the arrow keys, and tells how Claude Code built it over the network. This Post is the Android side: what it takes to be a home screen, and what I couldn't get.

A launcher is the app that Android shows as its home screen. Mine is a fork, a copy that goes its own way, of the launcher in CleanYourTV by Gathin. That's the upstream, and it's under the MIT licence, so anyone may copy it and change it.

The history shows how little had to be new. The first commit, at 16:12, is the launcher as it was: 210 files. The second, about ten minutes later, puts the terminal home screen in: 10 files, with 1,600 added lines. The README draws the line. The terminal home, its card of trending films and its row of apps are new. The key handling, the start of apps and the settings come from upstream.

What makes an app a home screen

Android apps and the system talk with requests called intents. An app has a manifest, a file that lists its parts and the intents that each part answers. Each such list is an intent filter: an action says what to do, and a category says what kind of screen can do it.

These are the two filters of the launcher's main screen, from upstream's manifest:

AndroidManifest.xml (the main screen)xml
<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.HOME" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!-- Listed in the TV's own app list, so it can be opened from the stock home screen too. -->
<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>

That's the whole trick. The HOME category in the first filter is what makes this screen a home screen. A request for the home screen carries that category, and Android offers the apps that answer it.

The second filter puts the app in the TV's list of apps. Leanback is Android's name for its TV interface, and the comment in the file gives the reason: stock means the home screen that the TV came with.

Build, then three commands

The build needs JDK 17 and the Android command-line tools. One command makes the app file, an APK: ./gradlew assembleRelease. For the card of trending films, a file with a key for the film database must be made by hand first. Git ignores that file. Without it, the launcher still builds and runs, with no card.

There's no store page for this app. It goes on over adb, the Android Debug Bridge, and on the TV two settings must be on: developer options, and network debugging, which lets a computer on the same network send commands. Then the README has three lines:

install over the networksh
adb connect <tv-ip>:5555
adb install -r app/build/outputs/apk/release/app-release.apk
adb shell am start -a android.intent.action.MAIN -c android.intent.category.HOME

Connect to the TV, install the app file, and send the request for the home screen by hand. The first time, the TV asks which app to use as home.

Android installs only a signed app file. This one is signed with the debug key, a test key from the build tools, and the README says what that's good for: sideloading only, which means an install by hand and not from a store.

As the Lab page tells, CleanYourTV also switches the stock home off, with other apps of the TV, over the same adb.

The way back

The fork keeps the home screen that the launcher had before. One line in a config file picks between the two:

app/src/main/res/values/config.xmlxml
<!-- Fork: the terminal home screen (TerminalHome) in place of the classic dock and shelf. -->
<bool name="terminal_home">true</bool>

Set it to false, build again, and the classic home is back. The app also keeps the package name of upstream, com.gathin.tvhome. That's the id Android uses for an app.

Two scripts that can't run

The repository has two scripts, build-and-install.sh and build-and-install.ps1 for Windows. They come from upstream. The comment at the top of the first says what it does: build the launcher and install it on the TV as the default home screen.

Nice idea. They don't run in my repository, and that annoyed me a little. It would have been the easy way in. The script needs upstream's tools folder, and the README says that this folder isn't in the fork. It sends you to the adb commands above, so that's the way in.

What stayed out of reach

Four things, and each one has a reason.

  • The rows of other apps. The stock home shows what's new in YouTube or Apple TV. As the Lab page tells, none of these apps gives that list to another launcher. The card of trending films asks a public film database, TMDB, in their place.

  • A link to one title. For a trailer, the launcher can open YouTube at that video. For a title of Apple TV or of Nuvio, another video app, it opens only the app. The README gives the reason: TMDB gives no link into them.

  • The screensaver, until 30 October. A button of the remote can start the screensaver that's chosen in the TV's settings. Android has a system screen for that start. The firmware, the software built into the TV, doesn't have it, "and package visibility hid it anyway", as a commit of 30 October puts it. So the button always fell back to the launcher's own clock. Package visibility is an Android rule since Android 11: an app sees only a part of the other apps, unless its manifest asks for more. The fix tries Google TV's own sleep action next, and the manifest asks for both.

  • The remote's buttons. The launcher has a screen that gives a button of the remote a new action. The mapping needs a helper that runs as an accessibility service, a part of Android that can see key presses in every app. For the launcher to turn that helper on by itself, it needs a permission that the README grants over adb:

    the permission for the key helpersh
    adb shell pm grant com.gathin.tvhome android.permission.WRITE_SECURE_SETTINGS

    Three buttons of my remote, Mic, Guide and ECO, belong to apps of the firmware that are disabled. The screen draws them with a dashed outline and has one action, FIX BROKEN KEYS, to map them.

What nobody has tested

I'd like to tell you how it feels to live with. I can't yet, and here's why.

  • The real remote. The Lab page, from 24 October, says that every key press until then came from adb and not from the remote. I have no later record.
  • The keycodes of the remote. A keycode is the number that Android gives to a button. The commit that added the keymap says that the buttons were traced from the manual "with their guessed keycodes". The screen has a function, LEARN KEY, that records the real code of a button.
  • The fix for the screensaver. The commit says what the code tries. No source says that the button was pressed on the TV after it.
  • Another TV. The README names one TV. No source says that the fork ran on another.

So the ads are gone from my home screen, and my own apps are back at the top. It's too early to say how the rest feels. I don't know yet, and I'd rather not guess. The one test left is the plain one: the real remote, from the couch.