Debloat your Android TV, install apps, browse and transfer files on it, all from your phone. Just 3 MB, no tracking, no root, no PC.
README for the public release: 8 framed screenshots, Get it, Is it safe
jesse-agent-232d0b6c29650b1
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 5af162a..b4ab6ea 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -24,6 +24,17 @@ The per-TV lists behind **Suggested for this TV** live in the [tellyscope-device- Say which TV models you tested on, and what changed after disabling it.- If disabling it broke anything (launcher, updates, remote, input, HDMI-CEC), put it in the list's keep entries, or propose it for the built-in protected list (`adb/src/main/kotlin/app/tellyscope/adb/Protected.kt`) here.+## README screenshots++They come from the screenshot tests, so they always show the current UI with sample data. To refresh them, render the tests, then put them in phone frames (needs Python 3 with Pillow):++```sh+./gradlew :app:testDebugUnitTest --tests '*ScreenshotTest' -Proborazzi.test.record=true+python3 docs/screenshots/frame.py+```++`frame.py` lists which test image becomes which README image. Keep the README at 8 images or fewer.+## Style- Kotlin official code style, as set up in `.editorconfig`.diff --git a/README.md b/README.mdindex 0c5e968..af90123 100644--- a/README.md+++ b/README.md@@ -1,18 +1,53 @@# Tellyscope-See inside your Android TV from your phone. Live stats, reversible debloat, app installs and file copies, all over Wi-Fi ADB. No root, no PC.+See inside your Android TV from your phone. Check how it's doing, turn off the apps it doesn't need, install apps and send files, all over Wi-Fi. No root, no PC, and every change can be undone.> **Status: alpha.** Tellyscope connects to real TVs and makes real changes, but it has only been tried on a few models. Expect rough edges, and keep the TV's own remote nearby.-<p>- <img src="docs/screenshots/scan.png" width="200" alt="Finding TVs on the Wi-Fi">- <img src="docs/screenshots/tv-page.png" width="200" alt="A TV's page: the TV at a glance, its vitals, and the Install, Debloat and Send buttons">- <img src="docs/screenshots/debloat.png" width="200" alt="Debloat: reviewing the apps it will turn off">- <img src="docs/screenshots/install.png" width="200" alt="Installing an app on the TV">-</p>+<table>+ <tr>+ <td width="25%"><img src="docs/screenshots/tv-page.png" alt="A TV's page: the TV at a glance, its vitals, and the Install, Debloat and Send buttons"></td>+ <td width="25%"><img src="docs/screenshots/tv-page-dark.png" alt="The same TV page in dark theme"></td>+ <td width="25%"><img src="docs/screenshots/debloat.png" alt="Debloat: reviewing the apps it will turn off, each with its package name"></td>+ <td width="25%"><img src="docs/screenshots/debloat-confirm.png" alt="The confirm before disabling, naming every app"></td>+ </tr>+ <tr>+ <td align="center"><sub>Your TV at a glance</sub></td>+ <td align="center"><sub>Dark theme too</sub></td>+ <td align="center"><sub>Review every app Debloat turns off</sub></td>+ <td align="center"><sub>It names each app before it acts</sub></td>+ </tr>+ <tr>+ <td><img src="docs/screenshots/advanced.png" alt="Advanced: memory, storage, CPU and RAM by app"></td>+ <td><img src="docs/screenshots/scan.png" alt="Finding TVs on the Wi-Fi"></td>+ <td><img src="docs/screenshots/install.png" alt="Installing an app on the TV"></td>+ <td><img src="docs/screenshots/history.png" alt="History: every change with an Undo, and Restore everything"></td>+ </tr>+ <tr>+ <td align="center"><sub>Every number, on Advanced</sub></td>+ <td align="center"><sub>Finds TVs on your Wi-Fi</sub></td>+ <td align="center"><sub>Install apps from your phone</sub></td>+ <td align="center"><sub>Undo anything from History</sub></td>+ </tr>+</table><sub>Rendered from the app's screenshot tests with sample data.</sub>+## Get it++- **GitHub Releases.** Download `Tellyscope-<version>.apk` from the [Releases](../../releases) page and open it on your phone. You may need to allow installs from your browser or file manager first. Pre-releases marked `-alpha` are test builds: they install as a separate app next to the regular one, with the same name and icon.+- **Obtainium.** To get updates automatically, add this repository's GitHub address in [Obtainium](https://github.com/ImranR98/Obtainium). Turn on **Include prereleases** only if you want the alpha builds.++Tellyscope needs a phone on Android 8.0 or newer, on the same Wi-Fi as the TV, and a TV with developer options turned on ([how](#setting-up-your-tv)).++## Is it safe?++- **Reversible.** Tellyscope disables apps; it never uninstalls them, so nothing is deleted. Every change goes into History with an Undo, and **Restore everything** turns back on all it turned off.+- **Protected list.** Apps the TV needs to start, update, stay on Wi-Fi, show its home screen or take input can't be stopped or disabled. There is no override.+- **You see it first.** Debloat shows every app it will turn off, and the confirm names each one before anything runs.++The full rules are under [Safety rules](#safety-rules).+## What it doesTellyscope is a phone app that talks to your Android TV, Google TV or Fire TV over the network using ADB, the same debugging protocol developers use.diff --git a/app/src/test/java/app/tellyscope/ScreenshotTest.kt b/app/src/test/java/app/tellyscope/ScreenshotTest.ktindex a231b6a..926e122 100644--- a/app/src/test/java/app/tellyscope/ScreenshotTest.kt+++ b/app/src/test/java/app/tellyscope/ScreenshotTest.kt@@ -36,6 +36,7 @@ import app.tellyscope.data.ScanHitimport app.tellyscope.data.ScanKindimport app.tellyscope.data.ScanProgressimport app.tellyscope.data.Suggested+import app.tellyscope.data.SuggestedGroupimport app.tellyscope.data.Suggestionsimport app.tellyscope.ui.AdvancedScreenimport app.tellyscope.ui.DebloatScreen@@ -428,4 +429,65 @@ class ScreenshotTest {compose.onNodeWithText(a.pkg).assertExists()}}+ // README shots: the same screens with a fuller sample list and history than the tests above need.++ /** A fuller sample list for the README: two groups, one optional app left unticked. */+ private fun readmeLists(): Suggestions.Ready {+ val r = deviceState().device.lists as Suggestions.Ready+ return r.copy(+ groups = listOf(+ SuggestedGroup(+ "Google extras",+ listOf(+ Suggested("com.google.android.tvrecommendations", "TV Recommendations", "home screen suggestions", optional = false, ticked = true),+ Suggested("com.google.android.videos", "Google TV", "film and TV store", optional = false, ticked = true),+ Suggested("com.google.android.play.games", "Google Play Games", null, optional = false, ticked = true),+ ),+ ),+ SuggestedGroup(+ "Extras",+ listOf(+ Suggested("com.xgimi.assistant", "XGIMI Assistant", "voice assistant", optional = false, ticked = true),+ Suggested("com.netflix.ninja", "Netflix", null, optional = true, ticked = false),+ ),+ ),+ ),+ )+ }++ @Test fun readme_debloat() {+ val next = { compose.onNodeWithText("Next").performClick(); Unit }+ shot("20_readme_debloat", before = next) { DebloatScreen(readmeLists(), {}, {}, {}) }+ compose.onNodeWithText("Disable 4 apps").assertIsEnabled()+ }++ @Test fun readme_confirm() {+ // Over the review step, as in the app.+ val confirm = {+ compose.onNodeWithText("Next").performClick()+ compose.mainClock.advanceTimeBy(1_000)+ compose.onNodeWithText("Disable 4 apps").performClick()+ Unit+ }+ shot("21_readme_confirm", screen = true, before = confirm) { DebloatScreen(readmeLists(), {}, {}, {}) }+ compose.onNodeWithText("Disable 4 apps?").assertExists()+ }++ // Tall, like device_history: frame.py shows it scrolled down to History under the top bar.+ @Config(qualifiers = "w411dp-h2600dp-xxhdpi")+ @Test fun readme_history() {+ val history = listOf(+ HistoryEntry(4, xgimi.ip, now - 40_000, Action.Disable, "com.google.android.tvrecommendations", "TV Recommendations", Action.Enable, null),+ HistoryEntry(3, xgimi.ip, now - 45_000, Action.Disable, "com.xgimi.assistant", "XGIMI Assistant", Action.Enable, null),+ HistoryEntry(2, xgimi.ip, now - 5 * 60_000, Action.Stop, "com.netflix.ninja", "Netflix", Action.Open, null),+ HistoryEntry(1, xgimi.ip, now - 2 * 3_600_000, Action.Stop, "com.google.android.youtube.tv", "YouTube", Action.Open, now - 3_500_000),+ )+ val openHistory = {+ compose.onNodeWithText("Apps").performClick() // fold the long list away+ compose.onNodeWithText("History").performClick()+ Unit+ }+ shot("22_readme_history", before = openHistory) { DeviceScreen(deviceState { copy(history = history) }, DeviceActions()) }+ compose.onNodeWithText("Restore everything (2)").assertExists()+ }}diff --git a/docs/screenshots/advanced.png b/docs/screenshots/advanced.pngnew file mode 100644index 0000000..fea31daBinary files /dev/null and b/docs/screenshots/advanced.png differdiff --git a/docs/screenshots/debloat-confirm.png b/docs/screenshots/debloat-confirm.pngnew file mode 100644index 0000000..4a718c6Binary files /dev/null and b/docs/screenshots/debloat-confirm.png differdiff --git a/docs/screenshots/debloat.png b/docs/screenshots/debloat.pngindex 59617a6..7ec5b3d 100644Binary files a/docs/screenshots/debloat.png and b/docs/screenshots/debloat.png differdiff --git a/docs/screenshots/frame.py b/docs/screenshots/frame.pynew file mode 100644index 0000000..fa46f96--- /dev/null+++ b/docs/screenshots/frame.py@@ -0,0 +1,72 @@+#!/usr/bin/env python3+# SPDX-License-Identifier: GPL-3.0-only+"""Puts the README's screenshots in a phone frame.++Render the screenshot tests first, then run this from the repository root:++ ./gradlew :app:testDebugUnitTest --tests '*ScreenshotTest' -Proborazzi.test.record=true+ python3 docs/screenshots/frame.py++Needs Pillow (pip install pillow).+"""+from pathlib import Path++from PIL import Image, ImageDraw++SRC = Path("app/build/outputs/roborazzi")+OUT = Path(__file__).parent++# Output name, the screenshot it comes from, and how far down the page it is scrolled, in dp.+# Tall renders are cut to one phone screen; a scrolled one keeps its top bar, as on a phone.+SHOTS = {+ "tv-page": ("04_device", 0),+ "tv-page-dark": ("04_device_dark", 0),+ "debloat": ("20_readme_debloat", 0),+ "debloat-confirm": ("21_readme_confirm", 0),+ "advanced": ("17_advanced", 0),+ "scan": ("01_scan_in_progress", 0),+ "install": ("10_sideload_new", 0),+ "history": ("22_readme_history", 300),+}++DP = 3 # the tests render at xxhdpi+SCREEN_DP = 891 # the tests' 411 x 891 dp phone+TOP_BAR_DP = 64++WIDTH = 540 # screen width in the output; GitHub shows it at about half that+STATUS = 30 # status bar height, where the camera sits+BEZEL = 14+RADIUS = 46+++def frame(src: Path, scroll_dp: int) -> Image.Image:+ shot = Image.open(src).convert("RGB")+ phone_h, bar, scroll = SCREEN_DP * DP, TOP_BAR_DP * DP, scroll_dp * DP+ if scroll:+ page = shot.crop((0, bar + scroll, shot.width, scroll + phone_h))+ shot = shot.crop((0, 0, shot.width, phone_h))+ shot.paste(page, (0, bar))+ else:+ shot = shot.crop((0, 0, shot.width, min(shot.height, phone_h)))+ shot = shot.resize((WIDTH, shot.height * WIDTH // shot.width), Image.LANCZOS)++ # A status bar in the app's own top colour, as on a phone.+ screen = Image.new("RGB", (WIDTH, shot.height + STATUS), shot.getpixel((2, 2)))+ screen.paste(shot, (0, STATUS))+ w, h = screen.size++ out = Image.new("RGBA", (w + 2 * BEZEL, h + 2 * BEZEL), (0, 0, 0, 0))+ d = ImageDraw.Draw(out)+ d.rounded_rectangle((0, 0, out.width - 1, out.height - 1), RADIUS + BEZEL, fill=(27, 27, 31, 255))+ mask = Image.new("L", screen.size, 0)+ ImageDraw.Draw(mask).rounded_rectangle((0, 0, w - 1, h - 1), RADIUS, fill=255)+ out.paste(screen, (BEZEL, BEZEL), mask)+ cx, cy, r = out.width // 2, BEZEL + STATUS // 2, 7+ d.ellipse((cx - r, cy - r, cx + r, cy + r), fill=(27, 27, 31, 255))+ return out+++if __name__ == "__main__":+ for name, (src, scroll) in SHOTS.items():+ frame(SRC / f"{src}.png", scroll).save(OUT / f"{name}.png", optimize=True)+ print(f"{name}.png")diff --git a/docs/screenshots/history.png b/docs/screenshots/history.pngnew file mode 100644index 0000000..bdca089Binary files /dev/null and b/docs/screenshots/history.png differdiff --git a/docs/screenshots/install.png b/docs/screenshots/install.pngindex 5d6f5c5..01e0080 100644Binary files a/docs/screenshots/install.png and b/docs/screenshots/install.png differdiff --git a/docs/screenshots/remote.png b/docs/screenshots/remote.pngdeleted file mode 100644index 87016a3..0000000Binary files a/docs/screenshots/remote.png and /dev/null differdiff --git a/docs/screenshots/scan.png b/docs/screenshots/scan.pngindex daff088..b5f2b76 100644Binary files a/docs/screenshots/scan.png and b/docs/screenshots/scan.png differdiff --git a/docs/screenshots/tv-page-dark.png b/docs/screenshots/tv-page-dark.pngnew file mode 100644index 0000000..cbec573Binary files /dev/null and b/docs/screenshots/tv-page-dark.png differdiff --git a/docs/screenshots/tv-page.png b/docs/screenshots/tv-page.pngindex 21bbe2a..7357b5b 100644Binary files a/docs/screenshots/tv-page.png and b/docs/screenshots/tv-page.png differ