docker-py-revanced

Obtainium

Obtainium is an Android app that installs and updates apps straight from their source (GitHub releases, F-Droid, direct APK links, arbitrary HTML pages, etc.), skipping app stores entirely. Since this project’s own releases are just GitHub Releases, Obtainium can track them directly - this integration exists to make setting that up (and keeping version numbers readable) less manual.

Warning: Enabling any of this generates a public APK discovery URL for your fork or self-hosted setup. Only enable it if you’re comfortable with that.

How it works

Two things get generated, and the second builds on the first:

  1. Per-app HTML source pages (OBTAINIUM_EXPORT) - one static HTML file per patched app, containing a link to its latest release asset. Obtainium’s “HTML” source type can point at a page like this and periodically re-check it for updates, the same way it’d scrape any other HTML page.
  2. One-click install site (OBTAINIUM_SITE_EXPORT) - an index.html at the repo root of the changelogs branch, listing every app as an obtainium://app/... deep link. These links carry a URL-encoded JSON blob of an app’s full Obtainium configuration (source URL, author, name, version regex, etc.). Tapping one on a device with Obtainium installed opens the app with that config pre-filled - equivalent to manually adding the HTML source from step 1 and typing in all the same settings by hand, minus the typing. It’s written at the branch root rather than alongside the per-app pages in obtainium_sources/ because GitHub Pages’ branch-deploy mode can only serve from a branch’s root or its /docs folder, never an arbitrary subfolder.

Version detection deserves a specific callout, since it’s the part most likely to need tuning: the per-app HTML page’s only meaningful content is a link to the release asset, and that asset’s filename already encodes the app version and patch bundle version (see APP.get_output_file_name in src/app.py), e.g.:

ReYouTube-Version20.47.62-PatchVersionv1.37.0-PatchSetabc123def456-2026AUG01.0131AM-output.apk

Obtainium can apply a regex against that link text to pull out a human-readable version instead of falling back to hashing the link (which still works, just shows a hash instead of a version). OBTAINIUM_VERSION_EXTRACTION_REGEX and OBTAINIUM_VERSION_MATCH_GROUP (see below) control that regex, and the deep links from OBTAINIUM_SITE_EXPORT pre-fill it automatically. If you add a source manually via its HTML URL instead of via a deep link, you’d otherwise have to configure this same regex by hand in Obtainium’s UI.

Setup

  1. Enable OBTAINIUM_EXPORT=true (see Configuration below). This is the minimum needed - it generates obtainium_sources/*.html in the changelogs branch, one file per patched app.
  2. Add sources to Obtainium one of two ways:
    • Manually: in Obtainium, add each app via its raw HTML URL as an “HTML” source, e.g. https://raw.githubusercontent.com/<user>/<repo>/changelogs/obtainium_sources/youtube.html. You’ll need to configure the version regex yourself if you want readable versions (see above).
    • One-click site: also enable OBTAINIUM_SITE_EXPORT=true. This additionally generates index.html at the changelogs branch root with a ready-to-tap link per app, version regex included.
  3. (Optional, for the one-click site) Publish it with GitHub Pages: repo Settings -> Pages -> set the source branch to changelogs and the folder to / (root) - GitHub Pages’ branch-deploy mode only offers root or /docs, so this only works because index.html is generated at the branch root. Visit the published Pages URL on an Android device with Obtainium installed and tap the links you want.

Configuration

Add these to your .env file, or (recommended) to the ENVS GitHub secret.

OBTAINIUM_EXPORT

OBTAINIUM_EXPORT=true

OBTAINIUM_GITHUB_TAG

OBTAINIUM_GITHUB_TAG=latest

Warning: If you set this to a fixed tag, make sure your CI workflow actually releases under that exact tag - otherwise the generated links will point at a release that doesn’t exist (or doesn’t contain that app’s APK).

OBTAINIUM_SITE_EXPORT

OBTAINIUM_SITE_EXPORT=true

OBTAINIUM_VERSION_EXTRACTION_REGEX

OBTAINIUM_VERSION_EXTRACTION_REGEX=Version([\w.]+)-PatchVersion[v]?([\w.]+)-PatchSet

OBTAINIUM_VERSION_MATCH_GROUP

OBTAINIUM_VERSION_MATCH_GROUP=$1+$2