Java-only YouTube player signature deciphering and n transforms for Android (min SDK 26):
no QuickJS, JNI, WebView, network client, or JS engine.
Original source: MetrolistGroup/quackjs.
// settings.gradle.kts, alongside your existing repositories (PAT required):
dependencyResolutionManagement {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/MorpheApp/registry")
credentials {
username = providers.gradleProperty("gpr.user").getOrElse(System.getenv("GITHUB_ACTOR"))
password = providers.gradleProperty("gpr.key").getOrElse(System.getenv("GITHUB_TOKEN"))
}
}
}
}
// KMP commonMain dependencies:
implementation("app.morphe:quackjs-java:0.1.4")Targets: Android (min SDK 26).
import meow.nyx.quackjs.PlayerHints
import meow.nyx.quackjs.PlayerProgram
// Hints for player 5008be0a, en_GB player_ias; fetch/cache JS in your HTTP layer.
val program = PlayerProgram.compile(
playerJs, PlayerHints("Gl(17,1452,INPUT)", "Fl", 20746),
)
val signature = program.decipherSignature(encryptedSignature)
val n = program.transformN(nChallenge)Cache by exact player variant and hints. Programs support concurrent calls.
compile(playerJs) can discover unambiguous landmarks without hints;
signatureTimestamp is nullable. Pass decoded challenges and query-encode outputs
once. Never interpolate challenges into expressions. Compilation and transforms
are synchronous; move CPU work off the UI thread.
This is a bounded dispatcher/table-player subset, not general JavaScript or
BotGuard/PO-token execution. Unsupported source, operations and exhausted budgets
throw UnsupportedPlayerException; fail closed, never return an encrypted URL as
if deciphering succeeded. Limits include 8 Mi UTF-16 source units, 16,384-unit
challenges and 65,536-unit outputs, not a hard wall-clock deadline.
Default offline verification covers six complete players. The opt-in pinned Faraday latest-200 corpus passes 200/200 hinted and hint-free, with unchanged Node goldens and a 200/200 full-source QuickJS cross-check (historical baseline: 176/200). Ordinary CI stays on the offline corpus; the 200-player workflow is manual. See verification for exact counts, limits and rerun commands. This does not cover every historical/future player. Live playback, Android hardware and Apple execution/final linking are unverified.
Licensed under GPL-3.0-only; retain third-party notices.