Public
Latest 32-bit Android TV APK link generator for GitHub repos
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

latest-github-atv-32

Redirects to the latest 32-bit (armeabi-v7a) Android TV APK from any GitHub repository's latest release. Built for linking from a JavaScript-free Carrd site so a plain <a href> click downloads the right APK in TV browsers (e.g. TV Bro on Fire OS).

Usage

https://<endpoint>/<owner>/<repo>

Examples:

  • /truefedex/tv-bro → TV Bro
  • /mlm-games/Fluffy → Fluffy
  • /NuvioMedia/NuvioTV → Nuvio
  • /yuliskov/SmartTube → SmartTube

Append /info (e.g. /yuliskov/SmartTube/info) to preview the chosen file as JSON instead of being redirected.

How it works

Rendering mermaid diagram...

Asset selection (github.ts → pickApk) is strict on architecture, lenient on release channel:

  1. Keep only .apk assets (drops .aab, .sha256 checksums, source archives).
  2. If any APK names an ABI, drop the 64-bit / x86-only builds (arm64-v8a, x86_64, …) so a Fire Stick never gets an incompatible binary. If no APK names an ABI, keep them all — the dev ships one architecture-agnostic build (e.g. AerialViews).
  3. Score the survivors: explicit armeabi-v7a > universal > ABI-less, with stable preferred over preview/beta/rc only as a tiebreaker (so an always-beta repo like Nuvio still resolves).
  4. If nothing usable remains → a standards-compliant 404 error page.

The redirect points at GitHub's own browser_download_url, which serves the file with the correct application/vnd.android.package-archive MIME type and a Content-Disposition: attachment header. The redirect response mirrors those hints too, as a belt-and-suspenders measure for older WebView builds (e.g. on a Fire Stick that no longer receives OTA updates) that may sniff the redirect.

Verified repos

PathResolves to
/truefedex/tv-bro…-armeabi-v7a.apk
/mlm-games/Fluffyfluffy-…-armeabi-v7a.apk
/NuvioMedia/NuvioTVapp-full-armeabi-v7a-release.apk (beta)
/yuliskov/SmartTubeSmartTube_stable_…_armeabi-v7a.apk
/theothernt/AerialViewsaerial-views-….apk (single, no-ABI)
/florisboard/florisboardflorisboard-…-stable.apk (no-ABI, stable)

Files

FilePurpose
main.tsHTTP entrypoint; re-exports the handler
router.tsRequest routing, redirect, JSON preview, error handling
github.tsGitHub API fetch + APK asset selection
pages.tsIndex and error page HTML

Optional: GitHub token (higher rate limit)

Unauthenticated GitHub API requests are limited to 60/hour per server IP. Adding a token raises this to 5,000/hour. The token is stored as an encrypted Val Town environment variable and is never exposed in the source, even if this val is public or remixed.

  1. Create a token (no scopes needed — public read only) at https://github.com/settings/tokens?type=beta.
  2. Add it as an env var named GITHUB_TOKEN.

👉 Add GITHUB_TOKEN here: https://www.val.town/x/cgio/latest-github-atv-32/environment-variables?key=GITHUB_TOKEN