Projects

tubik

Calm Android YouTube client with no Trending, a subscription Allowlist, realtime on-device Music Removal, and Parent PIN / Screen Pin locks.

Status
Live
Platform
Android 8.0+ (API 26)
Built with
Kotlin · Media3 · ONNX Runtime
Current release
v1.1.0 (direct signed APK)
Package ID
dev.twenty3p.tubik
Distribution
Cloudflare Pages + R2 · GitHub Releases
Gate
quality-kit · osv-scanner · Kover
Harness
Claude · Cursor · Antigravity CLI
Started
Nov 2026
Tubik landing page at tubik.23p.dev showing the release card, SHA-256 checksum verification, and phone preview
tubik.23p.dev: signed APKs on R2 with SHA-256 checksums and an update manifest.

Overview

Forked from LibreTube into an independent, local-only client (dev.twenty3p.tubik) with no ads, accounts, or sync servers.

Four controls shape playback: no Trending, a subscription-backed Allowlist, fail-closed on-device Music Removal, and Parent PIN / Screen Pin gates.

Stack

App & Media

Kotlin + Material 3
Android 8.0+ with Room storage, NewPipe Extractor, SponsorBlock, and optional DeArrow.
Media3 ExoPlayer + Transformer
Runs MusicRemovalAudioProcessor across live playback, background, PiP, and downloads.

On-device Speech & DSP

ONNX Runtime (FastEnhancer + Silero VAD)
Local fastenhancer_s/t models plus streaming Silero VAD v5 via native FloatBuffers.
SPSC Hop Ring Buffers
Decouples Media3 audio callbacks from worker-thread inference over 512-sample hops.

Access Control & Updates

AllowlistMediaServiceRepository
Restricts feeds, search, playlists, history, and downloads to Allowed Channels.
ParentPinStore + Screen Pin
Salted PIN hash guards settings and loosening controls; Screen Pin wraps startLockTask().
Cloudflare Pages + R2 OTA
Signed APKs verified in-app by SHA-256 digest and signing-certificate fingerprint.

Quality & Release

quality-kit kotlin-android pack
ktfmt, detekt, Lint, Betterleaks, osv-scanner, Kover ratchet, and buildHealth.
GitHub Actions CI + Release
Gates PRs and publishes signed APKs to R2 and tubik.23p.dev on tags.

Engineering highlights

  1. Realtime Music Removal that fails closed

    MusicRemovalAudioProcessor feeds 48 kHz mono hops through a lock-free ring buffer to FastEnhancer, a spectral post-filter, and SileroVadGate. If latency lags, it downshifts to fastenhancer_t and then triggers Overload Mute (~480 ms) rather than leaking raw music.

    Tubik player showing Music Removal On, 1.5x max speed badge, Screen Pin button, Overload Mute notice, and hidden related videos and comments
    Player with Music Removal active, 1.5× speed cap, and hidden related videos/comments.
  2. Allowlist backed by subscriptions

    Trending is removed, leaving Search, Subscriptions, and Library. With Allowlist on, AllowlistMediaServiceRepository filters feeds, local search, playlists, Shorts, and downloads to Allowed Channels, hiding related videos and comments.

    Tubik Subscriptions feed with Allowlist On banner, Allowed Channel filter pills, and three-tab bottom bar without Trending
    Allowlist active: only Allowed Channels appear across the three-tab UI.
  3. Parent PIN and one-tap Screen Pin

    A salted local PIN hash guards Settings, disabling Allowlist or Music Removal, unsubscribing, backups, and updates. Screen Pin exposes one-tap Android startLockTask() pinning in the toolbar and player.

    Tubik Settings toggles for Allowlist, Music Removal, Screen Pin, and Lock Settings behind an Enter Parent PIN modal
    Settings toggles protected by the Parent PIN modal.
  4. Verified direct-APK updates

    UpdateInstallGate blocks installs while pinned and requires the Parent PIN; ApkVerifier checks both the SHA-256 digest against latest.json and an exact signing certificate match before launching Android's installer.

Architecture

Realtime on-device Music Removal pipeline

  1. Media3 AudioSinkDownmixes PCM to 48 kHz mono and pushes 512-sample hops to a ring buffer.
  2. FastEnhancer ONNXRuns fastenhancer_s on a worker thread, downshifting to fastenhancer_t under load.
  3. Silero VAD + Post-filterDecimates 3:1 to 16 kHz for Silero VAD v5 gating and spectral cleanup.
  4. Fail-closed Overload MuteSilences audio cleanly if inference fails or lags past ~480 ms.

Decisions

  • Fail-closed audio safety (Overload Mute)
  • On-device ONNX speech separation + VAD
  • Lock-free SPSC audio ring buffers
  • Single-source-of-truth Allowlist repository
  • Salted Parent PIN & Screen Pin gating
  • SHA-256 + signing-cert OTA verification
  • Local-only data (no sync servers)