diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index fb4b359..f8cc0c8 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -21,20 +21,24 @@ jobs:
echo '3cf6cd6892e32e2b4c1c39e0f52f5248a2f5b37646fdfbb79a66b46b618414ed .tools/json.jar' | sha256sum --check
- name: Run deterministic tests
run: |
- javac -encoding UTF-8 -cp .tools/json.jar -d test-classes src/dev/aurora/tvpatch/Lyrics.java src/dev/aurora/tvpatch/Provider.java tests/LyricsTest.java tests/ProviderTest.java
- java -ea -cp test-classes:.tools/json.jar LyricsTest
- java -ea -cp test-classes:.tools/json.jar ProviderTest
javac -d test-classes src/dev/aurora/tvpatch/AdMuteState.java tests/AdMuteStateTest.java
java -ea -cp test-classes AdMuteStateTest
javac -d test-classes src/dev/aurora/tvpatch/AudioSessions.java tests/AudioSessionsTest.java
java -ea -cp test-classes AudioSessionsTest
- javac -d test-classes src/dev/aurora/tvpatch/AudioEffectPlan.java tests/AudioEffectPlanTest.java
+ javac -d test-classes src/dev/aurora/tvpatch/GraphicEq.java src/dev/aurora/tvpatch/AudioEffectPlan.java tests/AudioEffectPlanTest.java tests/GraphicEqTest.java
java -ea -cp test-classes AudioEffectPlanTest
+ java -ea -cp test-classes GraphicEqTest
+ javac -d test-classes src/dev/aurora/tvpatch/SleepDeadline.java tests/SleepDeadlineTest.java
+ java -ea -cp test-classes SleepDeadlineTest
+ javac -d test-classes src/dev/aurora/tvpatch/SleepDeadline.java src/dev/aurora/tvpatch/HushPolicy.java tests/HushPolicyTest.java
+ java -ea -cp test-classes HushPolicyTest
- name: Test modular fingerprints
run: bash revanced/gradlew -p revanced testFingerprints
+ - name: Verify WebView bridge lifecycle
+ run: python3 -m unittest discover -s tests -p test_settings_bridge.py -v
- name: Check source tools
run: |
- python3 -m py_compile patch.py import_lyrics.py
+ python3 -m py_compile patch.py
node -e "new Function('return ('+require('fs').readFileSync('assets/spotifyplus-tv.js','utf8')+')')"
presentation:
runs-on: ubuntu-latest
@@ -52,5 +56,54 @@ jobs:
NODE_PATH: ${{ github.workspace }}/.tools/browser/node_modules
run: |
node tests/presentation.test.cjs
+ node tests/home-blur.test.cjs
node tests/theme-regression.test.cjs
node tests/presentation-performance.test.cjs
+ node tests/native-settings.test.cjs
+ node tests/native-menu.test.cjs
+ node tests/input-fastpath.test.cjs
+ node tests/settings-scroll.test.cjs
+ node tests/settings-focus.test.cjs
+ node tests/upgrade-entry.test.cjs
+ node tests/upgrade-block.test.cjs
+ node tests/visible-navigation.test.cjs
+ node tests/themes.test.cjs
+ rebuild-apk:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: '17'
+ - uses: android-actions/setup-android@v3
+ with:
+ packages: platform-tools
+ log-accepted-android-sdk-licenses: false
+ - name: Prepare and test embedded helper sources
+ run: |
+ python3 -m unittest discover -s hush/tests -v
+ python3 hush/prepare.py
+ sdkmanager 'platforms;android-35' 'build-tools;35.0.0'
+ - name: Compile single-app runtime
+ run: |
+ mkdir -p .tools/extension-classes .tools/extension-dex
+ javac -encoding UTF-8 -source 8 -target 8 -cp "$ANDROID_HOME/platforms/android-35/android.jar" -d .tools/extension-classes src/dev/aurora/tvpatch/*.java hush/build/generated/dev/aurora/tvpatch/hush/*.java
+ jar cf .tools/extension.jar -C .tools/extension-classes .
+ "$ANDROID_HOME/build-tools/35.0.0/d8" --min-api 26 --lib "$ANDROID_HOME/platforms/android-35/android.jar" --output .tools/extension-dex .tools/extension.jar
+ - name: Fetch verified prior release and build tools
+ run: |
+ curl --fail --location --output .tools/current.apks https://github.com/AlphadogRSA/spotifyplus-tv-patch/releases/download/v0.5.0/SpotifyPlus-TV-1.134.2-v0.5.apks
+ curl --fail --location --output .tools/apktool.jar https://github.com/iBotPeaches/Apktool/releases/download/v3.0.3/apktool_3.0.3.jar
+ curl --fail --location --output .tools/apkeditor.jar https://github.com/REAndroid/APKEditor/releases/download/V1.4.9/APKEditor-1.4.9.jar
+ - name: Rebuild one unsigned APK
+ run: python3 rebuild_release.py --input .tools/current.apks --dex .tools/extension-dex/classes.dex --apktool .tools/apktool.jar --apkeditor .tools/apkeditor.jar --output build/release-1.3.0.9
+ - uses: actions/upload-artifact@v4
+ with:
+ name: SpotifyPlus-TV-1.3.0.9-unsigned
+ path: |
+ build/release-1.3.0.9/SpotifyPlus-TV-1.3.0.9-unsigned.apk
+ build/release-1.3.0.9/SHA256.txt
+ if-no-files-found: error
diff --git a/.gitignore b/.gitignore
index 9e217f6..44c1cff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,5 @@ __pycache__/
.jvm-temp/
.gradle/
!revanced/gradle/wrapper/gradle-wrapper.jar
+
+!hush/upstream/
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..e1f0eaf
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "hush/upstream"]
+ path = hush/upstream
+ url = https://github.com/coldMEW/Hush.git
diff --git a/HANDOFF.md b/HANDOFF.md
index e978e8b..8955c86 100644
--- a/HANDOFF.md
+++ b/HANDOFF.md
@@ -1,30 +1,31 @@
-# Handoff
+# Current update: 1.3.0.9
-## Current release: 0.5
+Spotify+ menu now inherits native Spotify list styles (10 rows). Experimental unstable lyrics integration retired, including polling/provider/import code; existing user files left untouched. Search/text keys bypass async routing and long-OK interception with paired release handling. Hidden settings skip refresh and unrelated Home mutations skip rescans. TV keyboard opened in three focused-input trials (3.12/2.53/2.23 seconds including ADB overhead); some Android startup delay remains. See VERIFICATION.md for scope and tests.
-The 0.5 follow-up fixes themes against verified TV class selectors, expands promotion/Upgrade hiding and optimizes DOM scanning, playback callbacks, dialog cleanup and DSP writes. See VERIFICATION.md for the measured checks. It keeps all 0.4 functions and persisted settings. The remote theme cycle and Spotify-only audio activation were observed after installing 0.5.
+Keep verified app fixes documented and publish matching source, APK and Windows installer to GitHub, per maintainer workflow. Preserve installed data and unrelated apps. Do not claim performance improvements without measurements; retain attribution and licenses.
-The default build now uses modular Kotlin ReVanced patches and a precompiled MIT extension DEX. It adds default-on recognized-ad muting, Upgrade-button hiding, Spotify-style accents and background blur, polished TV labels, and per-process/session EQ plus 0–6 dB boost. There is no shared-output/session-0 effect path. See AUDIO.md for one-time ADB diagnostic permission setup. `install.ps1` installs all four APKs, grants that permission and launches the client. The same retained private key was used for updates; no uninstall was used for 0.4. The user paired Spotify again during testing.
+# Previous update: 1.3.0.8
-The final four-APK build is specific to the inspected Spotify TV 1.134.2 ARMv7/English/TV-density installation. Source archives and the private GitHub release exclude the local signing key, original-install backup, account data, fetched lyrics and user screenshots. The release installation archive necessarily includes the patched proprietary app and required splits for this installation; the MIT license does not relicense those binaries.
+Home blur now adds an isolated halo behind native artwork and never uses page-level/native Home wrappers as a clipped fallback. Loading/fade-in, toggle cleanup and native geometry verified. PanelUi provides the EQ-style navy/blue native frame, buttons and dialogs; settings cards match. Final native panels and QR visually/device tested.
-This repository contains only the original TV extension and build/test tools. The proprietary original APKs, patched APK set, account data, signing key and fetched lyrics are intentionally excluded.
+# Previous update: 1.3.0.7
-## Completed
+Home navigation now includes only visible eligible controls, clamps at visible endpoints, disables Upgrade for focus/accessibility, and repairs a remembered Upgrade position on menu entry. Verified actual remote traversal and Home activation on the Xiaomi TV.
-- Version-pinned injection into the inspected Spotify TV 1.134.2 client.
-- Native D-pad menu, three themes, cinematic motion toggle, own-session sleep timer and private local LRC import.
-- Lyrics update 0.2: manual public LRCLIB lookup, timed and plain results, per-track in-memory cache, local-file precedence, font sizes and timing offset.
-- Background lookup, bounded response size, request cooldown, connect/read timeouts and an overall watchdog.
-- Reproducible four-APK build/signing script, original input hashes, deterministic tests and CI workflow.
-- Independent source/attribution notices; no Eevee implementation or assets copied.
+# Previous update: 1.3.0.6
-## Next device checks
+Shared key routing fixes stale Spotify+ selection and missed Home OK. Native dialogs no longer leave a release state that swallows the next press. Verified three About/Home cycles plus remote top-menu handoff; current source/build remains on feat/hush-tv.
-The new **Lyrics · local / LRCLIB** panel was observed fetching and displaying timed lyrics for a real signed-in track. Continue testing provider coverage, track changes while fetching, local precedence, pause/seek/resume, timing offsets, long-running drift and D-pad scrolling of plain lyrics. See VERIFICATION.md for exactly which checks ran.
+# Previous update: 1.3.0.5
-## Building and updating
+Upgrade UI activation is blocked at click, native remote navigation and SPA upsell-route levels. About includes Tumelo Rathebe / AlphadogRSA with an offline GitHub QR. Theme cycling now includes Ocean, Rose and Solar, preserving existing theme indices. The installed same-key build and QR screenshot were verified on the TV.
-Use the original four installation APKs from your own TV and the private signing key retained locally. `build.ps1` verifies their hashes and produces a fully signed four-APK set. Updating with the same key preserves the current app's data; a different key normally requires reinstalling and signing in again. Do not install just the base APK or mix certificates across splits.
+# Handoff · Spotify+ TV 1.3.0.1
-The extension's added network request is only the explicit LRCLIB lookup; no Spotify login credentials or entitlement values are processed by it. The runtime and its tests remain MIT licensed; the ReVanced host module is GPL-3.0-only under revanced/COPYING. See README.md, LYRICS.md and assets/INSPIRATION.md for scope and notices.
+User requirements: one Spotify APK, integrated Hush functionality, reference-style graphic EQ, and all custom controls inside Spotify’s existing settings panel.
+
+Implemented: native `/profile` settings host integration using observed `profile-menu`/`profile-menu-item` and `top-menu--settings` selectors; restricted JavaScript settings bridge; native graphic EQ and migration; embedded pinned Hush helper/provider with fixed restart command; persisted sleep/recovery state; single unsigned APK rebuild and retained-key signing/install scripts.
+
+The rebuilt file still targets the inspected ARMv7/English/TV-density installation, with versionName `1.3.0.1` and original versionCode `2340200`. The source repo excludes private signing material. An unsigned build is not an installable same-key update. No installation or live-TV verification for this version is claimed. Earlier 0.5 observations remain historical in VERIFICATION.md.
+
+Read HUSH.md for setup and recovery limitations, README.md for build/install scope, and the current plan/spec under docs/superpowers. The native Settings selectors were verified against Spotify’s delivered Android TV web UI `ad3ec52`; future remotely delivered UI changes may need selector updates.
diff --git a/HUSH.md b/HUSH.md
new file mode 100644
index 0000000..a0a74ad
--- /dev/null
+++ b/HUSH.md
@@ -0,0 +1,22 @@
+# Integrated Hush · one Spotify app
+
+Hush’s helper ships inside Spotify+ TV 1.3.0.1. There is no companion APK, extra launcher icon, notification-listener permission or Shizuku dependency. The shell-owned helper survives the Spotify process being stopped; Spotify’s next process resumes its own session. This adapts the restart strategy from coldMEW/Hush to the TV app’s native `is_ad_playing` signal.
+
+## Setup
+
+1. Build/sign with the same retained private key as the existing TV installation, then update without uninstalling. The generated unsigned APK cannot be installed until signed.
+2. Launch Spotify once. The app writes a private, token-bound startup script for its embedded helper.
+3. Run `start-hush.ps1 -Serial TV_IP:5555` over your authorized ADB connection. The command stays private; the script does not print its token. Repeat after a TV reboot or APK update. The app remains debuggable as in the existing build so the installer can read this app-private startup command through `run-as`.
+4. Open Spotify’s own Settings/profile screen. Under Spotify+ TV, check **Hush helper setup**, then turn **Hush ad-break skipping** on. Keep **Mute detected ads** on for the fallback.
+
+The helper provider accepts only Android’s shell UID, requires the privileged cross-user permission and validates a random token from private app storage. Its adapted command builder accepts only the fixed restart action for `com.spotify.tv.android/.SpotifyTVActivity`; it rejects arbitrary actions/components. It does not install or control another application.
+
+## Recovery and limits
+
+Before requesting a restart, Spotify commits its recovery state. The helper executes the whole stop/allowlist/start sequence outside the dying app process. The new process waits for its own media session, retries play for at most 20 seconds, honors the sleep deadline even if the visible timer has already cleared, and falls back after failure. Attempts have a 30-second minimum interval; failed recovery imposes a two-minute cooldown. Paused ads are left alone.
+
+Whether restarting actually drops an ad break or preserves the queue depends on Spotify TV. Upstream phone timings do not establish TV behavior. This release needs real-device tests for ad-return behavior, queue context, helper loss, screen/background behavior, sleep expiry during restart, EQ reattachment and same-key updating. No calibrated audio or guaranteed ad-removal claim is made.
+
+## Reproducible source
+
+`hush/upstream` is an unchanged pinned submodule. `hush/prepare.py` verifies its commit and clean tracked source, then extracts/adapts eight helper classes under `dev.aurora.tvpatch.hush` into a new generated source directory. The command restriction, TV target, provider authority and protocol version changes are visible in that script. These helper portions are GPL-3.0; their full license and source notice are included in the APK. No phone UI, VPN/DNS filtering, notification watcher, global-volume mute or account handling is imported.
diff --git a/LYRICS.md b/LYRICS.md
index 969aeb4..6494c9b 100644
--- a/LYRICS.md
+++ b/LYRICS.md
@@ -1,29 +1,5 @@
-# Lyrics update 0.2 — implementation handoff
+# Experimental lyrics retired in 1.3.0.9
-The Eevee-inspired additions are independent Android implementations: manual LRCLIB lookup, timed/plain fallback, lyric-size controls and timing correction. No GPL-licensed Eevee implementation was copied. No subscription/authentication changes are included.
+The unstable experimental Spotify+ lyrics feature was removed to simplify setup and maintenance. The custom menu entry, local LRC parser/import tool, LRCLIB client, dialogs and playback-metadata polling are no longer shipped or run. No lyrics-provider requests are made by the extension.
-## Flow
-
-1. The injected media-session hook captures only Spotify's own native token.
-2. `Hooks.updateLyrics()` reads that session's metadata and interpolates its playback clock.
-3. A valid local `files/sptv-lyrics/NAME.lrc` takes priority.
-4. **Fetch from LRCLIB** snapshots current title, artist, album and duration and runs `Provider.fetch()` on a background executor. The overlay states what metadata is shared.
-5. `GET https://lrclib.net/api/get` uses the public metadata contract. No Spotify token/client ID is used. Redirects are disabled, response size is capped at 512 KiB, connect/read timeouts are set, and a 30-second overall watchdog disconnects slow responses. A monotonic deadline is also checked between reads.
-6. Results are returned to the UI thread and stored under the captured track identity in a 12-entry memory map. Rendering always resolves the currently playing identity, so a late response for an old track does not replace the new track's lyrics. Requests have a 30-second cooldown.
-7. Timed LRC uses the parser and current native playback position. Plain results display a preview and can be opened in a separate D-pad-scrollable dialog. Instrumental/no-result/error responses are explained without inventing timings.
-
-## Main files
-
-- `src/dev/aurora/tvpatch/Hooks.java`: injected lifecycle/session hooks, dialogs and provider integration.
-- `src/dev/aurora/tvpatch/Provider.java`: public LRCLIB client and response parser.
-- `src/dev/aurora/tvpatch/Lyrics.java`: LRC parser and clock interpolation.
-- `assets/spotifyplus-tv.js`: theme presentation only.
-- `patch.py`: exact-version bytecode injection; rejects an unrecognized original base APK.
-- `build.ps1`: reproducible Windows build/signature verification from the user's four original APKs.
-- `tests/`: original lyric fixtures, query/response tests, optional live lookup smoke test.
-
-## Continue development
-
-The 0.2 update was observed fetching and rendering timed lyrics for a real signed-in Spotify track at its native playback position. Continue checking track changes during a fetch, local-file precedence, seek/pause/resume, long-running drift and plain-dialog scrolling. Do not treat that single lookup/render check as complete device coverage. LRCLIB coverage and timing can vary.
-
-Fetched lyrics are not saved to disk. If adding persistence later, define retention and deletion and preserve provider/rightsholder attribution. Never commit proprietary APKs, signing keys, account tokens or fetched lyric catalogs. GitHub contains the extension source and build/test instructions only.
+The update does not clear app data or delete previously imported files. Those files and old preferences are unused. Earlier release tags preserve the historical source and notices. This removal concerns the extension feature; Spotify controls any lyrics in its original client.
diff --git a/README.md b/README.md
index 8bbb5ab..278fe1b 100644
--- a/README.md
+++ b/README.md
@@ -1,128 +1,67 @@
-# Spotify+ TV 1.3.0.8
+# Spotify+ TV 1.3.0.9
-**An open-source Android TV extension and patch project**, maintained by [Tumelo Rathebe / AlphadogRSA](https://github.com/AlphadogRSA), for the inspected Spotify TV 1.134.2 ARMv7 client. **One installed Spotify app**, with the custom controls integrated into Spotify’s existing Settings/profile menu.
+**An open-source Android TV extension and patch project**, maintained by [Tumelo Rathebe / AlphadogRSA](https://github.com/AlphadogRSA), for the inspected Spotify TV 1.134.2 ARMv7 client. Custom controls live inside Spotify's existing Settings/profile menu.
## Download the latest build
-**[Latest release: Spotify+ TV 1.3.0.8](https://github.com/AlphadogRSA/spotifyplus-tv-patch/releases/latest)** · Built 27 October 2026
+**[Latest release: Spotify+ TV 1.3.0.9](https://github.com/AlphadogRSA/spotifyplus-tv-patch/releases/latest)** · Built 27 October 2026
-- [Download the signed Android TV APK](https://github.com/AlphadogRSA/spotifyplus-tv-patch/releases/download/v1.3.0.8/SpotifyPlus-TV-1.3.0.8.apk)
-- [Download the Windows installer ZIP](https://github.com/AlphadogRSA/spotifyplus-tv-patch/releases/download/v1.3.0.8/SpotifyPlus-TV-1.3.0.8-Windows-Installer.zip)
-- [SHA-256 checksums](https://github.com/AlphadogRSA/spotifyplus-tv-patch/releases/download/v1.3.0.8/SHA256SUMS.txt)
+- [Signed Android TV APK](https://github.com/AlphadogRSA/spotifyplus-tv-patch/releases/download/v1.3.0.9/SpotifyPlus-TV-1.3.0.9.apk)
+- [Windows installer ZIP](https://github.com/AlphadogRSA/spotifyplus-tv-patch/releases/download/v1.3.0.9/SpotifyPlus-TV-1.3.0.9-Windows-Installer.zip)
+- [SHA-256 checksums](https://github.com/AlphadogRSA/spotifyplus-tv-patch/releases/download/v1.3.0.9/SHA256SUMS.txt)
-This is an unofficial build for the inspected **ARMv7 Android TV** installation of Spotify TV 1.134.2 (`com.spotify.tv.android`). The APK combines the ARMv7, English and TV-density splits into one installable file; it is not universal across TV architectures. The Windows package installs the app on your TV through ADB; it is not a Windows Spotify app.
+This unofficial APK targets the inspected **ARMv7 Android TV** installation of Spotify TV 1.134.2 (`com.spotify.tv.android`). It merges ARMv7, English and TV-density splits into one file. The Windows package installs on a TV through ADB; it is not a Windows Spotify client.
-## Install or update from Windows
-
-1. Download and extract the entire Windows installer ZIP.
-2. Enable debugging on the TV and connect the PC and TV to the same network.
-3. Double-click **Install-Spotify.cmd**. Enter the TV IP address when prompted and accept the TV debugging authorization.
-4. The installer checks the APK checksum, updates Spotify, grants the audio diagnostic permission, launches the app and starts the embedded Hush helper.
-
-The package includes the signed APK and official Android platform-tools. No Java installation, private signing key or administrator access is required. Updates use `adb install -r` without uninstalling Spotify or clearing app data. Updating an existing installation requires a matching signing certificate; if Android rejects the update, keep the existing app and inspect the error before taking further action.
-
-For manual installation with an authorized ADB connection:
-
-```powershell
-adb -s TV_IP:5555 install -r SpotifyPlus-TV-1.3.0.8.apk
-adb -s TV_IP:5555 shell pm grant com.spotify.tv.android android.permission.DUMP
-adb -s TV_IP:5555 shell am start -W -n com.spotify.tv.android/.SpotifyTVActivity
-```
-
-Run `start-hush.ps1` from the extracted installer with `-Serial TV_IP:5555 -Adb .\tools\platform-tools\adb.exe` to start the helper after manual installation or a TV reboot. Hush is opt-in; enable it in Spotify's settings.
-
-## Features in 1.3.0.8
-
-- **Native settings:** appearance, artwork blur, motion, promotion hiding, player-local ad muting, Hush, EQ, lyrics and sleep timer. The existing Spotify rows stay in place. Menu/F1 or hold OK opens Spotify’s own Settings screen.
-- **Graphic EQ:** dark rounded panel, blue vertical controls and connected curve inspired by the supplied reference. Ten frequency points from 31 Hz to 16 kHz map logarithmically onto the output’s available hardware bands. EQ stays ±6 dB; post-gain stays 0–6 dB. Existing five-band settings migrate once. Left/Right selects, Up/Down adjusts, OK moves to post-gain and then toolbar, Back closes.
-- **Integrated Hush:** the helper code ships inside Spotify’s APK. An authorized ADB setup starts a shell-owned helper process, which can survive Spotify’s force-stop and relaunch it. No companion app or Shizuku installation is required. Hush is opt-in; helper setup is required after a TV reboot or APK update. See [HUSH.md](https://github.com/AlphadogRSA/spotifyplus-tv-patch/blob/v1.3.0.8/HUSH.md).
-- **Existing features:** Spotify-only audio effects, local/LRCLIB lyrics, Aurora/Midnight/Ember/Ocean/Rose/Solar appearance, artwork blur, motion, promotion hiding and sleep timer. The timer survives Spotify process restarts and clears on a TV reboot.
-
-## New and fixed in 1.3.0.8
-
-- **Home artwork blur repaired:** native artwork containers, gradients, sharp foreground images and page layout remain intact. A separate decorative halo sits behind the displayed Home artwork, including during loading/fade-in, instead of clipping the page or substituting unrelated cover art.
-- **Clean blur toggles:** disabling blur removes the added halo without changing native positioning or overflow. Repeated application does not duplicate it.
-- **EQ-style Spotify+ panels:** shared dark navy rounded frames, subtle borders, blue focus controls, consistent Close buttons and clearer headings across EQ, Lyrics, Sleep Timer, Hush Setup and About. Settings rows use matching cards and more readable labels.
-- **Lyrics UI improved:** empty lyric rows no longer leave a large blank panel, Close is in the header, and unavailable actions are visually muted. Plain lyrics use the shared frame and allow returning to Close from the top of the scroll view.
-- Existing seven themes, developer GitHub QR, visible-only Home navigation and Settings/Home focus fixes are retained.
-
-**Verified on the TV:** toggled blur on and off with unchanged native artwork geometry and header position, confirmed clean halo removal, and opened/closed EQ, Lyrics, Sleep, Hush Setup and About with the remote. The updated About QR decoded correctly from the TV screenshot. Your original blur preference was restored and other installed apps were unchanged.
+## New and fixed in 1.3.0.9
-## Visible navigation fix retained from 1.3.0.7
+- **Native Spotify menu appearance:** ten Spotify+ rows reuse Spotify's own list buttons, typography, subtitle and focus styles instead of custom cards. The EQ-style native dialogs remain for EQ, Sleep, Hush Setup and About.
+- **Experimental lyrics retired:** the unstable experimental lyrics feature has been removed to simplify setup and maintenance. Its menu, provider network requests, parser, dialogs and polling are gone. Existing app data is preserved; old imported files are simply unused.
+- **Faster input path:** Search/text input bypasses the extension's asynchronous key-routing and long-OK interception. A menu-to-Search press still receives its matching key release. Android keeps control of the keyboard and typing.
+- **Less background work:** hidden settings skip state refreshes; focus mode is cached and reported only when it changes. Unrelated Home artwork/card mutations no longer rescan settings. Removing lyrics also removes its playback-metadata polling and worker.
+- **Previous fixes retained:** bounded settings scrolling, Settings/Home focus handoff, visible-only navigation with Upgrade blocked, separate Home artwork blur halo, seven themes and the developer GitHub QR.
-- **Visible controls only:** Home's remote navigation skips Upgrade and hidden, transparent, disabled, off-screen or duplicate nested controls.
-- **Visible endpoints:** Left stops at the first visible control and Right stops at the last. There are no extra invisible Upgrade stops beyond the buttons shown on screen.
-- **Upgrade removed from focus:** its control is disabled, hidden, inert, excluded from tab order and marked hidden for accessibility. This block stays in place even when other promotion filtering is disabled.
-- **Remembered focus repaired:** entering the top menu with Spotify's old Upgrade position moves focus immediately to an available visible control. Visibility is checked again for each navigation action.
+**TV verification:** installed as a same-key update with app data retained. Keyboard opening succeeded in three focused-Search trials at 3.12, 2.53 and 2.23 seconds, including ADB command and status-query overhead. These are device observations, not a controlled speed comparison or a claim that Android keyboard startup is instantaneous. Audio output, timer expiration and full Hush recovery still require separate playback testing. See [VERIFICATION.md](VERIFICATION.md).
-**Verified on the TV:** 11 Right and 11 Left remote presses stayed on visible controls and stopped at Account and Now Playing respectively. A remembered Upgrade position redirected to a visible control, and Home still activated. Existing Settings/Home fixes, seven themes and developer QR are retained.
+## Current features
-## Settings/Home fixes retained from 1.3.0.6
+- Appearance: Spotify original, Aurora, Midnight, Ember, Ocean, Rose and Solar; artwork blur and cinematic motion.
+- Spotify-only graphic EQ: ten frequency controls, connected curve, hardware-band mapping, +/-6 dB EQ and 0-6 dB post-gain. Existing settings migrate once.
+- Opt-in player-local ad muting and integrated [Hush helper](https://github.com/AlphadogRSA/spotifyplus-tv-patch/blob/v1.3.0.9/HUSH.md). The embedded helper needs authorized ADB setup after an APK update or TV reboot.
+- Sleep timer, retained across Spotify process restarts and cleared on TV reboot.
+- About with developer credit and offline GitHub QR. Menu/F1 or hold OK outside text entry opens Spotify's Settings.
-- **Reliable Settings to Home navigation:** top-menu actions take priority over the profile list, so OK on Home activates Home instead of an old settings selection.
-- **Stale selection cleared:** leaving the Spotify+ list clears its browser focus and suppresses the old profile highlight while the top menu has focus. Reopening Settings also clears leftover header focus.
-- **Up returns to the top menu:** moving above the first native profile row hands navigation back to Spotify.
-- **Dialog and key-release handling:** opening and closing a settings dialog does not swallow the next Home press; handled and delegated presses retain matching release behavior.
+Upgrade's promotional UI is excluded from navigation, direct activation and its upsell route. This changes the interface without changing account subscriptions or streaming entitlements.
-**Verified on the TV:** three About-to-Home cycles, exactly one Home activation per press, remote Up/Left/Right handoff to Home, cleared profile highlighting and preserved Upgrade blocking. Existing themes, developer QR, settings scrolling and app data are retained.
-
-## Features retained from 1.3.0.5
-
-- **Upgrade UI blocked:** the remote skips Upgrade in the top menu; direct clicks are stopped and opening the native `#/upsell` route returns Home. This blocks the promotional interface, without changing subscriptions or streaming entitlements.
-- **Developer About panel:** shows **Tumelo Rathebe / AlphadogRSA**, [github.com/AlphadogRSA](https://github.com/AlphadogRSA), and a bundled offline QR code linking to that profile. The displayed app version now follows the build version.
-- **Three new themes:** Ocean (blue), Rose (pink) and Solar (gold), alongside Spotify original, Aurora, Midnight and Ember. Appearance cycles through all seven; existing saved choices keep their original indices.
-- **Original navigation retained:** Now Playing, Home, Search, Library, settings and the account control remain reachable; native dialogs retain their own controls.
-
-**Verified on the TV:** Upgrade click and route blocking, remote navigation skipping Upgrade, all seven theme choices and restoration of the previous selection, the developer credit and a QR decoded directly from the About screenshot. Existing settings-scroll checks and browser/native regression tests pass.
-
-## Settings scrolling fix retained from 1.3.0.4
-
-- **Stable settings-page layout:** moving through settings scrolls only the settings list. Focusing a row no longer scrolls Spotify's outer page or leaves the top navigation clipped when returning Home.
-- **Viewport-sized settings list:** the list fits below its current screen position, with a margin around the selected control.
-- **Upgrade entry hidden immediately:** when Hide promotions is enabled, the main Upgrade/upsell control is hidden by CSS before observer-based filtering runs, including newly recreated controls. Home, Search, Library and account controls remain available.
-- Updated the public project description and project-authored documentation wording. Original third-party license text is preserved.
-
-**Verified on the Xiaomi TV:** all 11 rows were reached with remote key events, the header position stayed unchanged through a full scroll and after returning Home, and main Upgrade controls had no rendered area. Same-key installation retained app data; other installed apps were unchanged.
-
-## Remote-navigation bugfix retained from 1.3.0.3
-
-Fixed the issue where the new Spotify+ TV settings appeared but could not be reached with the TV remote. Spotify handles D-pad input through its native bridge, so ordinary browser keyboard listeners did not receive those events.
-
-- Routes native Up/Down and OK events to the settings focus controller on the profile page.
-- Moves between Spotify's original controls and all 11 custom rows, with scrolling to keep the selected row visible.
-- Leaves native dialog controls and navigation outside the profile page with Spotify.
-- Corrects the version displayed in About and the Ember settings-accent color.
-- Adds regression coverage for virtual focus, native key routing, key-up handling and trusted-page boundaries.
-
-**Previous 1.3.0.3 verification on the Xiaomi TV:** installed 1.3.0.3 as a same-key update, reached all 11 rows using real ADB D-pad key events, and opened the native graphic EQ panel with OK. Existing app data and other installed apps were preserved. Sound quality and Hush ad-recovery behavior still need separate playback testing.
+## Install or update from Windows
-## Earlier fixes and improvements retained
+1. Download and extract the entire Windows installer ZIP.
+2. Enable TV debugging and connect the PC and TV to the same network.
+3. Double-click **Install-Spotify.cmd**, enter the TV IP address and accept the TV authorization prompt.
+4. The installer checks the APK checksum, updates Spotify, grants the audio diagnostic permission, launches the app and starts its embedded helper.
-Version 1.3.0.2 introduced the signed single-APK Windows package for the native-settings, EQ and Hush work in 1.3.0.1. Version 1.3.0.8 retains these improvements.
+The package contains the signed APK and official Android platform-tools. No Java, local signing key or administrator access is required. Updates use `adb install -r` without uninstalling or clearing app data. A certificate mismatch stops installation; keep the existing app and inspect that error.
-- **Settings available on first navigation:** registers the native settings bridge before Spotify loads its TV page, with trusted-page checks when an action runs.
-- **Hush recovery state:** corrects the pending-recovery latch and retains cooldown, helper-readiness, pause and sleep-timer guards to limit repeated restart attempts.
-- **Persistent sleep timer:** retains the deadline across Spotify process restarts and clears it after a TV reboot.
-- **EQ migration and hardware mapping:** migrates the older five-band preferences and maps the ten displayed frequency controls onto the available hardware bands, with cached writes for unchanged settings.
-- **Signing script repaired:** passes the configured signing arguments to `apksigner`, allowing same-key signing and verification to complete.
-- **Simpler Windows updates:** ships the signed APK and ADB together, removes the Java/local-keystore requirement, and checks the APK hash using a Windows PowerShell-compatible implementation. Installation does not uninstall the app or reset its data.
-- **Earlier theme and performance fixes retained:** broader TV focus/action/progress theme coverage, promotion filtering that preserves unrelated playback controls, fewer repeated DOM scans and audio-effect writes, and cleanup of closed dialogs.
+```powershell
+adb -s TV_IP:5555 install -r SpotifyPlus-TV-1.3.0.9.apk
+adb -s TV_IP:5555 shell pm grant com.spotify.tv.android android.permission.DUMP
+adb -s TV_IP:5555 shell am start -W -n com.spotify.tv.android/.SpotifyTVActivity
+```
-These describe the implemented changes and automated checks. Installation and remote navigation were verified for 1.3.0.8; audio and Hush behavior still need playback verification.
+After manual installation or a TV reboot, run `start-hush.ps1 -Serial TV_IP:5555 -Adb .\tools\platform-tools\adb.exe` from the extracted installer. Hush remains opt-in.
## Build from source
-The rebuilt **single APK** is labeled `1.3.0.8`. It retains Android versionCode `2340200` from the inspected client. This is a extension version, not an upstream Spotify release. The build merges the inspected ARMv7/English/TV-density splits into one file; it is not an all-architecture universal package.
+The rebuilt **single APK** is labeled `1.3.0.9`. It retains Android versionCode `2340200` from the inspected client. This is a extension version, not an upstream Spotify release. The build merges the inspected ARMv7/English/TV-density splits into one file; it is not an all-architecture universal package.
-The source matching this release is available at **[tag v1.3.0.8](https://github.com/AlphadogRSA/spotifyplus-tv-patch/tree/v1.3.0.8)** and on `feat/hush-tv`. The default branch has not yet merged the feature implementation. To obtain the matching source and pinned helper:
+The source matching this release is available at **[tag v1.3.0.9](https://github.com/AlphadogRSA/spotifyplus-tv-patch/tree/v1.3.0.9)** and on `feat/hush-tv`. The default branch has not yet merged the feature implementation. To obtain the matching source and pinned helper:
```powershell
-git clone --branch v1.3.0.8 --recurse-submodules https://github.com/AlphadogRSA/spotifyplus-tv-patch.git
+git clone --branch v1.3.0.9 --recurse-submodules https://github.com/AlphadogRSA/spotifyplus-tv-patch.git
```
`rebuild_release.py` verifies the exact previous v0.5 installation archive, replaces only the extension definitions/assets, adds the guarded embedded helper provider, updates the version name and merges the split resources/libraries. It produces an **unsigned APK**, which must be signed with the existing retained key to update your installed app. The original key is not stored here. Use `sign-apk.ps1`; do not uninstall or clear data to work around a mismatched key.
-The local build passed APK v1/v2/v3 signature verification, prior-certificate matching, alignment, package/version checks, runtime/helper tests, Windows PowerShell payload validation, bundled ADB execution and archive/hash verification. The separate Gradle fingerprint check could not start locally because Java could not establish a loopback connection. TV installation and D-pad navigation were verified for 1.3.0.8; Hush recovery/queue behavior and audio output still need device verification. Earlier 0.5 device observations are documented separately in [VERIFICATION.md](VERIFICATION.md).
+The local build passed APK v1/v2/v3 signature verification, prior-certificate matching, alignment, package/version checks, runtime/helper tests, Windows PowerShell payload validation, bundled ADB execution and archive/hash verification. The separate Gradle fingerprint check could not start locally because Java could not establish a loopback connection. TV installation and D-pad navigation were verified for 1.3.0.9; Hush recovery/queue behavior and audio output still need device verification. Earlier 0.5 device observations are documented separately in [VERIFICATION.md](VERIFICATION.md).
The original four-APK source build is also supported by `build.ps1` with your own original inputs and key. `install.ps1` installs that set, grants the existing audio diagnostic permission, launches Spotify and starts the embedded helper. For a signed single APK use `adb install -r`, grant `android.permission.DUMP`, launch Spotify, then run `start-hush.ps1`.
@@ -130,10 +69,10 @@ The Windows release ZIP includes the signed APK and official ADB platform-tools.
## Open source and licenses
-The extension, patch/build tooling, tests and helper adaptations are open source. You can inspect the [source for this release](https://github.com/AlphadogRSA/spotifyplus-tv-patch/tree/v1.3.0.8), report issues, and contribute changes under the applicable licenses.
+The extension, patch/build tooling, tests and helper adaptations are open source. You can inspect the [source for this release](https://github.com/AlphadogRSA/spotifyplus-tv-patch/tree/v1.3.0.9), report issues, and contribute changes under the applicable licenses.
-- **Original TV UI, lyrics and audio implementation:** [MIT License](LICENSE).
-- **Embedded Hush helper and adaptations:** GPL-3.0, with the [upstream source pinned in this release](https://github.com/AlphadogRSA/spotifyplus-tv-patch/tree/v1.3.0.8/hush) and [full license notice](https://github.com/AlphadogRSA/spotifyplus-tv-patch/blob/v1.3.0.8/assets/HUSH-COPYING.txt).
+- **Original TV UI and audio implementation:** [MIT License](LICENSE).
+- **Embedded Hush helper and adaptations:** GPL-3.0, with the [upstream source pinned in this release](https://github.com/AlphadogRSA/spotifyplus-tv-patch/tree/v1.3.0.9/hush) and [full license notice](https://github.com/AlphadogRSA/spotifyplus-tv-patch/blob/v1.3.0.9/assets/HUSH-COPYING.txt).
- **Kotlin ReVanced host module:** [GPL-3.0-only](revanced/COPYING).
Spotify's original application binaries, branding, artwork, music and recordings remain proprietary or owned by their respective rightsholders. The open-source licenses above apply to the relevant project code; they do not make the entire bundled Spotify APK open source or grant rights to third-party content.
@@ -145,15 +84,15 @@ Credit belongs to the developers and communities behind each respective project.
| Developer / project | Contribution or inspiration |
| --- | --- |
| [Tumelo Rathebe / AlphadogRSA](https://github.com/AlphadogRSA) | Maintains this Android TV project, TV integration, builds and installer. |
-| [Devon Shoutz / LeNerd46 — SpotifyPlus](https://github.com/LeNerd46/SpotifyPlus) | Inspiration for themes, motion, sleep timer and custom lyrics. The upstream MIT notice is retained; mobile hooks, fonts and assets are not copied. |
-| [coldMEW — Hush](https://github.com/coldMEW/Hush) | Eight helper source files adapted from Hush 2.0.2, pinned at `4e9ded397338de5c69b1784c636feb3d34a8de01`, are embedded under GPL-3.0. |
-| [SideloadLabs — EeveeSpotifyReincarnated](https://github.com/SideloadLabs/EeveeSpotifyReincarnated) | Inspiration for optional lyrics-provider and presentation features. No Eevee code, binaries, assets or iOS hooks are incorporated. |
+| [Devon Shoutz / LeNerd46 — SpotifyPlus](https://github.com/LeNerd46/SpotifyPlus) | Inspiration for themes, motion, sleep timer and custom lyrics. The upstream MIT notice is retained; mobile hooks, fonts and assets are not copied. |
+| [coldMEW — Hush](https://github.com/coldMEW/Hush) | Eight helper source files adapted from Hush 2.0.2, pinned at `4e9ded397338de5c69b1784c636feb3d34a8de01`, are embedded under GPL-3.0. |
+| [SideloadLabs — EeveeSpotifyReincarnated](https://github.com/SideloadLabs/EeveeSpotifyReincarnated) | Historical inspiration for the retired experimental lyrics feature and presentation controls. No Eevee code, binaries, assets or iOS hooks are incorporated. |
| [Spicetify contributors](https://github.com/spicetify/cli) | Inspiration for CSS-based presentation customization. No Spicetify source, extensions or assets are bundled. |
| [ReVanced developers](https://github.com/ReVanced/revanced-patcher) | Official patching framework used by the Kotlin build host, with pinned CLI tooling. |
-| [LRCLIB contributors](https://lrclib.net/docs) | Public API used by the independently implemented, optional manual lyrics lookup. Lyrics remain subject to rightsholders' rights and provider availability. |
+| [LRCLIB contributors](https://lrclib.net/docs) | Public API used by the retired experimental lyrics lookup in earlier releases. |
| [Apktool / iBotPeaches contributors](https://github.com/iBotPeaches/Apktool) and [REAndroid / APKEditor contributors](https://github.com/REAndroid/APKEditor) | APK decoding/rebuilding and split-merging tools used in the release build. |
| [Android Open Source Project](https://source.android.com/) | Android SDK signing/alignment tools and official ADB platform-tools; bundled tool notices are retained. |
-See the [inspiration notes](assets/INSPIRATION.md), [SpotifyPlus MIT notice](assets/SPOTIFYPLUS-LICENSE.txt) and [Hush source notice](https://github.com/AlphadogRSA/spotifyplus-tv-patch/blob/v1.3.0.8/assets/HUSH-NOTICE.txt) for attribution details.
+See the [inspiration notes](assets/INSPIRATION.md), [SpotifyPlus MIT notice](assets/SPOTIFYPLUS-LICENSE.txt) and [Hush source notice](https://github.com/AlphadogRSA/spotifyplus-tv-patch/blob/v1.3.0.9/assets/HUSH-NOTICE.txt) for attribution details.
-The build does not edit Spotify credentials, subscriptions or account entitlements. The local volume fallback affects only Spotify’s player; the graphic EQ attaches only to positive audio sessions owned by Spotify. There is no shared-output effect fallback. Optional manual LRCLIB lookup sends song title, artist, album and duration to that provider; see [LYRICS.md](LYRICS.md). Audio diagnostics remain in memory; see [AUDIO.md](AUDIO.md).
+The build does not edit Spotify credentials, subscriptions or account entitlements. The local volume fallback affects only Spotify’s player; the graphic EQ attaches only to positive audio sessions owned by Spotify. There is no shared-output effect fallback. The experimental lyrics integration has been removed; see [LYRICS.md](LYRICS.md). Audio diagnostics remain in memory; see [AUDIO.md](AUDIO.md).
diff --git a/VERIFICATION.md b/VERIFICATION.md
index 142658b..0590ada 100644
--- a/VERIFICATION.md
+++ b/VERIFICATION.md
@@ -1,4 +1,91 @@
-# Verification — 26 October 2026
+# 1.3.0.9 native menu, lyrics removal and input verification - 27 October 2026
+
+- Ten Spotify+ rows reuse the native Spotify list-button and subtitle classes, including native focused styling. On TV the font, family, horizontal padding and corner radius matched the original About row; focus has the native selected surface. Screenshot inspected locally.
+- Lyrics menu, Java parser/provider, import tool, dialogs, network executor and metadata polling removed. Final DEX contains neither Lyrics nor Provider extension class. Existing imported files/preferences are left untouched.
+- Browser regressions verify native menu styling, no lyrics row, text-input delegation, paired menu-to-search key release, focus-only reports, no settings rescans for 200 unrelated Home insertions, bounded scrolling, Home focus, Upgrade blocking, visible endpoints, themes and blur.
+- Runtime lifecycle/trust, audio session isolation, EQ mapping/cache, ad-mute state, sleep deadline, Hush policy and helper source tests passed. Java/D8 compilation succeeded. The separate Gradle fingerprint runner remains locally blocked by Java loopback connectivity; no full Gradle success is claimed.
+- Same-key APK 1.3.0.9 installed on Xiaomi TV with versionCode 2340200. Three About/Home cycles activated Home exactly once; D-pad handoff, cleared stale selection and blocked Upgrade verified. Third-party package lists unchanged. Helper startup requested after update.
+- Three actual remote keyboard activations from a focused Search input reported Android mInputShown=true at 3115, 2527 and 2232 ms. This includes ADB command/status overhead and is not a controlled before/after comparison. Initial trials from a non-input focus or another route were discarded. Some Android IME startup delay remains; the extension's text-entry round trip and long-OK interception are bypassed.
+- Signed APK verified with v1/v2/v3, retained certificate SHA256 1ff3a55d2b53b7f232d47584eed11ed4445d0eba6c735212d071e62734fc57a1 and 16 KiB page alignment. Installer payload validation and archive integrity are checked by the packaging script.
+- Audio output, timer expiry, Hush recovery/queue behavior and universal keyboard startup performance are not claimed verified. Historical evidence follows.
+
+# 1.3.0.8 Home blur and panel verification - 27 October 2026
+
+- Reproduced the native Home background receiving synthetic clipping/isolation and unrelated fallback artwork. A separate loading/fade test reproduced zero-opacity artwork being treated as absent.
+- Browser regressions pass for native wrapper overflow, sharp image/unchanged geometry, native gradient opacity, isolated halo, duplicate prevention and toggle cleanup. Existing presentation, theme, performance, settings scroll/focus and visible navigation checks passed.
+- Same-key final runtime installed on Xiaomi TV. Native Home image geometry, filter:none, wrapper overflow:visible and header position stayed unchanged after enabling blur; added halo appeared and disabling it removed it cleanly. Original blur preference restored.
+- EQ, main Lyrics, Sleep Timer, Hush Setup and About were opened and closed with real remote input; final screenshots visually inspected for matching navy surfaces, rounded frames and blue controls. Empty Lyrics state is compact and unavailable actions muted.
+- About GitHub QR decoded from the final TV screenshot to https://github.com/AlphadogRSA. Plain-lyrics content was not loaded during this UI-only check.
+- Final APK scripts match source and the native DEX matches the freshly compiled shared-panel runtime. Signatures/certificate, alignment and installer integrity checked. No uninstall or data clearing; other installed apps unchanged. Helper startup requested after update.
+- Audio response, timer expiration and full Hush recovery/queue behavior were not retested. Historical evidence follows.
+
+# 1.3.0.7 visible-navigation verification - 27 October 2026
+
+- Regression fixtures reproduced hidden/transparent/offscreen focus and an unrepaired native Upgrade position, then passed after visibility filtering, endpoint clamping and menu-entry focus repair.
+- Browser tests verify dynamic removal of the selected control, Upgrade disabled/tabIndex -1/aria-hidden, preserved account/Now Playing access, Settings/Home focus handoff and bounded scrolling. Theme and efficiency regressions passed.
+- Same-key 1.3.0.7 installed on Xiaomi TV. Eleven actual Right presses and eleven Left presses kept selected controls visible and clamped at Account and Now Playing.
+- Simulated Spotify's remembered Upgrade focus at menu entry; it immediately moved to a visible control. Upgrade was disabled, hidden, excluded from tab order and computed to display:none.
+- Home still activated. No uninstall or data clearing; pre/post third-party package lists unchanged. Helper startup requested after update.
+- Final APK signatures/certificate and alignment, installer validation and archive integrity checked. Audio response and full Hush recovery were not retested.
+
+# 1.3.0.6 focus-handoff verification - 27 October 2026
+
+- Regression test first reproduced Home OK being swallowed by a profile setting. Further cases reproduced stale unmarked header focus on profile reentry and a dialog consuming the prior OK release.
+- Shared browser/native key dispatch now prioritizes top navigation, clears stale profile/header focus, delegates Up from the first profile row and keeps matching key-release handling.
+- Focus handoff, native settings, Upgrade blocking, bounded scroll, theme, bridge lifecycle and presentation-efficiency regressions passed.
+- Final APK assets match source; signatures and retained certificate verified, alignment checked, and 1.3.0.6 installed as a same-key update on the Xiaomi TV.
+- Three real remote About-open/Back/Home-OK cycles each activated Home exactly once and removed injected profile rows on leaving.
+- Real remote Up released the profile to the top menu; native profile box shadow was none. Left/Right reached Home, and OK activated it exactly once. Upgrade click remained blocked.
+- Other installed apps unchanged; no uninstall or data clearing. Hush helper startup requested after update.
+- Audio response and full ad-recovery/queue behavior were not retested. Historical evidence follows.
+
+# 1.3.0.5 verification - 27 October 2026
+
+- New regressions reproduced direct Upgrade activation and missing new palettes before implementation, then passed for click blocking, virtual-focus OK, Left/Right skipping, upsell-route redirection, account/Now Playing access, and Ocean/Rose/Solar colors.
+- Native bridge tests verify handled keys never replay and unhandled keys replay exactly once; Back and untrusted routes retain their boundaries. Existing settings/scroll, theme and efficiency regressions pass.
+- Same-key APK installed on Xiaomi TV as 1.3.0.5. Direct Upgrade click stayed on Home, forced upsell route redirected Home, and real remote Left/Right events skipped Upgrade and reached settings/account controls.
+- Real remote OK cycled all seven themes; the prior selection was restored.
+- Remote OK opened About. Developer Tumelo Rathebe / AlphadogRSA, public GitHub URL and version verified in native UI hierarchy.
+- QR generated offline and independently decoded both from the PNG asset and from the actual TV About screenshot to https://github.com/AlphadogRSA.
+- Signature/certificate, alignment and package metadata checks passed. Other installed apps unchanged; no uninstall or app-data clearing.
+- Audio response, full ad-recovery/queue behavior and account service compatibility were not retested in this update.
+
+# 1.3.0.4 UI verification - 27 October 2026
+
+- Regression fixtures first reproduced the outer-header scroll offset and the first-frame Upgrade control visibility, then passed with bounded inner scrolling and direct CSS hiding.
+- Settings, Upgrade entry, native navigation, presentation, theme regressions, layout efficiency and native bridge lifecycle tests passed.
+- APK compiled with the pinned helper; signature/certificate, alignment and version metadata checks passed.
+- Same-key update installed on Xiaomi MiTV-AESP0 as 1.3.0.4. Real ADB D-pad events reached all 11 settings rows and kept the selected control visible.
+- Header position remained unchanged during a full downward/upward traversal and after returning Home. Main Upgrade controls computed to display:none with zero rendered width.
+- Pre/post third-party app lists unchanged; no uninstall or data clearing. Helper startup requested after the update.
+- Audio quality and Hush ad-recovery/queue behavior were not retested. Older evidence below retains its original scope.
+
+# 1.3.0.3 remote-navigation verification - 27 October 2026
+
+- Passed native bridge lifecycle/routing and browser settings regression tests, including virtual focus, key-up suppression and rejection outside trusted profile routes.
+- Passed 12 presentation checks, 16 theme regressions and 4 presentation-efficiency checks.
+- Compiled the updated runtime and pinned Hush helper; APK v1/v2/v3 signatures and prior certificate matched; alignment verified.
+- Installed on Xiaomi MiTV-AESP0 with adb install -r; Android reports versionName 1.3.0.3.
+- Real ADB D-pad events reached all 11 custom settings rows; selected controls remained within the viewport allowing subpixel rounding.
+- OK on Graphic equalizer opened the native EQ dialog; native Back dismissed it.
+- App data retained by same-key update; pre/post third-party package lists unchanged. Hush helper startup requested after update.
+- Audio output, ad recovery and queue behavior remain unverified for this build. Prior Gradle fingerprint invocation was blocked by a local Java loopback error.
+
+The historical evidence below describes older builds and retains their original limitations.
+
+# Version 1.3.0.1 — verified source and unsigned package (2026-10-27)
+
+- Final functional source: `c09378bfbf1bd12a3ff8d51453b4e489d256999e`. GitHub Actions run `40503784827` passed all three jobs: deterministic/helper/bridge/fingerprint checks, browser presentation/native-settings regressions, and Android compile/DEX/single-APK rebuild.
+- Local Java checks passed: lyrics 13, provider 10, ad-mute state 13, audio-session isolation 7, existing EQ/cache 10, plus graphic curve interpolation/migration/clamping/cache, sleep deadline and Hush policy cases. The first-document WebView lifecycle test passes without supplying a JavaScript bridge in advance; it checks null-URL registration, trusted first-page invocation and rejection after untrusted navigation.
+- Browser checks passed: 12 presentation, 16 theme/promotion, 4 performance checks, plus native settings route scoping, original-row preservation, D-pad entry/return, actions, state refresh and cleanup.
+- Review fixes: the bridge is now injected immediately before both observed native WebView `loadUrl` calls; recovery no longer has a process-local restart latch that can remain stuck if the helper fails to terminate its caller. The pending sleep deadline remains independent of visible timer cleanup.
+- The local rebuilt single APK reports package `com.spotify.tv.android`, versionName `1.3.0.1`, versionCode `2340200`; ARMv7 player libraries are merged. Earlier extension definitions are removed, the new runtime classes occur once, and the guarded embedded helper provider/full GPL notices are present. There is no companion app.
+- Final local APK SHA-256: `202c36000fb1579e3020ffb82ff86155bc8fe0cab508da5b07c0088fdb66c1f5`. Android apksig verification confirms **unsigned, zero signer certificates**. It must be signed using the retained TV key before same-key installation; no new signing key was substituted.
+- Not verified: installation/update on the TV, live D-pad behavior in Spotify’s complete SPA, actual frequency/loudness response, real ad-break dropping, queue context, process-restart playback, background/screen behavior and helper setup after reboot. No live-TV success claim is made for this version.
+
+## Historical 0.5 and earlier observations
+
+# Verification — 26 October 2026
## Release 0.5
@@ -14,8 +101,8 @@
- The modular ReVanced build applied to hash-verified original version 1.134.2 inputs, merged the runtime extension, rebuilt resources, aligned all four APKs and verified every signature. Final output was installed with install-multiple -r and the existing local key. Cold launch returned Status: ok. No uninstall or app-data reset was performed.
- Deterministic checks: 13 lyrics parser/timing assertions, 10 provider assertions, 13 ad-muting/restoration assertions, 7 audio-session isolation assertions and 16 Kotlin fingerprint/safety checks passed. The optional local Playwright/Edge presentation test passed 12 checks, including Upgrade hiding/restoration, dynamic insertion, fullscreen-background blur and clear foreground text/artwork. Python helpers compiled successfully.
-- The Android 10 diagnostic permission grant succeeded. On the TV, the audio panel reported Active · Spotify audio only while EQ/boost were enabled. Equalizer and LoudnessEnhancer initialization and settings returned successfully for this process's positive audio session. No shared-output effect was requested. The existing D-pad settings were retained across updates; the user adjusted audio/theme controls during testing.
-- The native extension menu, matching accent color, artwork blur and Upgrade controls rendered on the TV. Live WebView checks returned blur=1 and upgrade=1 on applicable pages. Counts can be zero on pages without matching artwork/Upgrade controls. The actual page’s fullscreen absolute artwork image was inspected to refine the background-only selector; smaller cover artwork is preserved.
+- The Android 10 diagnostic permission grant succeeded. On the TV, the audio panel reported Active · Spotify audio only while EQ/boost were enabled. Equalizer and LoudnessEnhancer initialization and settings returned successfully for this process's positive audio session. No shared-output effect was requested. The existing D-pad settings were retained across updates; the user adjusted audio/theme controls during testing.
+- The native extension menu, matching accent color, artwork blur and Upgrade controls rendered on the TV. Live WebView checks returned blur=1 and upgrade=1 on applicable pages. Counts can be zero on pages without matching artwork/Upgrade controls. The actual page’s fullscreen absolute artwork image was inspected to refine the background-only selector; smaller cover artwork is preserved.
- Independent review found a lifecycle cleanup gap and an insufficiently strict diagnostic table header check. Both were fixed before the final build: activity destruction invalidates pending work and queues effect release; unfamiliar/reordered table layouts are rejected. No account data or diagnostic dumps are committed.
- Ad muting is implemented and tested with synthetic state transitions, including disabling, volume changes and stale-state restoration. A real audible ad-break cycle has not been verified. Muting does not skip break duration. Audio attachment/settings were observed; no calibrated loudness or frequency-response measurements were made.
- Original login and service behavior remain Spotify's. The user paired again during this session. Themes and audio settings remain app-private and are retained by same-key updates. No DNS/VPN filter, ad SDK removal, subscription spoofing or streaming replacement is included.
@@ -34,7 +121,7 @@
The historical initial-patch checks below remain relevant to the base hooks. The 0.2 lookup/render flow was observed on a real signed-in track; extended drift, seek/pause/resume and track-change-during-fetch coverage still needs further testing.
-## Initial patch 0.1 — actual result
+## Initial patch 0.1 — actual result
The patched Spotify TV installation replaced `com.spotify.tv.android` on the connected Xiaomi MiTV-AESP0 (Android API 29). All four required APKs were installed together; the final update installed successfully with `adb install-multiple -r`. Cold launch returned `Status: ok`. Spotify's own login screen renders and remains available for the user to sign in. No Spotify account was signed into by the agent, and live audio playback was not tested.
diff --git a/assets/HUSH-COPYING.txt b/assets/HUSH-COPYING.txt
new file mode 100644
index 0000000..f288702
--- /dev/null
+++ b/assets/HUSH-COPYING.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/assets/HUSH-NOTICE.txt b/assets/HUSH-NOTICE.txt
new file mode 100644
index 0000000..602035a
--- /dev/null
+++ b/assets/HUSH-NOTICE.txt
@@ -0,0 +1,9 @@
+Integrated Hush helper · Spotify+ TV 1.3.0.1
+
+Eight helper source files adapted from coldMEW/Hush 2.0.2, commit
+4e9ded397338de5c69b1784c636feb3d34a8de01, are embedded in Spotify's APK.
+The helper/adaptations are GPL-3.0; full license: HUSH-COPYING.txt.
+Source and reproducible adaptations: https://github.com/AlphadogRSA/spotifyplus-tv-patch
+Upstream: https://github.com/coldMEW/Hush
+The original UI/lyrics/EQ source retains its MIT license. No license here
+relicenses Spotify's proprietary binaries or artwork.
diff --git a/assets/INSPIRATION.md b/assets/INSPIRATION.md
index 82281b0..d89307f 100644
--- a/assets/INSPIRATION.md
+++ b/assets/INSPIRATION.md
@@ -4,6 +4,6 @@ SpotifyPlus TV uses original Java/Python/JavaScript code written for the Android
SpotifyPlus by LeNerd46 (MIT, copyright 2025 Devon Shoutz) inspired themes, motion, sleep timer and custom lyrics. Its MIT notice is preserved in SPOTIFYPLUS-LICENSE.txt. No upstream mobile hooks, fonts, music, artwork or lyrics catalog are copied.
-EeveeSpotifyReincarnated by SideloadLabs inspired the optional custom-lyrics provider and presentation controls: https://github.com/SideloadLabs/EeveeSpotifyReincarnated . That project is an iOS tweak licensed under GPL-3.0. No Eevee source code, binaries, assets or iOS hooks are copied or linked into this extension. This is an independent Android implementation of generic lyrics features, not a port or relicensing of Eevee.
+EeveeSpotifyReincarnated by SideloadLabs historically inspired the retired custom-lyrics provider and presentation controls: https://github.com/SideloadLabs/EeveeSpotifyReincarnated . That project is an iOS tweak licensed under GPL-3.0. No Eevee source code, binaries, assets or iOS hooks are copied or linked into this extension. This is an independent Android implementation of generic lyrics features, not a port or relicensing of Eevee.
-The LRCLIB client is independently implemented against the public API contract at https://lrclib.net/docs . Only a user-initiated lookup sends current track title, artist, album and duration over HTTPS to lrclib.net. No Spotify credentials or subscription data are sent. Lyrics belong to their respective rightsholders; provider availability and permissions are not granted by this source code's MIT license.
+The independently implemented LRCLIB client and experimental lyrics UI were retired in 1.3.0.9 because the experimental feature was unstable and required too much setup. These lyrics references are historical attribution, not current functionality. Earlier tags retain the source and notices.
diff --git a/assets/developer-github-qr.png b/assets/developer-github-qr.png
new file mode 100644
index 0000000..53ec3a6
Binary files /dev/null and b/assets/developer-github-qr.png differ
diff --git a/assets/spotifyplus-settings.js b/assets/spotifyplus-settings.js
new file mode 100644
index 0000000..c5dd3e0
--- /dev/null
+++ b/assets/spotifyplus-settings.js
@@ -0,0 +1,266 @@
+function(config) {
+ 'use strict';
+ var old = window.__sptvSettings;
+ if (old) return old.configure(config);
+ var stats={syncs:0,focusReports:0};
+ var reportedMode=null,reportedProfile=null;
+ var cfg = config, section = null, host = null, lastNav = null, watchedNav = null, scheduled = false;
+ var rows = [
+ ['theme','Appearance','theme'], ['blur','Artwork blur','blurArtwork'],
+ ['motion','Cinematic motion','motion'], ['promotions','Hide promotions','hideUpgrade'],
+ ['mute','Mute detected ads','muteAds'], ['hush','Hush ad-break skipping','hushEnabled'],
+ ['hushSetup','Hush helper setup','hushStatus'], ['audio','Graphic equalizer','audioStatus'],
+ ['sleep','Sleep timer','sleep'],
+ ['about','About Spotify+ TV','version']
+ ];
+ var style = document.createElement('style'); style.id = 'sptv-native-settings-style';
+ style.textContent = '.sptv-settings-host{max-height:calc(100vh - 20rem);overflow-y:auto;overscroll-behavior:contain;padding-right:1rem;scrollbar-width:thin}' +
+ '.menu--focused .sptv-nav-focus{outline:.4rem solid var(--sptv-accent,#1ed760);outline-offset:.5rem}' +
+ '#sptv-native-settings{color:inherit;font:inherit;padding-bottom:3rem}' +
+ '#sptv-native-settings h2{font:inherit;font-weight:700;margin:3rem 0 2rem}' +
+ '.sptv-settings-host.sptv-dom-navigation .list-button--focused:not(:focus),.sptv-settings-host.sptv-settings-suspended .list-button--focused{box-shadow:none!important}';
+ (document.head || document.documentElement).appendChild(style);
+ function editing() {
+ var active=document.activeElement,nav=navElement();
+ if(nav && (nav.classList.contains('menu--focused') || nav.contains(active)))return false;
+ return !!(active && (active.matches('input,textarea,select') || active.isContentEditable)) || /^#\/search(?:[/?]|$)/.test(location.hash);
+ }
+ function reportFocus() {
+ var nav=navElement(), profile=profileVisible() && !!document.querySelector('[data-testid="profile-menu"],.profile__menu');
+ var mode=nav && (nav.classList.contains('menu--focused') || nav.contains(document.activeElement)) ? 'menu' : editing() ? 'text' : profile ? 'profile' : 'native';
+ if(mode===reportedMode && profile===reportedProfile)return;
+ reportedMode=mode;reportedProfile=profile;
+ if(window.SpotifyPlusSettings && typeof window.SpotifyPlusSettings.focus==='function'){stats.focusReports++;window.SpotifyPlusSettings.focus(mode,profile);}
+ }
+ function invoke(action) {
+ if (window.SpotifyPlusSettings && window.SpotifyPlusSettings.action) window.SpotifyPlusSettings.action(action);
+ }
+ function label(row) {
+ if (row[0] === 'theme') return ['Spotify original','Aurora','Midnight','Ember','Ocean','Rose','Solar'][Math.abs(Number(cfg.theme)||0)%7];
+ if (row[0] === 'sleep') return cfg.sleep || 'Off';
+ if (Object.prototype.hasOwnProperty.call(cfg,row[2])) {
+ var value = cfg[row[2]]; return typeof value === 'boolean' ? value ? 'On' : 'Off' : String(value);
+ }
+ return row[2];
+ }
+ function fitHost() {
+ if(!host)return;
+ var top=host.getBoundingClientRect().top;
+ host.style.maxHeight=Math.max(120,window.innerHeight-Math.max(0,top)-32)+'px';
+ }
+ function reveal(button) {
+ if(!host || !host.contains(button))return;
+ var viewport=host.getBoundingClientRect(), row=button.getBoundingClientRect();
+ if(row.topviewport.bottom-12)host.scrollTop+=row.bottom-viewport.bottom+12;
+ }
+ function navElement() { return document.querySelector('[data-testid="top-menu"]'); }
+ function profileVisible() { return !location.hash || /^#\/profile(?:[/?]|$)/.test(location.hash); }
+ function clearNavFocus() {
+ var nav=navElement();if(!nav)return;
+ Array.prototype.forEach.call(nav.querySelectorAll('.sptv-nav-focus'),function(e){e.classList.remove('sptv-nav-focus');});
+ if(nav.contains(document.activeElement))document.activeElement.blur();
+ }
+ function releaseSettingsFocus() {
+ if(!host)return;
+ if(host.contains(document.activeElement))document.activeElement.blur();
+ host.classList.remove('sptv-dom-navigation');
+ }
+ function repairNavFocus(nav) {
+ var selector='button,[data-testid="now-playing-bar"],[role="button"]';
+ var marked=nav.querySelector('[class*="--focused"]');
+ var current=nav.contains(document.activeElement) ? document.activeElement : marked && (marked.closest(selector)||marked.querySelector(selector));
+ if(current && !visibleControl(current,nav))navigation('ArrowRight',true);
+ }
+ function syncFocus() {
+ var nav=navElement(), top=!!nav && nav.classList.contains('menu--focused');
+ if(host)host.classList.toggle('sptv-settings-suspended',top);
+ if(top){releaseSettingsFocus();repairNavFocus(nav);}else clearNavFocus();
+ reportFocus();
+ }
+ var navObserver=new MutationObserver(syncFocus);
+ function watchNav() {
+ var nav=navElement();if(nav===watchedNav)return;
+ navObserver.disconnect();watchedNav=nav;
+ if(nav)navObserver.observe(nav,{attributes:true,attributeFilter:['class']});
+ syncFocus();
+ }
+ function focusChanged(event) {
+ reportFocus();
+ var nav=navElement();
+ if(nav && nav.contains(event.target))releaseSettingsFocus();
+ else if(host && host.contains(event.target)) {
+ host.classList.add('sptv-dom-navigation');host.classList.remove('sptv-settings-suspended');clearNavFocus();
+ }
+ }
+ function cleanHost() {
+ releaseSettingsFocus();
+ if(host){host.classList.remove('sptv-settings-host','sptv-dom-navigation','sptv-settings-suspended');host.style.removeProperty('max-height');}
+ if(section)section.remove();section=null;host=null;
+ }
+ function sync() {
+ stats.syncs++;reportFocus();
+ scheduled = false;
+ watchNav();disableUpgrade();
+ var topNav=navElement();if(topNav && topNav.classList.contains('menu--focused'))repairNavFocus(topNav);
+ var next = profileVisible() ? document.querySelector('[data-testid="profile-menu"],.profile__menu') : null;
+ if (!next) { cleanHost();return; }
+ if (!section || section.parentNode !== next) {
+ if(section)section.remove();
+ host=next; host.classList.add('sptv-settings-host');
+ section=document.createElement('section'); section.id='sptv-native-settings'; section.setAttribute('aria-label','Spotify+ TV settings');
+ var title=document.createElement('h2'); title.textContent='Spotify+ TV'; section.appendChild(title);
+ var nativeControl=host.querySelector('.profile-menu-item > :first-child');
+ rows.forEach(function(row) {
+ var item=document.createElement('div'); item.className='profile-menu-item sptv-setting-row';
+ var button=document.createElement('button'); button.type='button';button.tabIndex=0;button.dataset.sptvAction=row[0];
+ if(nativeControl)button.className=String(nativeControl.className||'').replace(/\S*--focused\S*/g,'').trim();
+ var name=document.createElement('span');name.textContent=row[1];button.appendChild(name);
+ var value=document.createElement('p');value.className='profile-menu-item__subtitle';button.appendChild(value);
+ button.addEventListener('click',function(event){event.preventDefault();event.stopPropagation();invoke(row[0]);});
+ button.addEventListener('focus',function(){button.classList.add('list-button--focused');reveal(button);});
+ button.addEventListener('blur',function(){button.classList.remove('list-button--focused');});
+ item.appendChild(button);section.appendChild(item);
+ });
+ host.appendChild(section);
+ }
+ fitHost();
+ section.style.setProperty('--sptv-settings-accent',['#ffffff','#91e7cf','#bbb3ff','#ffbf98','#70c8ff','#ff96b7','#ffd166'][Math.abs(Number(cfg.theme)||0)%7]);
+ rows.forEach(function(row) {
+ var button=section.querySelector('[data-sptv-action="'+row[0]+'"]'), value=label(row);
+ var subtitle=button.querySelector('p'); if(subtitle.textContent!==value)subtitle.textContent=value;
+ button.setAttribute('aria-label',row[1]+': '+value);
+ });
+ }
+ function defer(records) {
+ var selector='[data-testid="profile-menu"],.profile__menu,[data-testid="top-menu"],[data-testid="upsell-menu-item"]';
+ var relevant=records.some(function(record){
+ if(record.target.nodeType===1 && record.target.closest('#sptv-native-settings'))return false;
+ if(host && (record.target===host || host.contains(record.target)))return true;
+ return Array.prototype.some.call(record.addedNodes,function(node){return node.nodeType===1 && (node.matches(selector)||!!node.querySelector(selector));}) ||
+ Array.prototype.some.call(record.removedNodes,function(node){return node.nodeType===1 && (node.matches(selector)||!!node.querySelector(selector));});
+ });
+ if(relevant && !scheduled){scheduled=true;Promise.resolve().then(sync);}
+ }
+ var observer=new MutationObserver(defer);observer.observe(document.documentElement,{childList:true,subtree:true});
+ function remote(key) {
+ var nav=navElement();
+ if(!profileVisible() || !section || !host || !section.isConnected || (nav && (nav.classList.contains('menu--focused') || nav.contains(document.activeElement))))return false;
+ var controls=Array.prototype.slice.call(host.querySelectorAll('button'));
+ var logout=document.querySelector('[data-testid="switch-user-button"]');
+ if(logout && controls.indexOf(logout)<0)controls.push(logout);
+ var current=document.activeElement;
+ if(controls.indexOf(current)<0)current=controls.filter(function(control){return /(?:^|\s)\S*--focused(?:\s|$)/.test(control.className);})[0];
+ var index=controls.indexOf(current), next=null;
+ if(key==='ArrowDown') {
+ next=current===logout ? section.querySelector('button') : controls[Math.min(controls.length-1,index+1)];
+ } else if(key==='ArrowUp') {
+ if(index===0){releaseSettingsFocus();return false;}
+ next=controls[Math.max(0,index-1)];
+ }
+ else if(key==='Enter' || key===' ') {
+ if(!current)return false;
+ current.click();return true;
+ } else return false;
+ if(!next)return false;
+ next.focus({preventScroll:true});reveal(next);return true;
+ }
+ var upgradeSelector='[data-testid="upsell-menu-item"],.upsell-menu-item';
+ function upgradeRoute() {
+ if(/^#\/(?:upsell|upgrade|premium)(?:[/?]|$)/i.test(location.hash)) {
+ location.replace('#/view/home');return true;
+ }
+ return false;
+ }
+ function blockUpgrade(event) {
+ var nav=navElement();
+ if(nav && nav.contains(event.target) && !(event.target.closest && event.target.closest(upgradeSelector)))releaseSettingsFocus();
+ if(event.target.closest && event.target.closest(upgradeSelector)) {
+ event.preventDefault();event.stopImmediatePropagation();
+ }
+ }
+ function disableUpgrade() {
+ var nav=navElement();if(!nav)return;
+ Array.prototype.forEach.call(nav.querySelectorAll('[data-testid="upsell-menu-item"]'),function(e){
+ if(!e.disabled)e.disabled=true;
+ if(e.tabIndex!==-1)e.tabIndex=-1;
+ if(!e.hidden)e.hidden=true;
+ if(e.getAttribute('aria-hidden')!=='true')e.setAttribute('aria-hidden','true');
+ if(!e.hasAttribute('inert'))e.setAttribute('inert','');
+ });
+ }
+ function visibleControl(e,nav) {
+ if(e.matches(upgradeSelector) || e.disabled || e.getAttribute('aria-disabled')==='true')return false;
+ for(var node=e;node;node=node.parentElement) {
+ if(node.hidden || node.hasAttribute('inert') || node.getAttribute('aria-hidden')==='true')return false;
+ var style=getComputedStyle(node);
+ if(style.display==='none' || style.visibility==='hidden' || style.visibility==='collapse' || Number(style.opacity)===0)return false;
+ if(node===nav)break;
+ }
+ var rect=e.getBoundingClientRect();
+ return rect.width>0 && rect.height>0 && rect.left>=-1 && rect.top>=-1 && rect.right<=innerWidth+1 && rect.bottom<=innerHeight+1;
+ }
+ function navigation(key,down) {
+ if(upgradeRoute())return true;
+ var nav=navElement();
+ if(!nav)return false;
+ if(key==='ArrowUp' || key==='ArrowDown') {
+ clearNavFocus();
+ return false;
+ }
+ if(!nav.classList.contains('menu--focused') && !nav.contains(document.activeElement))return false;
+ releaseSettingsFocus();disableUpgrade();
+ if(key!=='ArrowLeft' && key!=='ArrowRight' && key!=='Enter')return false;
+ if(!down)return true;
+ var navControls='button,[data-testid="now-playing-bar"],[role="button"]';
+ var all=Array.prototype.slice.call(nav.querySelectorAll(navControls));
+ var eligible=all.filter(function(e){return visibleControl(e,nav);});
+ var controls=eligible.filter(function(e){return !eligible.some(function(parent){return parent!==e && parent.contains(e);});});
+ if(!controls.length){lastNav=null;clearNavFocus();return true;}
+ var current=document.activeElement;
+ if(all.indexOf(current)<0) {
+ var marked=nav.querySelector('[class*="--focused"]');current=marked && (marked.closest(navControls) || marked.querySelector(navControls));
+ }
+ if(!current)current=controls.indexOf(lastNav)>=0 ? lastNav : controls.filter(function(e){return e.dataset.testid==='top-menu--home';})[0] || controls[0];
+ var index=controls.indexOf(current), next;
+ if(current && controls.indexOf(current)<0) {
+ var origin=all.indexOf(current), direction=key==='ArrowLeft' ? -1 : 1;
+ for(var i=origin+direction;i>=0 && i=0){next=all[i];break;}
+ if(!next)for(var back=origin-direction;back>=0 && back=0){next=all[back];break;}
+ next=next || controls[0];
+ } else if(key==='Enter') {
+ if(current && controls.indexOf(current)>=0){lastNav=current;current.click();}
+ return true;
+ } else next=controls[Math.max(0,Math.min(controls.length-1,index+(key==='ArrowRight'?1:-1)))];
+ if(next) {
+ all.forEach(function(e){e.classList.remove('sptv-nav-focus');e.className=String(e.className).replace(/\S*--focused/g,'').trim();});
+ lastNav=next;next.classList.add('sptv-nav-focus');if(next.tabIndex<0)next.tabIndex=0;next.focus({preventScroll:true});
+ }
+ return true;
+ }
+ function routeChanged() {releaseSettingsFocus();clearNavFocus();lastNav=null;upgradeRoute();sync();}
+ var handledKeys=Object.create(null);
+ function dispatch(key,down) {
+ if(!down){var handled=handledKeys[key]===true;delete handledKeys[key];return handled;}
+ if(editing()) {handledKeys[key]=false;return false;}
+ var handled=navigation(key,true) || (profileVisible() && remote(key));
+ handledKeys[key]=!!handled;return !!handled;
+ }
+ document.addEventListener('click',blockUpgrade,true);
+ document.addEventListener('focusin',focusChanged,true);
+ document.addEventListener('focusout',reportFocus,true);
+ window.addEventListener('hashchange',routeChanged);upgradeRoute();
+ function key(event) {
+ if(dispatch(event.key,true)){event.preventDefault();event.stopImmediatePropagation();}
+ }
+ function keyUp(event) {if(dispatch(event.key,false)){event.preventDefault();event.stopImmediatePropagation();}}
+ document.addEventListener('keydown',key,true);
+ document.addEventListener('keyup',keyUp,true);
+ window.addEventListener('resize',fitHost);
+ var api={stats:stats,dispatch:dispatch,navigation:navigation,remote:remote,configure:function(next){cfg=next;sync();return !!section;},open:function(){
+ var nativeButton=document.querySelector('[data-testid="top-menu--settings"]');
+ if(nativeButton){nativeButton.click();return true;}
+ return !!document.querySelector('[data-testid="profile-menu"],.profile__menu');
+ },dispose:function(){navObserver.disconnect();document.removeEventListener('focusin',focusChanged,true);document.removeEventListener('focusout',reportFocus,true);document.removeEventListener('click',blockUpgrade,true);window.removeEventListener('hashchange',routeChanged);window.removeEventListener('resize',fitHost);observer.disconnect();document.removeEventListener('keydown',key,true);document.removeEventListener('keyup',keyUp,true);clearNavFocus();cleanHost();style.remove();}};
+ window.__sptvSettings=api;sync();return !!section;
+}
diff --git a/assets/spotifyplus-tv.js b/assets/spotifyplus-tv.js
index d4caab3..41fdfbd 100644
--- a/assets/spotifyplus-tv.js
+++ b/assets/spotifyplus-tv.js
@@ -1,7 +1,7 @@
function(config) {
'use strict';
// Original TV presentation code. Existing artwork only; no media/account requests.
- var VERSION = 5, ID = 'spotifyplus-tv-style';
+ var VERSION = 10, ID = 'spotifyplus-tv-style';
var previous = window.__spotifyPlusTV;
if (previous && previous.version === VERSION) return previous.configure(config);
if (previous) {
@@ -18,7 +18,7 @@ function(config) {
var style = document.getElementById(ID);
if (!style) { style = document.createElement('style'); style.id = ID; (document.head || document.documentElement).appendChild(style); }
var state = { version: VERSION, hidden: new Set(), images: new Set(), backgrounds: new Set(),
- roots: new Set(), writes: new WeakMap(), timer: null, artPending: false,
+ roots: new Set(), halos: new Map(), writes: new WeakMap(), timer: null, artPending: false,
stats: { scans: 0, artworkPasses: 0, layoutReads: 0 } };
var cfg, key, artKey, destroy = false;
var ART = 'img,main,section,[style*="background-image"],[class*="background"],[class*="npv-"],[class*="view"],body';
@@ -40,16 +40,18 @@ function(config) {
if (value) node.style.setProperty('--sptv-art', value); else node.style.removeProperty('--sptv-art');
ownWrite(node, 'style');
}
- function summary() { return 'tv-theme=' + cfg.theme + ';blur=' + (state.images.size + state.backgrounds.size) + ';hidden=' + state.hidden.size; }
+ function summary() { return 'tv-theme=' + cfg.theme + ';blur=' + (state.images.size + state.backgrounds.size + state.halos.size) + ';hidden=' + state.hidden.size; }
function css(c) {
- var accents = [null, '#91e7cf', '#bbb3ff', '#ffbf98'], accent = accents[c.theme];
+ var accents = [null, '#91e7cf', '#bbb3ff', '#ffbf98', '#70c8ff', '#ff96b7', '#ffd166'], accent = accents[c.theme];
var sheet = '.sptv-upgrade-hidden{display:none!important;visibility:hidden!important;pointer-events:none!important}'
+ + '.sptv-home-glow{position:fixed;object-fit:cover;filter:blur(38px) brightness(.68);transform:scale(1.10);opacity:.65;pointer-events:none!important;' + (c.motion ? 'animation:sptv-drift 30s ease-in-out infinite alternate' : '') + '}'
+ '.sptv-static{position:relative}.sptv-background{isolation:isolate!important;overflow:hidden!important}'
+ '.sptv-background:before{content:"";position:absolute;inset:-40px;z-index:-1;pointer-events:none;background-image:var(--sptv-art);background-size:cover;background-position:center;filter:blur(32px) brightness(.58);transform:scale(1.08);'
+ (c.motion ? 'animation:sptv-drift 30s ease-in-out infinite alternate;' : '') + '}'
+ '.sptv-art-blur{filter:blur(32px) brightness(.58)!important;transform:scale(1.08)!important}'
+ '@keyframes sptv-drift{from{transform:scale(1.08) translateX(-.5%)}to{transform:scale(1.12) translateX(.5%)}}'
+ '@media(prefers-reduced-motion:reduce){.sptv-background:before{animation:none!important}}';
+ sheet += '[data-testid="upsell-menu-item"],.upsell-menu-item{display:none!important;visibility:hidden!important;pointer-events:none!important}';
if (accent) {
sheet += ':root{--sptv-accent:' + accent + ';--text-bright-accent:' + accent + '!important;--essential-bright-accent:' + accent + '!important}'
// TV uses class-based focus and hard-coded colors, not desktop Spotify tokens.
@@ -59,10 +61,9 @@ function(config) {
+ '.entity-list-row--focused{background-color:' + accent + '20!important}'
+ '.progress-bar__indicator,.progress-bar__scrubber__dot,.progress-indicator__bar,.equalizer--colored .equalizer__bar,.bars--green .bar,.checkbox--checked,.icon-button--primary.bg-green .icon-button__content,.button:not(.button--secondary):not(.button--tertiary) .button__content{background-color:' + accent + '!important}'
+ '.entity-list-row__title--playing,.playback-queue-item__title--current-track,.playback-queue-item__title--current-track .bars,.now-playing-bar__subtitle--green,.context-menu__icon--green,.icon-green svg.tv-icon,svg.tv-icon--green,svg.tv-icon.icon-check-green{color:' + accent + '!important}'
- + '.context-menu{background-color:' + ['','#152927','#211f33','#30231e'][c.theme] + '!important}'
+ + '.context-menu{background-color:' + ['','#152927','#211f33','#30231e','#122738','#321a2a','#302719'][c.theme] + '!important}'
+ 'button:focus-visible,a:focus-visible,[role="button"]:focus-visible{outline-color:' + accent + '!important}';
}
- if (c.largeLyrics) sheet += '[data-testid*="lyrics"] p,[data-testid*="lyrics"] [role="text"]{font-size:32px!important;line-height:1.55!important}';
return sheet;
}
function directPromo(node) {
@@ -108,10 +109,21 @@ function(config) {
function artwork() {
state.stats.artworkPasses++;
var nodes = document.querySelectorAll(ART), reads = [], nextImages = new Set(), nextBackgrounds = new Map();
- var album = '', area = 0, nativeBackdrop = false, backdrop = null;
+ var album = '', area = 0, nativeBackdrop = false, backdrop = null, home = new Map();
+ var nativeRoots=Array.prototype.slice.call(document.querySelectorAll('.background')).filter(function(e){return !!e.querySelector('.background__container .background__image');});
+ nativeBackdrop=nativeRoots.some(function(root){var box=geometry(root);return box.width>0 && box.height>0 && box.bottom>0 && box.top0 && box.height>0 && box.bottom>0 && box.top0)) {
+ home.set(image,{rect:box,source:source});nativeBackdrop=true;
+ }
+ });
// Read phase: geometry/computed styles first, no interleaved DOM writes.
for (var i = 0; i < nodes.length; i++) {
- var node = nodes[i], rect = geometry(node);
+ var node = nodes[i];
+ if(node.closest('[data-sptv-decoration]') || nativeRoots.some(function(root){return root===node || root.contains(node);}))continue;
+ var rect = geometry(node);
if (!rect.width || !rect.height || rect.bottom < 0 || rect.right < 0 || rect.top > innerHeight || rect.left > innerWidth) continue;
var info = { node: node, rect: rect, style: getComputedStyle(node) }; reads.push(info);
if (node.tagName !== 'IMG') continue;
@@ -125,13 +137,24 @@ function(config) {
}
for (var j = 0; j < reads.length; j++) {
var item = reads[j], el = item.node, box = item.rect, computed = item.style;
- if (el.tagName === 'IMG' || el.matches(CONTROL) || box.width < innerWidth * .6 || box.height < innerHeight * .25) continue;
+ if (/^(HTML|BODY)$/.test(el.tagName) || el.id==='root' || el.matches('.layer,.with-nowrap,.content-section,.background-container,.background-container__solid-color,[data-testid="root"]') || el.tagName === 'IMG' || el.matches(CONTROL) || box.width < innerWidth * .6 || box.height < innerHeight * .25) continue;
var image = el.style.backgroundImage || computed.backgroundImage;
if (image && image.indexOf('url(') >= 0) nextBackgrounds.set(el, { image: image, relative: computed.position === 'static' || el.classList.contains('sptv-static') });
var color = computed.backgroundColor.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)$/);
if (!nativeBackdrop && album && box.width >= innerWidth * .8 && box.height >= innerHeight * .8 && color && (color[4] === undefined || Number(color[4]) > .95) && Math.max(+color[1], +color[2], +color[3]) < 70) backdrop = item;
}
if (backdrop && album) nextBackgrounds.set(backdrop.node, { image: album, relative: backdrop.style.position === 'static' || backdrop.node.classList.contains('sptv-static') });
+ state.halos.forEach(function(glow,image){if(!home.has(image)){glow.remove();state.halos.delete(image);}});
+ home.forEach(function(value,image){
+ var glow=state.halos.get(image);
+ if(!glow) {
+ glow=document.createElement('img');glow.className='sptv-home-glow';glow.alt='';glow.setAttribute('aria-hidden','true');glow.setAttribute('data-sptv-decoration','true');
+ image.parentElement.insertBefore(glow,image);state.halos.set(image,glow);
+ }
+ if(glow.getAttribute('src')!==value.source)glow.setAttribute('src',value.source);
+ var box=value.rect;
+ [['left',box.left],['top',box.top],['width',box.width],['height',box.height]].forEach(function(pair){var value=pair[1]+'px';if(glow.style[pair[0]]!==value)glow.style[pair[0]]=value;});
+ });
// Write phase: only changed classes/properties; removed/reused art is restored.
state.images.forEach(function(el) { if (!nextImages.has(el)) classToggle(el, 'sptv-art-blur', false); });
nextImages.forEach(function(el) { classToggle(el, 'sptv-art-blur', true); });
@@ -144,6 +167,7 @@ function(config) {
state.images = nextImages; state.backgrounds = new Set(nextBackgrounds.keys());
}
function clearArt() {
+ state.halos.forEach(function(glow){glow.remove();});state.halos.clear();
state.images.forEach(function(el) { classToggle(el, 'sptv-art-blur', false); });
state.backgrounds.forEach(function(el) { classToggle(el, 'sptv-background', false); classToggle(el, 'sptv-static', false); artworkProperty(el, ''); });
state.images.clear(); state.backgrounds.clear();
@@ -173,12 +197,12 @@ function(config) {
if (state.timer === null && !document.hidden) state.timer = setTimeout(flush, 150);
}
function relevantArt(node) {
- return node && node.nodeType === 1 && (node.matches(ART) || !!node.querySelector('img,[style*="background-image"]'));
+ return node && node.nodeType === 1 && !node.matches('[data-sptv-decoration]') && (node.matches(ART) || !!node.querySelector('img,[style*="background-image"]'));
}
state.observer = new MutationObserver(function(records) {
for (var i = 0; i < records.length; i++) {
var record = records[i], node = record.target.nodeType === 1 ? record.target : record.target.parentElement;
- if (!node || node.closest('style,script,noscript,template')) continue;
+ if (!node || node.closest('style,script,noscript,template,[data-sptv-decoration]')) continue;
if (record.type === 'attributes') {
var attr = record.attributeName, snapshot = state.writes.get(node);
if (snapshot && Object.prototype.hasOwnProperty.call(snapshot, attr) && node.getAttribute(attr) === snapshot[attr]) continue;
@@ -212,7 +236,7 @@ function(config) {
state.hidden.forEach(function(el) { el.classList.remove('sptv-upgrade-hidden'); }); clearArt();
};
state.configure = function(c) {
- var next = { theme: Math.abs(Number(c.theme) || 0) % 4, blurArtwork: !!c.blurArtwork, hideUpgrade: !!c.hideUpgrade, motion: !!c.motion, largeLyrics: !!c.largeLyrics };
+ var next = { theme: Math.abs(Number(c.theme) || 0) % 7, blurArtwork: !!c.blurArtwork, hideUpgrade: !!c.hideUpgrade, motion: !!c.motion };
var signature = JSON.stringify(next), nextArt = next.blurArtwork + ':' + next.hideUpgrade;
if (key === signature) return summary();
var first = !cfg, scan = first || nextArt !== artKey; cfg = next; key = signature; artKey = nextArt;
diff --git a/build.ps1 b/build.ps1
index b16ca34..921e770 100644
--- a/build.ps1
+++ b/build.ps1
@@ -27,7 +27,13 @@ $out = (Resolve-Path -LiteralPath $OutputDirectory).Path
foreach ($name in @('classes','dex','framework','aligned','signed')) { New-Item -ItemType Directory -Path (Join-Path $out $name) | Out-Null }
$env:JAVA_HOME = $jdk
function Check-Exit([string]$Stage) { if ($LASTEXITCODE -ne 0) { throw "$Stage failed ($LASTEXITCODE)" } }
+git -C $PSScriptRoot submodule update --init --recursive
+Check-Exit 'Pinned Hush helper source'
+$generated = Join-Path $out 'hush-generated'
+python (Join-Path $PSScriptRoot 'hush/prepare.py') --output $generated
+Check-Exit 'Hush helper preparation'
$sources = Get-ChildItem -LiteralPath (Join-Path $PSScriptRoot 'src/dev/aurora/tvpatch') -Filter '*.java' | ForEach-Object FullName
+$sources += Get-ChildItem -LiteralPath $generated -Recurse -Filter '*.java' | ForEach-Object FullName
& (Join-Path $jdk 'bin/javac.exe') -encoding UTF-8 -source 8 -target 8 -cp $androidJar -d (Join-Path $out 'classes') @sources
Check-Exit 'Java compilation'
& (Join-Path $jdk 'bin/jar.exe') cf (Join-Path $out 'extension.jar') -C (Join-Path $out 'classes') .
@@ -40,7 +46,7 @@ Check-Exit 'Verified patcher download'
if (-not $GradleExecutable) { $GradleExecutable = Join-Path $patchProject 'gradlew.bat' }
& $GradleExecutable -p $patchProject testFingerprints bundle "-PextensionDex=$(Join-Path $out 'dex/classes.dex')"
Check-Exit 'Kotlin patch compilation and fingerprint tests'
-$bundle = Join-Path $patchProject 'build/libs/spotifyplus-tv-0.5.rvp'
+$bundle = Join-Path $patchProject 'build/libs/spotifyplus-tv-1.3.0.9.rvp'
$classpath = $bundle + [IO.Path]::PathSeparator + (Join-Path $patchProject '.tools/revanced-cli-6.0.0-all.jar')
& (Join-Path $jdk 'bin/java.exe') -cp $classpath dev.aurora.patches.RunnerKt apply $bundle (Join-Path $original 'base.apk') (Join-Path $out 'patched-unsigned.apk') (Join-Path $out 'patch') (Join-Path $tools 'aapt2.exe')
Check-Exit 'Modular patching and APK rebuild'
diff --git a/docs/superpowers/plans/2026-10-27-hush-tv.md b/docs/superpowers/plans/2026-10-27-hush-tv.md
new file mode 100644
index 0000000..9a6722e
--- /dev/null
+++ b/docs/superpowers/plans/2026-10-27-hush-tv.md
@@ -0,0 +1,48 @@
+# Spotify+ TV 1.3.0.1 Implementation Plan
+
+> **For agentic workers:** Use superpowers:executing-plans task-by-task.
+
+**Goal:** One Spotify APK with embedded Hush, native settings and graphic EQ.
+
+**Architecture:** A pinned shell-owned Hush helper survives Spotify force-stop. The current process commits recovery state; the new process resumes its own session. Native profile settings host the restricted controls. The target EQ curve maps to actual output bands.
+
+**Tech Stack:** Java 8/Android SDK 35, Python tooling, Kotlin/ReVanced, Playwright.
+
+**Spec:** ../specs/2026-10-27-hush-tv-design.md
+
+## Global Constraints
+- One installed Spotify app, versionName 1.3.0.1, versionCode 2340200.
+- Retain player-local mute, existing settings, lyrics and Spotify-only effects.
+- Pinned upstream 4e9ded397338de5c69b1784c636feb3d34a8de01; GPL notices accompany helper code.
+- No private key, account data or original client inputs in git.
+
+## Review Focus
+- Repeated ad signals and failure must not cause restart loops.
+- The restart command must outlive the calling app process.
+- A timer expiring during restart must prevent subsequent play commands.
+- Settings rows must appear only in the real native settings host; native rows stay usable.
+- Missing helper, dead media session and missing signing key must be reported accurately.
+
+### Task 1: Embedded helper/recovery
+Files: `hush/prepare.py`, `HushIntegration.java`, `HushPolicy.java`, `start-hush.ps1`, helper tests.
+- [x] Pin/extract the eight helper classes and restrict command target/action.
+- [x] Implement persisted recovery, timeout/cooldown and pending sleep deadline.
+- [x] Compile helper/runtime and test source preparation/policy boundaries.
+
+### Task 2: Graphic EQ
+Files: `GraphicEq*.java`, `AudioEffectPlan.java`, `AudioDsp.java`, `Hooks.java`, EQ tests.
+- [x] Write failing interpolation/migration/cache tests, then implement the curve.
+- [x] Add the dark native chart, blue controls and remote/touch/accessibility interaction.
+- [x] Preserve limits, hardware clamping, effect caches and existing settings.
+
+### Task 3: Native settings
+Files: `spotifyplus-settings.js`, `NativeSettings.java`, `Hooks.java`, native settings browser test.
+- [x] Inspect the delivered TV settings DOM and keep original rows.
+- [x] Add scoped rows, fixed-action bridge, state synchronization and D-pad entry/return.
+- [x] Run browser/native-settings regressions in CI; live TV layout remains a device check.
+
+### Task 4: Rebuild and delivery
+Files: `rebuild_release.py`, build/install/sign scripts, manifest patch, CI, notices/docs.
+- [x] Add pinned-source upgrade and single APK merge with explicit unsigned output.
+- [x] Complete local rebuild, inspect final version/provider/classes/resources and pass all CI jobs.
+- [x] Publish source and verification; save the explicitly unsigned single APK for delivery.
diff --git a/docs/superpowers/specs/2026-10-27-hush-tv-design.md b/docs/superpowers/specs/2026-10-27-hush-tv-design.md
new file mode 100644
index 0000000..03e9255
--- /dev/null
+++ b/docs/superpowers/specs/2026-10-27-hush-tv-design.md
@@ -0,0 +1,11 @@
+# Spotify+ TV 1.3.0.1 design
+
+The user requests one installed Spotify app with Hush functionality embedded, a graphic EQ matching the supplied dark/blue reference, custom controls inside Spotify’s existing settings panel, and versionName 1.3.0.1.
+
+Embed only eight GPL helper classes from coldMEW/Hush 2.0.2 at 4e9ded397338de5c69b1784c636feb3d34a8de01. Start the shell-owned helper through authorized ADB, so it survives Spotify force-stop. Restrict its adapted command builder to the fixed Spotify TV restart. Persist recovery state before stopping; the new app process recovers its own media session with time bounds, cooldown and sleep protection. Keep local muting as fallback. No companion application, VPN, phone UI or account/entitlement changes.
+
+Place all entry controls in the observed native profile settings menu, preserving Spotify rows and its focus styling. Restrict the WebView bridge to fixed settings actions on allowed Spotify main pages. The shortcut opens native Settings. EQ/lyrics/timer are native subpanels reached from these rows.
+
+The EQ has ten visual curve points (31 Hz–16 kHz), log-frequency interpolation onto real output bands, ±6 dB range and 0–6 dB post-gain. Preserve five-band settings via migration. Provide remote, touch and accessibility adjustment.
+
+Rebuild the exact prior release, replace only extension classes/assets, add the embedded provider and merge the inspected splits into one unsigned APK. Retain versionCode 2340200 for the base client. The retained private signing key is unavailable; do not claim an installable same-key update or device verification without it.
diff --git a/example-original.lrc b/example-original.lrc
deleted file mode 100644
index 758c3b5..0000000
--- a/example-original.lrc
+++ /dev/null
@@ -1,4 +0,0 @@
-[offset:0]
-[00:00.00]The room is still
-[00:05.00]The night unfolds
-[00:10.00]A little light to lead us home
diff --git a/hush/prepare.py b/hush/prepare.py
new file mode 100644
index 0000000..d570624
--- /dev/null
+++ b/hush/prepare.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python3
+"""Extract the pinned Hush helper sources for embedding in Spotify's single APK."""
+from pathlib import Path
+import argparse
+import shutil
+import subprocess
+ROOT=Path(__file__).resolve().parent
+PIN='4e9ded397338de5c69b1784c636feb3d34a8de01'
+FILES=('Actions','Commands','Exec','Helper','HelperProtocol','HelperProvider','HushHelper','Providers')
+def prepare(destination):
+ upstream=ROOT/'upstream'
+ if subprocess.check_output(['git','-C',str(upstream),'rev-parse','HEAD'],text=True).strip()!=PIN:
+ raise ValueError('Hush gitlink differs from the pinned source')
+ subprocess.run(['git','-C',str(upstream),'diff','--exit-code','HEAD','--'],check=True,stdout=subprocess.DEVNULL)
+ if destination.exists():raise ValueError('Destination must be new')
+ target=destination/'dev/aurora/tvpatch/hush';target.mkdir(parents=True)
+ for name in FILES:
+ text=(upstream/f'android/app/src/main/java/io/coldmew/hush/helper/{name}.java').read_text()
+ text=text.replace('io.coldmew.hush.helper','dev.aurora.tvpatch.hush')
+ text=text.replace('com.spotify.music','com.spotify.tv.android')
+ if name=='HelperProtocol':
+ text=text.replace('VERSION = 3','VERSION = 4').replace('".helper"','".sptv_hush_helper"')
+ if name=='Commands':
+ start=text.index(' switch (action) {');end=text.index('\n private static String open(',start)
+ text=text[:start]+''' if (action != RESTART || !"com.spotify.tv.android/.SpotifyTVActivity".equals(a))
+ throw new IllegalArgumentException("Only the fixed Spotify TV restart action is supported");
+ return STOP + "; " + ALLOWLIST + "; " + open(a) + "; " + ALLOW;
+ }
+''' +text[end:]
+ (target/f'{name}.java').write_text('// Adapted from coldMEW/Hush 2.0.2. SPDX-License-Identifier: GPL-3.0-only\n'+text)
+ return destination
+if __name__=='__main__':
+ parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--output',type=Path,default=ROOT/'build/generated')
+ print(prepare(parser.parse_args().output))
diff --git a/hush/tests/test_prepare.py b/hush/tests/test_prepare.py
new file mode 100644
index 0000000..1411710
--- /dev/null
+++ b/hush/tests/test_prepare.py
@@ -0,0 +1,16 @@
+import importlib.util
+from pathlib import Path
+import tempfile
+import unittest
+ROOT=Path(__file__).resolve().parents[1]
+class HelperTest(unittest.TestCase):
+ def test_single_apk_helper_sources(self):
+ spec=importlib.util.spec_from_file_location('prepare',ROOT/'prepare.py'); m=importlib.util.module_from_spec(spec);spec.loader.exec_module(m)
+ with tempfile.TemporaryDirectory() as d:
+ m.prepare(Path(d)/'generated')
+ helper=Path(d)/'generated/dev/aurora/tvpatch/hush'
+ self.assertTrue((helper/'Helper.java').exists())
+ commands=(helper/'Commands.java').read_text()
+ self.assertIn('Only the fixed Spotify TV restart action is supported',commands)
+ self.assertIn('com.spotify.tv.android',commands)
+ self.assertFalse(list((Path(d)/'generated').rglob('AndroidManifest.xml')))
diff --git a/hush/upstream b/hush/upstream
new file mode 160000
index 0000000..4e9ded3
--- /dev/null
+++ b/hush/upstream
@@ -0,0 +1 @@
+Subproject commit 4e9ded397338de5c69b1784c636feb3d34a8de01
diff --git a/import_lyrics.py b/import_lyrics.py
deleted file mode 100644
index b53e962..0000000
--- a/import_lyrics.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Import your own/licensed UTF-8 LRC into the installed TV patch."""
-import argparse
-import pathlib
-import re
-import subprocess
-
-
-def main():
- parser = argparse.ArgumentParser(description=__doc__)
- parser.add_argument('file', type=pathlib.Path)
- parser.add_argument('--name', required=True, help='Exact .lrc filename displayed by Local synchronized lyrics')
- parser.add_argument('--adb', default='adb')
- parser.add_argument('--serial')
- args = parser.parse_args()
- if not re.fullmatch(r'(?:[A-Za-z0-9]{22}|track-[0-9a-f]{1,8})\.lrc', args.name):
- parser.error('Use the exact safe .lrc filename displayed in the lyrics overlay')
- data = args.file.read_bytes()
- data.decode('utf-8-sig')
- if len(data) > 524000:
- parser.error('LRC must be smaller than 524 KB')
- adb = [args.adb] + (['-s', args.serial] if args.serial else [])
- path = 'files/sptv-lyrics/' + args.name
- command = f'"umask 077; mkdir -p files/sptv-lyrics; cat > {path}.tmp && mv {path}.tmp {path}"'
- subprocess.run(adb + ['shell', 'run-as', 'com.spotify.tv.android', 'sh', '-c', command], input=data, check=True)
- print('Imported', args.name, '- open Lyrics · local / LRCLIB in Spotify TV +.')
-
-
-if __name__ == '__main__':
- main()
diff --git a/install.ps1 b/install.ps1
index 59245f3..648f798 100644
--- a/install.ps1
+++ b/install.ps1
@@ -16,3 +16,6 @@ if ($LASTEXITCODE -ne 0) { throw 'Installed, but audio-session discovery setup f
& $Adb -s $Serial shell am force-stop com.spotify.tv.android
& $Adb -s $Serial shell am start -W -n com.spotify.tv.android/.SpotifyTVActivity
if ($LASTEXITCODE -ne 0) { throw 'Installed, but launch failed.' }
+
+# The helper is embedded in Spotify's APK and runs as the authorized ADB shell user.
+& (Join-Path $PSScriptRoot 'start-hush.ps1') -Serial $Serial -Adb $Adb
diff --git a/installer/Install-Spotify.cmd b/installer/Install-Spotify.cmd
new file mode 100644
index 0000000..69144cf
--- /dev/null
+++ b/installer/Install-Spotify.cmd
@@ -0,0 +1,6 @@
+@echo off
+cd /d "%~dp0"
+powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Install-Spotify.ps1"
+echo.
+echo Keep any error above if the installation stopped.
+pause
diff --git a/installer/Install-Spotify.ps1 b/installer/Install-Spotify.ps1
new file mode 100644
index 0000000..624c1e1
--- /dev/null
+++ b/installer/Install-Spotify.ps1
@@ -0,0 +1,50 @@
+param([string]$Serial, [switch]$ValidateOnly)
+$ErrorActionPreference = 'Stop'
+$apk = Join-Path $PSScriptRoot 'SpotifyPlus-TV-1.3.0.9.apk'
+$expectedHash = 'a5c4c9c1a5b82cf235fe1963125dfc7ac9a6e3c7b08d216c90310e809bd08a91'
+$hasher = [Security.Cryptography.SHA256]::Create()
+try { $actualHash = [BitConverter]::ToString($hasher.ComputeHash([IO.File]::ReadAllBytes($apk))).Replace('-', '').ToLowerInvariant() } finally { $hasher.Dispose() }
+if ($actualHash -ne $expectedHash) { throw 'APK checksum mismatch. Extract the installer ZIP again.' }
+$output = $apk
+if ($ValidateOnly) { Write-Host "Verified installer payload: $apk"; exit 0 }
+$adb = $null
+$command = Get-Command adb -ErrorAction SilentlyContinue
+if ($command) { $adb = $command.Source }
+if (-not $adb -and $env:LOCALAPPDATA) {
+ $candidate = Join-Path $env:LOCALAPPDATA 'Android/Sdk/platform-tools/adb.exe'
+ if (Test-Path -LiteralPath $candidate) { $adb = $candidate }
+}
+if (-not $adb) {
+ $candidate = Join-Path $PSScriptRoot 'tools/platform-tools/adb.exe'
+ if (-not (Test-Path -LiteralPath $candidate)) {
+ Write-Host 'Downloading official Android platform-tools for the TV connection...'
+ $archive = Join-Path $PSScriptRoot 'tools/platform-tools.zip'
+ Invoke-WebRequest -UseBasicParsing -Uri 'https://dl.google.com/android/repository/platform-tools-latest-windows.zip' -OutFile $archive
+ Expand-Archive -LiteralPath $archive -DestinationPath (Join-Path $PSScriptRoot 'tools') -Force
+ }
+ $adb = $candidate
+}
+if (-not $Serial) {
+ $devices = @(& $adb devices | Where-Object { $_ -match '^\S+\s+device$' } | ForEach-Object { ($_ -split '\s+')[0] })
+ if ($devices.Count -eq 1) { $Serial = $devices[0] }
+ elseif ($devices.Count -gt 1) { $Serial = Read-Host 'More than one ADB device is connected. Enter the TV serial/IP' }
+ else {
+ $Serial = Read-Host 'Enter the TV IP address (enable network/USB debugging on the TV first)'
+ if ($Serial -notmatch '^(\d{1,3}\.){3}\d{1,3}(:\d{1,5})?$') { throw 'Enter an IPv4 address, optionally followed by :5555.' }
+ if ($Serial -notmatch ':') { $Serial += ':5555' }
+ & $adb connect $Serial
+ Write-Host 'Accept the debugging authorization on the TV if prompted.'
+ }
+}
+& $adb -s $Serial get-state
+if ($LASTEXITCODE -ne 0) { throw "TV connection is not authorized/ready. The signed APK is saved at $output. Nothing was uninstalled." }
+Write-Host 'Updating Spotify without uninstalling or clearing data...'
+& $adb -s $Serial install -r $output
+if ($LASTEXITCODE -ne 0) { throw 'Update failed. The existing app was not uninstalled or cleared. Keep the error shown above.' }
+& $adb -s $Serial shell pm grant com.spotify.tv.android android.permission.DUMP
+if ($LASTEXITCODE -ne 0) { Write-Warning 'Spotify installed, but EQ diagnostic permission needs setup.' }
+& $adb -s $Serial shell am start -W -n com.spotify.tv.android/.SpotifyTVActivity
+if ($LASTEXITCODE -ne 0) { throw 'Spotify installed, but could not launch. Open it on the TV manually.' }
+try { & (Join-Path $PSScriptRoot 'start-hush.ps1') -Serial $Serial -Adb $adb }
+catch { Write-Warning "Spotify installed; Hush helper setup is still pending: $($_.Exception.Message)" }
+Write-Host 'Spotify update installed. Open Spotify Settings to check the custom settings, EQ and Hush helper status.'
diff --git a/installer/README.txt b/installer/README.txt
new file mode 100644
index 0000000..7b06c55
--- /dev/null
+++ b/installer/README.txt
@@ -0,0 +1,22 @@
+SPOTIFY+ TV 1.3.0.9 - WINDOWS UPDATE INSTALLER - 27 OCTOBER 2026
+
+Extract the entire ZIP, then double-click Install-Spotify.cmd.
+Keep the PC and TV on the same network and enable TV debugging.
+Accept the TV authorization prompt if asked. Enter the TV IPv4 address when prompted.
+
+Includes the same-key signed APK and official Android platform-tools.
+No Java, signing key, administrator access or system installation is required.
+The installer checks the APK SHA256 before connecting. It updates using adb install -r,
+grants the audio diagnostic permission, launches Spotify and starts the embedded Hush helper.
+It never uninstalls Spotify or clears its data. A signature mismatch stops the update.
+
+Validation without connecting or installing:
+powershell -NoProfile -ExecutionPolicy Bypass -File .\Install-Spotify.ps1 -ValidateOnly
+
+Hush is opt-in. Run start-hush.ps1 again after a TV reboot.
+Target: the inspected Spotify TV 1.134.2 ARMv7 Android TV installation.
+Version name: 1.3.0.9; original Android versionCode retained for same-key updates.
+TV playback, D-pad, EQ sound and helper behavior require real-device testing.
+Source: https://github.com/AlphadogRSA/spotifyplus-tv-patch/tree/feat/hush-tv
+Original runtime: MIT; embedded Hush and patcher: GPL-3.0; Spotify remains proprietary.
+Official platform-tools notices are included under tools/platform-tools/NOTICE.txt.
diff --git a/installer/SpotifyTvSigner.java b/installer/SpotifyTvSigner.java
new file mode 100644
index 0000000..7580f85
--- /dev/null
+++ b/installer/SpotifyTvSigner.java
@@ -0,0 +1,58 @@
+import com.android.apksig.ApkSigner;
+import com.android.apksig.ApkVerifier;
+import java.io.File;
+import java.nio.file.Files;
+import java.security.KeyStore;
+import java.security.MessageDigest;
+import java.security.PrivateKey;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HexFormat;
+
+/** Sign only with a key matching the existing installation's public certificate. */
+public final class SpotifyTvSigner {
+ static String fingerprint(X509Certificate cert) throws Exception {
+ return HexFormat.of().formatHex(MessageDigest.getInstance("SHA-256").digest(cert.getEncoded()));
+ }
+ public static void main(String[] args) {
+ try { sign(args); }
+ catch (Exception error) { System.err.println("STOPPED: " + error.getMessage()); System.exit(2); }
+ }
+ static void sign(String[] args) throws Exception {
+ if (args.length != 4) throw new IllegalArgumentException("Expected INPUT_APK KEYSTORE OUTPUT_APK EXPECTED_CERT_SHA256");
+ File input=new File(args[0]), storeFile=new File(args[1]), output=new File(args[2]);
+ if (output.exists()) throw new IllegalArgumentException("Output already exists; move it first: " + output.getName());
+ String expected=args[3].toLowerCase();
+ if (!expected.matches("[a-f0-9]{64}")) throw new IllegalArgumentException("Invalid expected certificate fingerprint");
+ String configured=System.getenv("SPTV_STORE_PASSWORD");
+ char[] password=(configured==null ? "android" : configured).toCharArray();
+ String configuredKey=System.getenv("SPTV_KEY_PASSWORD");
+ char[] keyPassword=configuredKey==null ? password.clone() : configuredKey.toCharArray();
+ try {
+ KeyStore store=KeyStore.getInstance(storeFile,password);
+ String selected=null;
+ for (String alias:Collections.list(store.aliases())) {
+ if (store.isKeyEntry(alias) && store.getCertificate(alias) instanceof X509Certificate cert
+ && fingerprint(cert).equals(expected)) { selected=alias; break; }
+ }
+ if (selected==null) throw new IllegalArgumentException("This key does not match the Spotify app on your TV. No APK was signed or installed.");
+ if (!(store.getKey(selected,keyPassword) instanceof PrivateKey key)) throw new IllegalArgumentException("Matching entry has no accessible private key");
+ var certificates=new ArrayList();
+ for(var cert:store.getCertificateChain(selected)) certificates.add((X509Certificate)cert);
+ var signer=new ApkSigner.SignerConfig.Builder("SpotifyPlusTV",key,certificates).build();
+ new ApkSigner.Builder(Collections.singletonList(signer)).setInputApk(input).setOutputApk(output)
+ .setMinSdkVersion(26).setV1SigningEnabled(true).setV2SigningEnabled(true)
+ .setV3SigningEnabled(true).setV4SigningEnabled(false).build().sign();
+ var verification=new ApkVerifier.Builder(output).setMinCheckedPlatformVersion(26).build().verify();
+ if (!verification.isVerified() || verification.getSignerCertificates().size()!=1
+ || !fingerprint(verification.getSignerCertificates().get(0)).equals(expected)) {
+ Files.deleteIfExists(output.toPath());
+ throw new IllegalStateException("Signature verification failed; invalid output removed");
+ }
+ System.out.println("SIGNED_AND_VERIFIED: " + output.getAbsolutePath());
+ System.out.println("Certificate matches the previous Spotify TV installation.");
+ } finally { Arrays.fill(password,'\0'); Arrays.fill(keyPassword,'\0'); }
+ }
+}
diff --git a/rebuild_release.py b/rebuild_release.py
new file mode 100644
index 0000000..1a12b15
--- /dev/null
+++ b/rebuild_release.py
@@ -0,0 +1,92 @@
+"""Rebuild the exact previous TV release as one unsigned 1.3.0.9 APK.
+
+Requires compiled extension DEX and the checksum-pinned APK tooling. No signing keys are read.
+"""
+import argparse
+import hashlib
+from pathlib import Path
+import re
+import shutil
+import subprocess
+import xml.etree.ElementTree as ET
+import zipfile
+
+ROOT=Path(__file__).resolve().parent
+INPUT_SHA='fd14f65b1a282621c2f4873d3323370046527dbf2c22384ba14514203ea7d17d'
+TOOL_SHA={
+ 'apktool':'dbf930b076c6b9be08d57c449cacefc3bdd6b71ebd59b3066fc0e1f5b14f9423',
+ 'apkeditor':'a9cd40df818845456be6d696de6110c89edf4b0a0580cb83438ed6b25a366e67',
+}
+VERSION='1.3.0.9'
+def verified(path,sha):
+ if hashlib.sha256(path.read_bytes()).hexdigest()!=sha:raise ValueError(f'Checksum mismatch: {path.name}')
+def run(*args):subprocess.run(list(map(str,args)),check=True)
+def rebuild(source,dex,apktool,apkeditor,output):
+ verified(source,INPUT_SHA);verified(apktool,TOOL_SHA['apktool']);verified(apkeditor,TOOL_SHA['apkeditor'])
+ if output.exists():raise ValueError('Output directory must be new')
+ if not dex.is_file():raise ValueError('Compiled extension DEX is required')
+ output.mkdir(parents=True);parts=output/'splits';parts.mkdir()
+ names=['base.apk','split_config.armeabi_v7a.apk','split_config.en.apk','split_config.tvdpi.apk']
+ with zipfile.ZipFile(source) as archive:
+ for name in names:(parts/name).write_bytes(archive.read(name))
+ decoded=output/'decoded'
+ run('java','-jar',apktool,'d',parts/'base.apk','-o',decoded)
+ removed=0
+ for smali in decoded.glob('smali*'):
+ old=smali/'dev/aurora/tvpatch'
+ if old.exists():shutil.rmtree(old);removed+=1
+ if not removed:raise ValueError('Expected the previous TV extension; refusing to patch an unknown client')
+ # Register the bridge before Spotify's first loadUrl, not at page completion.
+ hooks=0
+ for smali in decoded.glob('smali*/com/spotify/tv/**/*.smali'):
+ text=smali.read_text()
+ pattern=r'(?m)^( invoke-virtual(?:/range)? \{([^}]+)\}, Landroid/webkit/WebView;->loadUrl\([^\n]+)$'
+ def inject(match):
+ receiver=match.group(2).split(',')[0].split(' .. ')[0].strip()
+ return f' invoke-static/range {{{receiver} .. {receiver}}}, Ldev/aurora/tvpatch/Hooks;->beforeLoad(Landroid/webkit/WebView;)V\n\n'+match.group(1)
+ text,count=re.subn(pattern,inject,text);hooks+=count
+ if count:smali.write_text(text)
+ if hooks!=2:raise ValueError(f'Expected two verified TV WebView loads, got {hooks}')
+ print(f'Pre-navigation bridge hooks: {hooks}')
+ manifest=decoded/'AndroidManifest.xml';tree=ET.parse(manifest);root=tree.getroot()
+ ns='http://schemas.android.com/apk/res/android';ET.register_namespace('android',ns)
+ attr=lambda k:'{'+ns+'}'+k
+ app=root.find('application')
+ if root.get('package')!='com.spotify.tv.android':raise ValueError('Unexpected Android package')
+ if any('sptv_hush_helper' in x.get(attr('authorities'),'') for x in app.findall('provider')):
+ raise ValueError('This input already includes the integrated helper')
+ ET.SubElement(app,'provider',{attr('name'):'dev.aurora.tvpatch.hush.HelperProvider',
+ attr('authorities'):'com.spotify.tv.android.sptv_hush_helper',attr('exported'):'true',
+ attr('permission'):'android.permission.INTERACT_ACROSS_USERS_FULL'})
+ tree.write(manifest,encoding='utf-8',xml_declaration=True)
+ metadata=decoded/'apktool.yml';text=metadata.read_text()
+ text,count=re.subn(r'(?m)^ versionName: 1\.134\.2$',f' versionName: {VERSION}',text)
+ if count!=1:raise ValueError('Unexpected source version')
+ metadata.write_text(text)
+ for path in (ROOT/'assets').iterdir():
+ if path.is_file():shutil.copyfile(path,decoded/'assets'/path.name)
+ unsigned_base=output/'rebuilt-base.apk'
+ run('java','-jar',apktool,'b',decoded,'-o',unsigned_base)
+ # Hook calls in the original app remain; the previous runtime definitions were removed above.
+ # Append exactly one new DEX without copying any stale compiled extension classes.
+ with zipfile.ZipFile(unsigned_base) as archive:
+ files=[(info,archive.read(info.filename)) for info in archive.infolist()]
+ used=set(archive.namelist())
+ number=2
+ while f'classes{number}.dex' in used:number+=1
+ with zipfile.ZipFile(parts/'base.apk','w') as archive:
+ for info,data in files:
+ if not info.filename.upper().startswith('META-INF/'):
+ archive.writestr(info,data)
+ archive.writestr(f'classes{number}.dex',dex.read_bytes(),compress_type=zipfile.ZIP_DEFLATED)
+ final=output/f'SpotifyPlus-TV-{VERSION}-unsigned.apk'
+ run('java','-jar',apkeditor,'m','-i',parts,'-o',final,'-validate-modules')
+ (output/'SHA256.txt').write_text(hashlib.sha256(final.read_bytes()).hexdigest()+' '+final.name+'\n')
+ print(f'Unsigned single-app APK: {final}')
+ return final
+if __name__=='__main__':
+ p=argparse.ArgumentParser(description=__doc__)
+ p.add_argument('--input',type=Path,required=True);p.add_argument('--dex',type=Path,required=True)
+ p.add_argument('--apktool',type=Path,required=True);p.add_argument('--apkeditor',type=Path,required=True)
+ p.add_argument('--output',type=Path,required=True)
+ a=p.parse_args();rebuild(a.input,a.dex,a.apktool,a.apkeditor,a.output)
diff --git a/revanced/build.gradle.kts b/revanced/build.gradle.kts
index d1e4578..dd407d5 100644
--- a/revanced/build.gradle.kts
+++ b/revanced/build.gradle.kts
@@ -1,7 +1,7 @@
plugins { kotlin("jvm") version "2.3.10" }
group = "dev.aurora.tvpatch"
-version = "0.5.0"
+version = "1.3.0.9"
kotlin {
jvmToolchain(17)
// The pinned official Patcher is built with experimental context/backing-field metadata.
@@ -28,7 +28,7 @@ tasks.processResources {
}
val bundle by tasks.registering(Jar::class) {
dependsOn(tasks.classes)
- archiveFileName.set("spotifyplus-tv-0.5.rvp")
+ archiveFileName.set("spotifyplus-tv-1.3.0.9.rvp")
from(sourceSets.main.get().output)
doFirst { require(extensionDex.isPresent && file(extensionDex.get()).isFile) { "Pass -PextensionDex=/absolute/path/to/classes.dex from the compiled MIT runtime extension" } }
manifest { attributes("Main-Class" to "dev.aurora.patches.RunnerKt") }
diff --git a/revanced/src/main/kotlin/dev/aurora/patches/TvPatches.kt b/revanced/src/main/kotlin/dev/aurora/patches/TvPatches.kt
index d7a941a..a6fa5ba 100644
--- a/revanced/src/main/kotlin/dev/aurora/patches/TvPatches.kt
+++ b/revanced/src/main/kotlin/dev/aurora/patches/TvPatches.kt
@@ -6,6 +6,8 @@ import app.revanced.patcher.extensions.*
import app.revanced.patcher.patch.*
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
+import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
+import com.android.tools.smali.dexlib2.iface.instruction.RegisterRangeInstruction
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.reference.StringReference
@@ -15,13 +17,20 @@ import org.w3c.dom.Element
private const val PACKAGE = "com.spotify.tv.android"
private const val VERSION = "1.134.2"
-val tvManifestPatch = resourcePatch(name = "TV app label and local lyric import", use = false) {
+val tvManifestPatch = resourcePatch(name = "TV app label and helper diagnostics", use = false) {
compatibleWith(PACKAGE(VERSION))
apply {
document("AndroidManifest.xml").use { doc ->
val app = doc.getElementsByTagName("application").item(0) as Element
val android = "http://schemas.android.com/apk/res/android"
app.setAttributeNS(android, "android:label", "Spotify+ TV")
+ doc.documentElement.setAttributeNS(android, "android:versionName", "1.3.0.1")
+ val provider = doc.createElement("provider")
+ provider.setAttributeNS(android, "android:name", "dev.aurora.tvpatch.hush.HelperProvider")
+ provider.setAttributeNS(android, "android:authorities", "com.spotify.tv.android.sptv_hush_helper")
+ provider.setAttributeNS(android, "android:exported", "true")
+ provider.setAttributeNS(android, "android:permission", "android.permission.INTERACT_ACROSS_USERS_FULL")
+ app.appendChild(provider)
app.setAttributeNS(android, "android:debuggable", "true")
val activities = doc.getElementsByTagName("activity")
for (i in 0 until activities.length) {
@@ -45,7 +54,7 @@ val tvManifestPatch = resourcePatch(name = "TV app label and local lyric import"
val tvAssetsPatch = rawResourcePatch(name = "TV theme assets and notices", use = false) {
compatibleWith(PACKAGE(VERSION))
apply {
- for (name in listOf("spotifyplus-tv.js", "TV-PATCH-LICENSE.txt", "SPOTIFYPLUS-LICENSE.txt", "INSPIRATION.md")) {
+ for (name in listOf("spotifyplus-tv.js", "TV-PATCH-LICENSE.txt", "SPOTIFYPLUS-LICENSE.txt", "INSPIRATION.md", "spotifyplus-settings.js", "HUSH-NOTICE.txt", "HUSH-COPYING.txt")) {
val target = get("assets/$name", false)
target.parentFile.mkdirs()
requireNotNull(object {}.javaClass.classLoader.getResourceAsStream(name)) { "Missing bundled asset $name" }.use { input ->
@@ -109,10 +118,37 @@ val tvRemotePatch = bytecodePatch(name = "TV remote settings menu", use = false)
val tvWebViewPatch = bytecodePatch(name = "TV WebView theme hook", use = false) {
compatibleWith(PACKAGE(VERSION))
dependsOn(tvLifecyclePatch, tvAssetsPatch)
- apply { resolve(Fingerprints.page).addInstruction(0, "invoke-static/range {p1 .. p1}, $HOOK->page(Landroid/webkit/WebView;)V") }
+ apply {
+ resolve(Fingerprints.page).addInstruction(0, "invoke-static/range {p1 .. p1}, $HOOK->page(Landroid/webkit/WebView;)V")
+ var count = 0
+ for (definition in classDefs.filter { it.type.startsWith("Lcom/spotify/tv/") }) {
+ val candidates = definition.methods.filter { method ->
+ method.implementation?.instructions?.any {
+ val ref = (it as? ReferenceInstruction)?.reference as? MethodReference
+ ref?.definingClass == "Landroid/webkit/WebView;" && ref.name == "loadUrl"
+ } == true
+ }
+ if (candidates.isEmpty()) continue
+ val mutable = classDefs.getOrReplaceMutable(definition)
+ for (original in candidates) {
+ val method = mutable.methods.single { it.name == original.name && it.parameterTypes == original.parameterTypes && it.returnType == original.returnType }
+ val calls = method.implementation!!.instructions.withIndex().filter {
+ val ref = (it.value as? ReferenceInstruction)?.reference as? MethodReference
+ ref?.definingClass == "Landroid/webkit/WebView;" && ref.name == "loadUrl"
+ }
+ for (call in calls.asReversed()) {
+ val register = (call.value as? FiveRegisterInstruction)?.registerC
+ ?: (call.value as RegisterRangeInstruction).startRegister
+ method.addInstruction(call.index, "invoke-static/range {v$register .. v$register}, $HOOK->beforeLoad(Landroid/webkit/WebView;)V")
+ count++
+ }
+ }
+ }
+ require(count == 2) { "Expected two verified pre-navigation WebView loads, found $count" }
+ }
}
-val tvSessionPatch = bytecodePatch(name = "TV own-session lyrics and timer", use = false) {
+val tvSessionPatch = bytecodePatch(name = "TV own-session audio and timer", use = false) {
compatibleWith(PACKAGE(VERSION))
dependsOn(runtimePatch)
apply {
@@ -145,8 +181,8 @@ val tvAdMutePatch = bytecodePatch(name = "TV detected-ad muting", use = false) {
}
val spotifyPlusTvPatch = bytecodePatch(
- name = "SpotifyPlus TV interface and lyrics",
- description = "TV remote menu, themes, local/LRCLIB lyrics and own-session sleep timer. No account entitlement changes.",
+ name = "SpotifyPlus TV interface",
+ description = "TV remote menu, themes, graphic EQ and own-session sleep timer. No account entitlement changes.",
) {
compatibleWith(PACKAGE(VERSION))
dependsOn(tvRemotePatch, tvWebViewPatch, tvSessionPatch, tvAdMutePatch)
diff --git a/sign-apk.ps1 b/sign-apk.ps1
new file mode 100644
index 0000000..fc6736e
--- /dev/null
+++ b/sign-apk.ps1
@@ -0,0 +1,25 @@
+param(
+ [Parameter(Mandatory)][string]$UnsignedApk,
+ [Parameter(Mandatory)][string]$AndroidSdk,
+ [Parameter(Mandatory)][string]$KeyStore,
+ [Parameter(Mandatory)][string]$OutputApk,
+ [string]$KeyAlias = 'androiddebugkey'
+)
+$ErrorActionPreference = 'Stop'
+if (-not $env:SPTV_STORE_PASSWORD) { throw 'Set SPTV_STORE_PASSWORD for your retained TV signing key.' }
+if (Test-Path -LiteralPath $OutputApk) { throw 'OutputApk must be new.' }
+$inputApk = (Resolve-Path -LiteralPath $UnsignedApk).Path
+$key = (Resolve-Path -LiteralPath $KeyStore).Path
+$tools = Join-Path (Resolve-Path -LiteralPath $AndroidSdk).Path 'build-tools/35.0.0'
+$aligned = [IO.Path]::Combine([IO.Path]::GetTempPath(), [IO.Path]::GetRandomFileName() + '.apk')
+try {
+ & (Join-Path $tools 'zipalign.exe') -P 16 -f 4 $inputApk $aligned
+ if ($LASTEXITCODE -ne 0) { throw 'APK alignment failed.' }
+ $signArgs = @('sign','--ks',$key,'--ks-key-alias',$KeyAlias,'--ks-pass','env:SPTV_STORE_PASSWORD','--out',$OutputApk)
+ if ($env:SPTV_KEY_PASSWORD) { $signArgs += @('--key-pass','env:SPTV_KEY_PASSWORD') }
+ $signArgs += $aligned
+ & (Join-Path $tools 'apksigner.bat') @signArgs
+ if ($LASTEXITCODE -ne 0) { throw 'APK signing failed.' }
+ & (Join-Path $tools 'apksigner.bat') verify --min-sdk-version 26 $OutputApk
+ if ($LASTEXITCODE -ne 0) { throw 'APK signature verification failed.' }
+} finally { Remove-Item -LiteralPath $aligned -ErrorAction SilentlyContinue }
diff --git a/src/dev/aurora/tvpatch/AudioDsp.java b/src/dev/aurora/tvpatch/AudioDsp.java
index 3295214..8a77014 100644
--- a/src/dev/aurora/tvpatch/AudioDsp.java
+++ b/src/dev/aurora/tvpatch/AudioDsp.java
@@ -103,11 +103,11 @@ private static Set ownSessions() throws Exception {
private static final class Settings {
final boolean enabled;
final int boost;
- final int[] gains = new int[5];
+ final int[] gains;
Settings(SharedPreferences prefs) {
enabled = prefs.getBoolean("dspEnabled", false);
boost = Math.max(0, Math.min(600, prefs.getInt("boostMb", 0)));
- for (int i = 0; i < gains.length; i++) gains[i] = Math.max(-6, Math.min(6, prefs.getInt("eq" + i, 0)));
+ gains = GraphicEqSettings.read(prefs);
}
}
private static final class Effects implements AudioEffectPlan.Target {
@@ -129,7 +129,7 @@ private static final class Effects implements AudioEffectPlan.Target {
}
void apply(int[] gains, int boost) {
if (controlChanged.getAndSet(false)) plan.invalidate();
- plan.apply(gains, boost, this);
+ plan.applyGraphic(gains, boost, this);
}
public void band(short band, short level) { eq.setBandLevel(band, level); }
public void equalizerEnabled(boolean enabled) { eq.setEnabled(enabled); }
diff --git a/src/dev/aurora/tvpatch/AudioEffectPlan.java b/src/dev/aurora/tvpatch/AudioEffectPlan.java
index 9a92fec..0eb9316 100644
--- a/src/dev/aurora/tvpatch/AudioEffectPlan.java
+++ b/src/dev/aurora/tvpatch/AudioEffectPlan.java
@@ -13,12 +13,14 @@ public interface Target {
private static final int[] FREQUENCIES = {60, 230, 910, 3600, 14000};
private final short min, max;
private final int[] targets;
+ private final int[] centers;
private short[] appliedLevels;
private int[] appliedGains;
private int appliedBoost;
public AudioEffectPlan(short min, short max, int[] centerMilliHz) {
if (min > max || centerMilliHz.length == 0) throw new IllegalArgumentException("Invalid EQ layout");
this.min = min; this.max = max; targets = new int[centerMilliHz.length];
+ centers = centerMilliHz.clone();
for (int band = 0; band < centerMilliHz.length; band++) {
double hz = Math.max(1, centerMilliHz[band] / 1000.0), best = Double.MAX_VALUE;
for (int i = 0; i < FREQUENCIES.length; i++) {
@@ -29,10 +31,20 @@ public AudioEffectPlan(short min, short max, int[] centerMilliHz) {
}
public void apply(int[] gainsDb, int boostMb, Target target) {
if (gainsDb.length != FREQUENCIES.length) throw new IllegalArgumentException("Five controls required");
+ applySettings(gainsDb, boostMb, target, false);
+ }
+ public void applyGraphic(int[] gainsMb, int boostMb, Target target) {
+ if (gainsMb.length != GraphicEq.BANDS) throw new IllegalArgumentException("Ten EQ curve points required");
+ applySettings(gainsMb, boostMb, target, true);
+ }
+ private void applySettings(int[] gains, int boostMb, Target target, boolean graphic) {
boostMb = Math.max(0, Math.min(600, boostMb));
- if (appliedLevels != null && Arrays.equals(gainsDb, appliedGains) && boostMb == appliedBoost) return;
+ if (appliedLevels != null && Arrays.equals(gains, appliedGains) && boostMb == appliedBoost) return;
short[] levels = new short[targets.length];
- for (int band = 0; band < targets.length; band++) levels[band] = (short)Math.max(min, Math.min(max, gainsDb[targets[band]] * 100));
+ for (int band = 0; band < targets.length; band++) {
+ int value = graphic ? GraphicEq.levelAt(gains, Math.max(1, centers[band] / 1000.0)) : gains[targets[band]] * 100;
+ levels[band] = (short)Math.max(min, Math.min(max, value));
+ }
boolean initial = appliedLevels == null;
try {
for (short band = 0; band < targets.length; band++) if (initial || levels[band] != appliedLevels[band]) target.band(band, levels[band]);
@@ -40,7 +52,7 @@ public void apply(int[] gainsDb, int boostMb, Target target) {
if (initial || boostMb != appliedBoost) target.boost(boostMb);
if (initial || (boostMb > 0) != (appliedBoost > 0)) target.boostEnabled(boostMb > 0);
} catch (RuntimeException failure) { invalidate(); throw failure; }
- appliedLevels = levels; appliedGains = gainsDb.clone(); appliedBoost = boostMb;
+ appliedLevels = levels; appliedGains = gains.clone(); appliedBoost = boostMb;
}
public void invalidate() { appliedLevels = null; appliedGains = null; }
}
diff --git a/src/dev/aurora/tvpatch/GraphicEq.java b/src/dev/aurora/tvpatch/GraphicEq.java
new file mode 100644
index 0000000..9ed9541
--- /dev/null
+++ b/src/dev/aurora/tvpatch/GraphicEq.java
@@ -0,0 +1,31 @@
+package dev.aurora.tvpatch;
+
+/** A ten-point target curve in millibels; sampled logarithmically at real hardware bands. */
+public final class GraphicEq {
+ public static final int BANDS = 10, LIMIT = 600, STEP = 50;
+ private static final int[] HZ = {31, 62, 125, 250, 500, 1000, 2000, 4000, 8000, 16000};
+ private static final int[] LEGACY_HZ = {60, 230, 910, 3600, 14000};
+ private GraphicEq() {}
+ public static int frequency(int index) { return HZ[index]; }
+ public static int adjust(int value, int direction) { return clamp(value + direction * STEP); }
+ public static int clamp(int value) { return Math.max(-LIMIT, Math.min(LIMIT, value)); }
+ public static int levelAt(int[] gains, double hz) {
+ if (gains.length != BANDS) throw new IllegalArgumentException("Ten EQ curve points required");
+ return interpolate(HZ, gains, hz);
+ }
+ public static int[] fromLegacy(int[] gainsDb) {
+ if (gainsDb.length != LEGACY_HZ.length) throw new IllegalArgumentException("Five legacy controls required");
+ int[] mb = new int[gainsDb.length], result = new int[BANDS];
+ for (int i = 0; i < mb.length; i++) mb[i] = clamp(gainsDb[i] * 100);
+ for (int i = 0; i < result.length; i++) result[i] = interpolate(LEGACY_HZ, mb, HZ[i]);
+ return result;
+ }
+ private static int interpolate(int[] hz, int[] gains, double value) {
+ if (value <= hz[0]) return clamp(gains[0]);
+ for (int i = 1; i < hz.length; i++) if (value < hz[i]) {
+ double t = Math.log(value / hz[i-1]) / Math.log((double)hz[i] / hz[i-1]);
+ return clamp((int)Math.round(gains[i-1] * (1-t) + gains[i] * t));
+ }
+ return clamp(gains[gains.length-1]);
+ }
+}
diff --git a/src/dev/aurora/tvpatch/GraphicEqSettings.java b/src/dev/aurora/tvpatch/GraphicEqSettings.java
new file mode 100644
index 0000000..97f4ffa
--- /dev/null
+++ b/src/dev/aurora/tvpatch/GraphicEqSettings.java
@@ -0,0 +1,20 @@
+package dev.aurora.tvpatch;
+
+import android.content.SharedPreferences;
+
+/** Persist the new curve once, leaving previous five-band values available for older builds. */
+public final class GraphicEqSettings {
+ private GraphicEqSettings() {}
+ public static int[] read(SharedPreferences prefs) {
+ int[] values = new int[GraphicEq.BANDS];
+ if (!prefs.getBoolean("graphicEqMigrated", false)) {
+ int[] old = new int[5];
+ for (int i = 0; i < old.length; i++) old[i] = prefs.getInt("eq" + i, 0);
+ values = GraphicEq.fromLegacy(old);
+ SharedPreferences.Editor edit = prefs.edit().putBoolean("graphicEqMigrated", true);
+ for (int i = 0; i < values.length; i++) edit.putInt("graphicEq" + i, values[i]);
+ edit.apply();
+ } else for (int i = 0; i < values.length; i++) values[i] = GraphicEq.clamp(prefs.getInt("graphicEq" + i, 0));
+ return values;
+ }
+}
diff --git a/src/dev/aurora/tvpatch/GraphicEqView.java b/src/dev/aurora/tvpatch/GraphicEqView.java
new file mode 100644
index 0000000..60a5aa9
--- /dev/null
+++ b/src/dev/aurora/tvpatch/GraphicEqView.java
@@ -0,0 +1,165 @@
+package dev.aurora.tvpatch;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.DashPathEffect;
+import android.graphics.LinearGradient;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.RectF;
+import android.graphics.Shader;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.accessibility.AccessibilityNodeInfo;
+import java.util.Locale;
+
+/** Native graphic control: TV remote, touch, and accessibility all change the same stored curve. */
+public final class GraphicEqView extends View {
+ private static final int BLUE = 0xff659efa, MUTED = 0xffaebac4;
+ private final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ private final SharedPreferences prefs;
+ private final float density;
+ private int[] gains;
+ private int selected;
+ private boolean enabled;
+ private float left, right, top, bottom, gainY;
+
+ public GraphicEqView(Context c, SharedPreferences prefs) {
+ super(c); this.prefs = prefs; density = getResources().getDisplayMetrics().density;
+ gains = GraphicEqSettings.read(prefs); enabled = prefs.getBoolean("dspEnabled", false);
+ setFocusable(true); setFocusableInTouchMode(true); setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
+ describe();
+ }
+ private float dp(float value) { return value * density; }
+ public void enabled(boolean value) { enabled = value; invalidate(); describe(); }
+ public void reset() {
+ gains = new int[GraphicEq.BANDS];
+ SharedPreferences.Editor edit = prefs.edit().putInt("boostMb", 0).putBoolean("graphicEqMigrated", true);
+ for (int i = 0; i < gains.length; i++) edit.putInt("graphicEq" + i, 0);
+ for (int i = 0; i < 5; i++) edit.putInt("eq" + i, 0);
+ edit.apply(); AudioDsp.refresh(); invalidate(); describe();
+ }
+ private float x(int band) { return left + (right-left) * band / (GraphicEq.BANDS-1); }
+ private float y(int gain) { return top + (bottom-top) * (GraphicEq.LIMIT-gain) / (GraphicEq.LIMIT*2f); }
+ private void color(int color, float stroke) {
+ paint.setShader(null); paint.setPathEffect(null); paint.setStyle(Paint.Style.FILL);
+ paint.setColor(color); paint.setStrokeWidth(dp(stroke));
+ }
+ private void label(Canvas c, String text, float x, float y, int color, float size, Paint.Align align) {
+ color(color, 1); paint.setTextSize(dp(size)); paint.setTextAlign(align); c.drawText(text, x, y, paint);
+ }
+ @Override protected void onDraw(Canvas c) {
+ super.onDraw(c);
+ float w = getWidth(), h = getHeight();
+ left = dp(54); right = w-dp(32); top = dp(42); bottom = Math.max(top+dp(70), h-dp(115)); gainY = h-dp(29);
+ color(0xff252f36, 1); c.drawRoundRect(new RectF(0,0,w,h), dp(24), dp(24), paint);
+ for (int value = -600; value <= 600; value += 300) {
+ color(0xff3a4650, 1); paint.setPathEffect(new DashPathEffect(new float[]{dp(4),dp(5)},0));
+ c.drawLine(left, y(value), right, y(value), paint);
+ label(c, Integer.toString(value/100), left-dp(15), y(value)+dp(4), MUTED, 12, Paint.Align.RIGHT);
+ }
+ for (int i = 0; i < gains.length; i++) {
+ color(0xff4b5660, 4); paint.setStrokeCap(Paint.Cap.ROUND); c.drawLine(x(i), top, x(i), bottom, paint);
+ }
+ Path curve = new Path(); curve.moveTo(left, y(gains[0]));
+ for (int i=1;i=1000?(hz/1000)+"K":Integer.toString(hz),x(i),bottom+dp(25),MUTED,13,Paint.Align.CENTER);
+ }
+ label(c,"Post-gain",left,bottom+dp(65),Color.WHITE,16,Paint.Align.LEFT);
+ int boost=Math.max(0,Math.min(600,prefs.getInt("boostMb",0)));
+ label(c,String.format(Locale.ROOT,"+%.1f dB",boost/100f),right,bottom+dp(65),MUTED,14,Paint.Align.RIGHT);
+ color(0xff4b5660,4); c.drawLine(left,gainY,right,gainY,paint);
+ float thumb=left+(right-left)*boost/600f;
+ color(enabled?BLUE:0xff778591,4); c.drawLine(left,gainY,thumb,gainY,paint); c.drawCircle(thumb,gainY,dp(9),paint);
+ if (hasFocus() && selected==GraphicEq.BANDS) {
+ color(Color.WHITE,2); paint.setStyle(Paint.Style.STROKE); c.drawCircle(thumb,gainY,dp(14),paint);
+ }
+ }
+ private void adjust(int direction) {
+ if (selected==GraphicEq.BANDS) {
+ int value=Math.max(0,Math.min(600,prefs.getInt("boostMb",0)+direction*50));
+ prefs.edit().putInt("boostMb",value).apply();
+ } else {
+ gains[selected]=GraphicEq.adjust(gains[selected],direction);
+ prefs.edit().putInt("graphicEq"+selected,gains[selected]).apply();
+ }
+ AudioDsp.refresh(); invalidate(); describe();
+ }
+ @Override public boolean onKeyDown(int key, KeyEvent event) {
+ if (key==KeyEvent.KEYCODE_DPAD_LEFT || key==KeyEvent.KEYCODE_DPAD_RIGHT) {
+ selected=Math.max(0,Math.min(GraphicEq.BANDS,selected+(key==KeyEvent.KEYCODE_DPAD_RIGHT?1:-1)));
+ invalidate(); describe(); return true;
+ }
+ if (key==KeyEvent.KEYCODE_DPAD_UP || key==KeyEvent.KEYCODE_DPAD_DOWN) {
+ adjust(key==KeyEvent.KEYCODE_DPAD_UP?1:-1); return true;
+ }
+ if (key==KeyEvent.KEYCODE_DPAD_CENTER || key==KeyEvent.KEYCODE_ENTER) {
+ if (selected==GraphicEq.BANDS) {
+ View toolbar=focusSearch(View.FOCUS_UP);
+ if (toolbar!=null && toolbar!=this) toolbar.requestFocus();
+ } else selected=GraphicEq.BANDS;
+ invalidate(); describe(); return true;
+ }
+ return super.onKeyDown(key,event);
+ }
+ @Override public boolean onKeyUp(int key, KeyEvent event) {
+ if (key==KeyEvent.KEYCODE_DPAD_LEFT || key==KeyEvent.KEYCODE_DPAD_RIGHT || key==KeyEvent.KEYCODE_DPAD_UP
+ || key==KeyEvent.KEYCODE_DPAD_DOWN || key==KeyEvent.KEYCODE_DPAD_CENTER || key==KeyEvent.KEYCODE_ENTER) return true;
+ return super.onKeyUp(key,event);
+ }
+ @Override public boolean onTouchEvent(MotionEvent event) {
+ if (right<=left) return true;
+ int action=event.getActionMasked();
+ if (action==MotionEvent.ACTION_DOWN || action==MotionEvent.ACTION_MOVE) {
+ requestFocus();
+ if (event.getY()>bottom+dp(35)) {
+ selected=GraphicEq.BANDS;
+ int value=Math.round((event.getX()-left)/(right-left)*12)*50;
+ prefs.edit().putInt("boostMb",Math.max(0,Math.min(600,value))).apply();
+ } else {
+ selected=Math.max(0,Math.min(GraphicEq.BANDS-1,Math.round((event.getX()-left)/(right-left)*(GraphicEq.BANDS-1))));
+ gains[selected]=GraphicEq.clamp(Math.round((1-(event.getY()-top)/(bottom-top))*24-12)*50);
+ prefs.edit().putInt("graphicEq"+selected,gains[selected]).apply();
+ }
+ AudioDsp.refresh(); invalidate(); describe(); return true;
+ }
+ if(action==MotionEvent.ACTION_UP) { performClick(); return true; }
+ return action==MotionEvent.ACTION_CANCEL || super.onTouchEvent(event);
+ }
+ @Override public boolean performClick() { super.performClick(); return true; }
+ private void describe() {
+ String selectedText=selected==GraphicEq.BANDS?"Post-gain "+prefs.getInt("boostMb",0)/100f+" dB"
+ :GraphicEq.frequency(selected)+" hertz "+gains[selected]/100f+" dB";
+ setContentDescription(selectedText+". Left and right select. Up and down adjust. OK switches to post-gain, then toolbar. EQ "+(enabled?"on":"off"));
+ }
+ @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info); info.setClassName("android.widget.SeekBar");
+ info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD);
+ info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_BACKWARD);
+ }
+ @Override public boolean performAccessibilityAction(int action, android.os.Bundle args) {
+ if(action==AccessibilityNodeInfo.ACTION_SCROLL_FORWARD || action==AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD) {
+ adjust(action==AccessibilityNodeInfo.ACTION_SCROLL_FORWARD?1:-1); return true;
+ }
+ return super.performAccessibilityAction(action,args);
+ }
+}
diff --git a/src/dev/aurora/tvpatch/Hooks.java b/src/dev/aurora/tvpatch/Hooks.java
index 13caaa3..f931846 100644
--- a/src/dev/aurora/tvpatch/Hooks.java
+++ b/src/dev/aurora/tvpatch/Hooks.java
@@ -7,7 +7,6 @@
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.GradientDrawable;
-import android.media.MediaMetadata;
import android.media.session.MediaController;
import android.media.session.MediaSession;
import android.media.session.PlaybackState;
@@ -27,18 +26,12 @@
import android.util.Log;
import org.json.JSONObject;
import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import java.util.LinkedHashMap;
import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
/** Version-specific, local UI extension. Spotify remains the player and login provider. */
public final class Hooks {
@@ -48,27 +41,16 @@ public final class Hooks {
private static MediaSession.Token token;
private static MediaController controller;
private static volatile PlaybackState cachedPlayback;
- private static volatile MediaMetadata cachedMetadata;
private static MediaController.Callback controllerCallback;
private static final List dialogs = new ArrayList<>();
private static final Map dialogUpdates = new LinkedHashMap<>();
- private static final Pattern TRACK_ID = Pattern.compile("([A-Za-z0-9]{22})(?:$|[?/#])");
- private static AlertDialog menu, lyricDialog;
- private static TextView lyricTitle, lyricStatus;
- private static final TextView[] lyricRows = new TextView[3];
- private static String loadedFile = "";
- private static long loadedModified;
- private static List lines = new ArrayList<>();
- private static final Map fetched = new LinkedHashMap<>();
- private static final ExecutorService NETWORK = Executors.newSingleThreadExecutor();
- private static boolean fetching;
- private static String loadedKey = "", lookupKey = "", lookupMessage = "", plainLyrics = "", lyricSource = "Local LRC";
- private static long nextLookupAt;
- private static Button fetchButton, plainButton;
private static long sleepAt;
+ private static boolean detectedAd;
private static String script;
private static boolean longSelect;
private static boolean forwardingKey;
+ private static boolean replayingNavigation;
+ private static final String VERSION = "1.3.0.9";
private static KeyEvent selectDown;
private static final AdMuteState AD_MUTE = new AdMuteState();
private static volatile WeakReference