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.
Put Download and Movies in tabs under the TV, and let short tabs fold fully
jesse-agent-232c85ef643b216
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 537d47d..7e2e393 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -15,6 +15,7 @@ until this file has a section for its version.- **Improved:** Debloat finds your TV's list itself, or its maker's, or lets you pick. [#70](../../pull/70)- **Improved:** The TV tops every tab and folds into the bar as you scroll. [#71](../../pull/71)- **Improved:** Apps splits into Running, Installed and Built-in tabs, with the apps the TV needs folded under System. [#72](../../pull/72)+- **Improved:** Files puts Download and Movies in tabs under the TV, and short tabs now fold the TV fully into the bar. [#74](../../pull/74)- **Fixed:** Welcome and pairing buttons no longer hide under the phone's navigation buttons. [#69](../../pull/69)## 0.5.0 — 2026-10-24diff --git a/README.md b/README.mdindex b89d4fa..2810e05 100644--- a/README.md+++ b/README.md@@ -91,7 +91,7 @@ Tellyscope is a phone app that talks to your Android TV, Google TV or Fire TV ov- **Install apps.** Pick an APK, several split APKs or an `.apks`/`.xapk`/`.apkm` bundle on your phone. Before installing, Tellyscope shows the app's name, version and size and says whether it's new, an update, a reinstall or an older version. It won't install an older version over a newer one unless you tick the box. If the TV refuses, you get the reason in plain words.- **TV tweaks.** **Block ads with Private DNS** sends the TV's address lookups to an ad-blocking DNS provider (AdGuard by default, or any other you type in). Tellyscope then checks the TV can still look addresses up, and puts the old setting back if not. It needs Android 9 or newer. **Faster animations** makes menus move at twice the speed. Both land in History with an Undo. **Clear caches** frees space by clearing every app's temporary files; app data and sign-ins stay. **Take screenshot** saves what the TV shows to your phone.- **Connection requests.** When another device asks to debug the TV, Tellyscope shows the TV's "Allow debugging?" prompt on your phone, with the device's key fingerprint, so you can **Allow** or **Deny** it without the remote. **Always allow this device** appears when the TV's own prompt offers it.-- **Files.** Send a file from your phone into the TV's Download or Movies folder, or save one from there to your phone. A file with the same name gets a " (1)" instead of being overwritten, and a cancelled copy leaves nothing half-written behind.+- **Files.** Send a file from your phone into the TV's Download or Movies folder, or save one from there to your phone. The two folders are tabs under the TV, and stay pinned under the bar as you scroll. A file with the same name gets a " (1)" instead of being overwritten, and a cancelled copy leaves nothing half-written behind.## Setting up your TVdiff --git a/app/src/main/java/app/tellyscope/ui/AppsTabs.kt b/app/src/main/java/app/tellyscope/ui/AppsTabs.ktindex de22b72..9e0285c 100644--- a/app/src/main/java/app/tellyscope/ui/AppsTabs.kt+++ b/app/src/main/java/app/tellyscope/ui/AppsTabs.kt@@ -12,16 +12,11 @@ import androidx.compose.material.icons.filled.KeyboardArrowDownimport androidx.compose.material.icons.filled.KeyboardArrowUpimport androidx.compose.material3.Iconimport androidx.compose.material3.MaterialTheme-import androidx.compose.material3.PrimaryTabRow-import androidx.compose.material3.Tabimport androidx.compose.material3.Textimport androidx.compose.runtime.Composableimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifierimport androidx.compose.ui.draw.clip-import androidx.compose.ui.graphics.Color-import androidx.compose.ui.layout.layout-import androidx.compose.ui.unit.Dpimport androidx.compose.ui.unit.dpimport app.tellyscope.data.AppInfoimport app.tellyscope.data.Proc@@ -53,24 +48,6 @@ internal fun splitApps(apps: List<AppInfo>, procs: List<Proc>, tab: AppsTab): Apreturn AppsSplit(rest, system)}-/** The three tabs, edge to edge across the list's side padding, pinned under the bar once the hero has folded. */-@Composable-internal fun AppsTabRow(tab: AppsTab, color: Color, inset: Dp, onTab: (AppsTab) -> Unit) {- PrimaryTabRow(- selectedTabIndex = tab.ordinal,- containerColor = color,- modifier = Modifier.layout { m, c ->- val side = inset.roundToPx()- val p = m.measure(c.copy(minWidth = c.maxWidth + 2 * side, maxWidth = c.maxWidth + 2 * side))- layout(c.maxWidth, p.height) { p.place(-side, 0) }- },- ) {- AppsTab.entries.forEach { t ->- Tab(selected = tab == t, onClick = { onTab(t) }, text = { Text(t.label) })- }- }-}-/** "System (N)" over the apps the TV needs; tapping it folds the list away or opens it again. */@Composableinternal fun SystemHeader(count: Int, folded: Boolean, onFold: (Boolean) -> Unit) {diff --git a/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt b/app/src/main/java/app/tellyscope/ui/DeviceTabs.ktindex 219c240..72eafd7 100644--- a/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt+++ b/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt@@ -10,8 +10,10 @@ import androidx.compose.foundation.layout.Boximport androidx.compose.foundation.layout.Columnimport androidx.compose.foundation.layout.PaddingValuesimport androidx.compose.foundation.layout.Row+import androidx.compose.foundation.layout.Spacerimport androidx.compose.foundation.layout.fillMaxSizeimport androidx.compose.foundation.layout.fillMaxWidth+import androidx.compose.foundation.layout.heightimport androidx.compose.foundation.layout.paddingimport androidx.compose.foundation.layout.sizeimport androidx.compose.foundation.lazy.LazyColumn@@ -65,6 +67,7 @@ import androidx.compose.runtime.mutableStateOfimport androidx.compose.runtime.rememberimport androidx.compose.runtime.saveable.rememberSaveableimport androidx.compose.runtime.setValue+import androidx.compose.runtime.snapshotFlowimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifierimport androidx.compose.ui.graphics.Color@@ -74,11 +77,13 @@ import androidx.compose.ui.graphics.graphicsLayerimport androidx.compose.ui.graphics.lerpimport androidx.compose.ui.graphics.vector.ImageVectorimport androidx.compose.ui.graphics.vector.PathParser+import androidx.compose.ui.platform.LocalDensityimport androidx.compose.ui.text.SpanStyleimport androidx.compose.ui.text.buildAnnotatedStringimport androidx.compose.ui.text.font.FontWeightimport androidx.compose.ui.text.withStyleimport androidx.compose.ui.unit.dp+import app.tellyscope.adb.TvFolderimport app.tellyscope.data.Actionimport app.tellyscope.data.AppInfoimport app.tellyscope.data.DeviceState@@ -136,6 +141,17 @@ fun DeviceTabsScreen(var heroHeight by remember { mutableIntStateOf(0) }val collapse by remember { derivedStateOf { collapsedFraction(list.firstVisibleItemIndex, list.firstVisibleItemScrollOffset, heroHeight) } }val barTitle by remember { derivedStateOf { titleAlpha(collapse) > 0f } }+ // A tab shorter than the screen gets blank space at its end, so its hero can still fold fully into the bar.+ // Measured only while the hero and the space are both in view; kept as it was while scrolled.+ var tail by remember { mutableIntStateOf(0) }+ LaunchedEffect(list) {+ snapshotFlow { list.layoutInfo }.collect { info ->+ val items = info.visibleItemsInfo+ val hero = items.firstOrNull { it.key == "hero" } ?: return@collect+ val end = items.firstOrNull { it.key == "tail" } ?: return@collect+ tail = tailSpace(hero.size, info.mainAxisItemSpacing, end.offset - hero.offset, info.afterContentPadding, info.viewportSize.height)+ }+ }// The tabs share one list, so each opens at the top with its hero, not where the last one was left.// "See changes" lands on Tweaks scrolled to Recent changes, the list's third item, after the hero.var toChanges by remember { mutableStateOf(false) }@@ -278,7 +294,7 @@ fun DeviceTabsScreen(} else {// Pinned under the bar once the hero has folded into it.stickyHeader(key = "appsTabs") {- AppsTabRow(appsTab, lerp(MaterialTheme.colorScheme.surface, MaterialTheme.colorScheme.surfaceContainer, collapse), inset = 16.dp) { appsTab = it }+ PinnedTabRow(AppsTab.entries.map { it.label }, appsTab.ordinal, lerp(MaterialTheme.colorScheme.surface, MaterialTheme.colorScheme.surfaceContainer, collapse), inset = 16.dp) { appsTab = AppsTab.entries[it] }}val split = splitApps(ui.apps, procs, appsTab)if (split.apps.isEmpty() && split.system.isEmpty()) item {@@ -294,6 +310,12 @@ fun DeviceTabsScreen(}}TvTab.Files -> {+ // Pinned under the bar once the hero has folded into it, like the Apps tabs.+ stickyHeader(key = "folders") {+ PinnedTabRow(TvFolder.entries.map(Copy::folder), ui.files.folder.ordinal, lerp(MaterialTheme.colorScheme.surface, MaterialTheme.colorScheme.surfaceContainer, collapse), inset = 16.dp) {+ if (!offline) actions.folder(TvFolder.entries[it])+ }+ }if (offline) item { Muted("Connect to the TV to see its files.") }else {item { FilesBlock(ui.files, state.now, actions) }@@ -309,6 +331,7 @@ fun DeviceTabsScreen(}}}+ item(key = "tail") { Spacer(Modifier.height(with(LocalDensity.current) { tail.toDp() })) }}if (!offline) ui.request?.let { RequestDialog(it, ui.busy == ANSWERING, actions.answerRequest, actions.dismissRequest) }ui.sideload?.let { SideloadDialog(it, actions) }diff --git a/app/src/main/java/app/tellyscope/ui/Transfers.kt b/app/src/main/java/app/tellyscope/ui/Transfers.ktindex 1c9b7e8..a6c2bde 100644--- a/app/src/main/java/app/tellyscope/ui/Transfers.kt+++ b/app/src/main/java/app/tellyscope/ui/Transfers.kt@@ -29,9 +29,6 @@ import androidx.compose.material3.Iconimport androidx.compose.material3.LinearWavyProgressIndicatorimport androidx.compose.material3.LoadingIndicatorimport androidx.compose.material3.MaterialTheme-import androidx.compose.material3.SegmentedButton-import androidx.compose.material3.SegmentedButtonDefaults-import androidx.compose.material3.SingleChoiceSegmentedButtonRowimport androidx.compose.material3.Surfaceimport androidx.compose.material3.Textimport androidx.compose.material3.TextButton@@ -143,19 +140,9 @@ internal val Broom = ImageVector.Builder("Broom", 24.dp, 24.dp, 24f, 24f)).build()-/** Body of the Files section: the folder switch, then the folder's files, each one tap from the phone. */+/** Body of the Files tab, under its folder tabs: the folder's files, each one tap from the phone. */@Composablefun FilesBlock(files: FilesUi, now: Long, actions: DeviceActions) {- SingleChoiceSegmentedButtonRow(Modifier.fillMaxWidth()) {- TvFolder.entries.forEachIndexed { i, f ->- SegmentedButton(- selected = files.folder == f,- onClick = { actions.folder(f) },- shape = SegmentedButtonDefaults.itemShape(i, TvFolder.entries.size),- ) { Text(Copy.folder(f)) }- }- }- Spacer(Modifier.size(4.dp))val list = files.listwhen {list == null -> Row(Modifier.fillMaxWidth().padding(8.dp), horizontalArrangement = Arrangement.Center) {diff --git a/app/src/main/java/app/tellyscope/ui/TvHeader.kt b/app/src/main/java/app/tellyscope/ui/TvHeader.ktindex 8a31115..ab6c819 100644--- a/app/src/main/java/app/tellyscope/ui/TvHeader.kt+++ b/app/src/main/java/app/tellyscope/ui/TvHeader.kt@@ -26,7 +26,9 @@ import androidx.compose.material3.FilterChipimport androidx.compose.material3.Iconimport androidx.compose.material3.MaterialShapesimport androidx.compose.material3.MaterialTheme+import androidx.compose.material3.PrimaryTabRowimport androidx.compose.material3.Surface+import androidx.compose.material3.Tabimport androidx.compose.material3.Textimport androidx.compose.material3.toShapeimport androidx.compose.runtime.Composable@@ -34,8 +36,10 @@ import androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifierimport androidx.compose.ui.draw.alphaimport androidx.compose.ui.draw.clip+import androidx.compose.ui.graphics.Colorimport androidx.compose.ui.graphics.TransformOriginimport androidx.compose.ui.graphics.graphicsLayer+import androidx.compose.ui.layout.layoutimport androidx.compose.ui.layout.onSizeChangedimport androidx.compose.ui.text.style.TextOverflowimport androidx.compose.ui.unit.Dp@@ -66,6 +70,15 @@ internal fun detailAlpha(f: Float) = (1f - 2f * f).coerceIn(0f, 1f)/** The bar title comes in over the last third, as the hero's name passes under the bar. */internal fun titleAlpha(f: Float) = ((f - 0.67f) / 0.33f).coerceIn(0f, 1f)+/**+ * The blank space a tab needs after its last item so the hero can scroll fully under the bar,+ * 0 when the tab is long enough already. From the list laid out with the hero and the space both+ * in view: [heroSize] and [spacing] are the hero item and the gap after it, [contentEnd] where the+ * space starts measured from the hero's top, [afterPadding] the list's end padding.+ */+internal fun tailSpace(heroSize: Int, spacing: Int, contentEnd: Int, afterPadding: Int, viewport: Int): Int =+ (heroSize + spacing - (contentEnd + afterPadding - viewport)).coerceAtLeast(0)+/** The TV's cookie tile: primary while it's connected, grey when it isn't. */@OptIn(ExperimentalMaterial3ExpressiveApi::class)@Composable@@ -177,3 +190,21 @@ private fun TvChips(state: UiState, actions: DeviceActions) {AssistChip(onClick = actions.addDevice, label = { Text("Device") }, leadingIcon = { Icon(Icons.Default.Add, contentDescription = "Add a", Modifier.size(18.dp)) })}}++/** A tab's own tabs, edge to edge across the list's side [inset], pinned under the bar once the hero has folded. */+@Composable+internal fun PinnedTabRow(labels: List<String>, selected: Int, color: Color, inset: Dp, onSelect: (Int) -> Unit) {+ PrimaryTabRow(+ selectedTabIndex = selected,+ containerColor = color,+ modifier = Modifier.layout { m, c ->+ val side = inset.roundToPx()+ val p = m.measure(c.copy(minWidth = c.maxWidth + 2 * side, maxWidth = c.maxWidth + 2 * side))+ layout(c.maxWidth, p.height) { p.place(-side, 0) }+ },+ ) {+ labels.forEachIndexed { i, label ->+ Tab(selected = selected == i, onClick = { onSelect(i) }, text = { Text(label) })+ }+ }+}diff --git a/app/src/test/java/app/tellyscope/ScreenshotTest.kt b/app/src/test/java/app/tellyscope/ScreenshotTest.ktindex 6bd4d33..18ed86e 100644--- a/app/src/test/java/app/tellyscope/ScreenshotTest.kt+++ b/app/src/test/java/app/tellyscope/ScreenshotTest.kt@@ -12,6 +12,7 @@ import androidx.compose.runtime.Composableimport androidx.compose.ui.Modifierimport androidx.compose.ui.unit.dpimport androidx.compose.ui.test.junit4.v2.createComposeRule+import androidx.compose.ui.test.assertIsDisplayedimport androidx.compose.ui.test.assertIsEnabledimport androidx.compose.ui.test.assertIsNotDisplayedimport androidx.compose.ui.test.assertIsNotEnabled@@ -279,7 +280,50 @@ class ScreenshotTest {@Test fun md3_apps_collapsed_dark() = collapsed("64_md3_apps_collapsed", true, "Connected", TvTab.Apps)@Config(qualifiers = "w411dp-h640dp-xxhdpi")@Test fun md3_files_collapsed() = collapsed("65_md3_files_collapsed", false, "Connected", TvTab.Files)+ @Config(qualifiers = "w411dp-h640dp-xxhdpi")+ @Test fun md3_files_collapsed_dark() = collapsed("65_md3_files_collapsed", true, "Connected", TvTab.Files)+ // On a tall screen the short tabs still fold the hero fully into the bar: the end space makes the room.+ @Test fun md3_files_foldsOnTallScreen() = collapsed("65_md3_files_collapsed_tall", false, "Connected", TvTab.Files)+ @Test fun md3_tweaks_foldsOnTallScreen() = collapsed("66_md3_tweaks_collapsed_tall", false, "Connected", TvTab.Tweaks)+ // Download and Movies are tabs under the hero now, like Apps.+ private fun moviesState() = md3State().let { it.copy(device = it.device.copy(files = FilesUi(TvFolder.MOVIES, listOf(+ TvFile("holiday-2025.mp4", 812_000_000, now - 3 * 86_400_000L),+ TvFile("family-trip-2025.mp4", 486_000_000, now - 9 * 86_400_000L),+ )))) }+ @Test fun md3_files_movies() { shot("73_md3_files_movies") { DeviceTabsScreen(moviesState(), DeviceActions(), startTab = TvTab.Files) } }+ @Test fun md3_files_movies_dark() { shot("73_md3_files_movies", dark = true) { DeviceTabsScreen(moviesState(), DeviceActions(), startTab = TvTab.Files) } }+ @Test fun md3_files_offline() {+ shot("74_md3_files_offline") { DeviceTabsScreen(offlineMd3(), DeviceActions(), startTab = TvTab.Files) }+ compose.onNodeWithText("Movies").assertExists()+ compose.onNodeWithText("Connect to the TV to see its files.").assertExists()+ }+ @Test fun md3_files_offline_dark() { shot("74_md3_files_offline", dark = true) { DeviceTabsScreen(offlineMd3(), DeviceActions(), startTab = TvTab.Files) } }+ @Test fun filesTabsPickTheFolder() {+ val picked = mutableListOf<TvFolder>()+ compose.mainClock.autoAdvance = false+ compose.setContent { TellyscopeTheme(dynamic = false) { DeviceTabsScreen(md3State(), DeviceActions(folder = { picked += it }), startTab = TvTab.Files) } }+ compose.mainClock.advanceTimeBy(1_000)+ compose.onNodeWithText("Movies").performClick()+ compose.mainClock.advanceTimeBy(1_000)+ assertEquals(listOf(TvFolder.MOVIES), picked)+ }@Test fun md3_tweaks() { shot("66_md3_tweaks") { DeviceTabsScreen(md3State(), DeviceActions(), startTab = TvTab.Tweaks) } }+ @Test fun md3_tweaks_dark() { shot("66_md3_tweaks", dark = true) { DeviceTabsScreen(md3State(), DeviceActions(), startTab = TvTab.Tweaks) } }+ @Test fun md3_tweaks_offline() { shot("75_md3_tweaks_offline") { DeviceTabsScreen(offlineMd3(), DeviceActions(), startTab = TvTab.Tweaks) } }+ @Test fun md3_tweaks_offline_dark() { shot("75_md3_tweaks_offline", dark = true) { DeviceTabsScreen(offlineMd3(), DeviceActions(), startTab = TvTab.Tweaks) } }+ @Config(qualifiers = "w411dp-h640dp-xxhdpi")+ @Test fun md3_tweaks_collapsed_dark() = collapsed("66_md3_tweaks_collapsed", true, "Connected", TvTab.Tweaks)+ // "See changes" on Overview still lands on Tweaks at Recent changes, the end space notwithstanding.+ @Test fun seeChangesLandsOnRecentChanges() {+ compose.mainClock.autoAdvance = false+ compose.setContent { TellyscopeTheme(dynamic = false) { DeviceTabsScreen(md3State(), DeviceActions()) } }+ compose.mainClock.advanceTimeBy(1_000)+ compose.onNode(hasScrollAction()).performScrollToNode(hasText("See changes"))+ compose.onNodeWithText("See changes").performClick()+ compose.mainClock.advanceTimeBy(1_000)+ compose.onNodeWithText("Recent changes").assertIsDisplayed()+ compose.onAllNodesWithText("Connected").onFirst().assertExists() // folded into the bar+ }@Config(qualifiers = "w411dp-h640dp-xxhdpi")@Test fun md3_tweaks_collapsed() = collapsed("66_md3_tweaks_collapsed", false, "Connected", TvTab.Tweaks)diff --git a/app/src/test/java/app/tellyscope/TvHeaderTest.kt b/app/src/test/java/app/tellyscope/TvHeaderTest.ktindex f0312a4..4bfa702 100644--- a/app/src/test/java/app/tellyscope/TvHeaderTest.kt+++ b/app/src/test/java/app/tellyscope/TvHeaderTest.kt@@ -4,6 +4,7 @@ package app.tellyscopeimport app.tellyscope.ui.collapsedFractionimport app.tellyscope.ui.detailAlpha+import app.tellyscope.ui.tailSpaceimport app.tellyscope.ui.titleAlphaimport org.junit.Assert.assertEqualsimport org.junit.Test@@ -26,4 +27,14 @@ class TvHeaderTest {// Never both out of sight with nothing in the bar: the title starts once the details are gone.assertEquals(0f, detailAlpha(0.67f), 0.001f)}++ @Test fun aShortTabGetsJustEnoughSpaceToFoldTheHero() {+ // Hero 600 + 36 gap; the rest ends 900 below the hero's top, then 288 of end padding, on a 1800 screen:+ // it can't scroll at all (900 + 288 < 1800, 612 short), so it needs 612 + 636 = 1248.+ assertEquals(1248, tailSpace(heroSize = 600, spacing = 36, contentEnd = 900, afterPadding = 288, viewport = 1800))+ // Already scrolls 3000 + 288 - 1800 = 1488, past the hero: nothing added.+ assertEquals(0, tailSpace(600, 36, 3000, 288, 1800))+ // Exactly long enough: still nothing.+ assertEquals(0, tailSpace(600, 36, 2148, 288, 1800))+ }}diff --git a/docs/screenshots/files.png b/docs/screenshots/files.pngindex 2309f6a..93d2e73 100644Binary files a/docs/screenshots/files.png and b/docs/screenshots/files.png differdiff --git a/docs/screenshots/history.png b/docs/screenshots/history.pngindex f31aabd..3057e74 100644Binary files a/docs/screenshots/history.png and b/docs/screenshots/history.png differ