Skip to content

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.

Debloat: say the list is done before opening Apps

jesse-agent-232b4e5d906fd83
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8ffa37f..74b1450 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ until this file has a section for its version.
## Unreleased
+- **Improved:** Debloat says when the list is all done, and what to try next.
- **Improved:** Every dialog uses one style, with the main action filled. [#180](../../pull/180)
## 0.10.1 — 2026-10-27
diff --git a/app/src/main/java/app/tellyscope/MainActivity.kt b/app/src/main/java/app/tellyscope/MainActivity.kt
index c0f5427..8b90c8c 100644
--- a/app/src/main/java/app/tellyscope/MainActivity.kt
+++ b/app/src/main/java/app/tellyscope/MainActivity.kt
@@ -117,6 +117,7 @@ class MainActivity : ComponentActivity() {
updates = if (scenario != null) null else updateCheck(),
folds = FoldBook(File(filesDir, "folds.properties")),
keyHaptics = KeyHaptics(File(filesDir, "remote.properties")),
+ gates = FoldBook(File(filesDir, "gates.properties")),
appFacts = AppFacts(installedVersion(), "${Build.MANUFACTURER} ${Build.MODEL}, Android ${Build.VERSION.RELEASE}"),
)
}
@@ -362,6 +363,7 @@ fun TellyscopeApp(vm: TellyscopeViewModel) {
dismissServiceNote = vm::dismissServiceNote,
installLauncher = vm::openLauncherFlow,
hideLauncherCard = vm::hideLauncherCard,
+ debloatGateOff = vm::debloatGateOff,
undo = vm::undo,
reconnect = { state.selectedId?.let(vm::reconnect) },
forget = vm::forget,
diff --git a/app/src/main/java/app/tellyscope/ui/Copy.kt b/app/src/main/java/app/tellyscope/ui/Copy.kt
index d2e74be..0890845 100644
--- a/app/src/main/java/app/tellyscope/ui/Copy.kt
+++ b/app/src/main/java/app/tellyscope/ui/Copy.kt
@@ -260,6 +260,14 @@ object Copy {
const val SYSTEM = "System"
const val SYSTEM_WHY = "Needed by the TV · can't be changed"
+ /** Debloat with nothing left on the list: what's done, what's next, then Apps. */
+ const val GATE_TITLE = "Everything on the list is off"
+ const val GATE_DONE = "All the apps the cleanyourtv list suggests for this TV are already off."
+ const val GATE_LAUNCHER = "To trim it further, switch to a minimal home screen. It replaces the TV's own, with its ads and suggestions."
+ const val GATE_APPS = "You can still choose, app by app, what to keep or turn off in Apps."
+ const val GO_TO_APPS = "Go to Apps"
+ const val DONT_SHOW_AGAIN = "Don't show again"
+
/** Apps, while the TV's app list is being read. */
const val READING_APPS = "Reading the TV's apps…"
const val READING_APPS_LINE = "This takes a few seconds."
diff --git a/app/src/main/java/app/tellyscope/ui/DeviceScreen.kt b/app/src/main/java/app/tellyscope/ui/DeviceScreen.kt
index c82590b..77d1d03 100644
--- a/app/src/main/java/app/tellyscope/ui/DeviceScreen.kt
+++ b/app/src/main/java/app/tellyscope/ui/DeviceScreen.kt
@@ -85,6 +85,8 @@ data class DeviceActions(
val installLauncher: () -> Unit = {},
/** Not now on the Apps tab's card about a better home screen. */
val hideLauncherCard: () -> Unit = {},
+ /** Don't show again on the Debloat gate: Debloat goes straight to Apps from then on. */
+ val debloatGateOff: () -> Unit = {},
val undo: (HistoryEntry) -> Unit = {},
val reconnect: () -> Unit = {},
val forget: (String) -> Unit = {},
diff --git a/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt b/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt
index 2501198..3849a01 100644
--- a/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt
+++ b/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt
@@ -36,9 +36,11 @@ import androidx.compose.material.icons.filled.List
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material.icons.filled.Search
import androidx.compose.material.icons.filled.Settings
+import androidx.compose.material3.AlertDialog
import androidx.compose.material3.AssistChip
import androidx.compose.material3.Badge
import androidx.compose.material3.BadgedBox
+import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.DropdownMenu
@@ -177,6 +179,18 @@ fun DeviceTabsScreen(
// "See changes" lands on Tweaks scrolled to Recent changes, the list's third item, after the hero.
var toChanges by remember { mutableStateOf(false) }
var shown by rememberSaveable { mutableStateOf(tab) }
+ var gate by rememberSaveable { mutableStateOf(false) }
+ if (gate) {
+ val toApps = { gate = false; tab = TvTab.Apps }
+ DebloatGate(
+ // Only where the picker can install one: the Play Store is on and no launcher was added yet.
+ launcher = offerChoose(ui.apps),
+ onChoose = { gate = false; actions.installLauncher() },
+ onApps = toApps,
+ onNeverAgain = { actions.debloatGateOff(); toApps() },
+ onDismiss = { gate = false },
+ )
+ }
// Each tab refreshes what it shows at its own rate: Overview and Apps (Running, sorted by RAM) need
// memory per app only, Files and Tweaks no processes at all.
DisposableEffect(tab, device.id) {
@@ -305,8 +319,13 @@ fun DeviceTabsScreen(
count = debloat.count,
todo = debloat.todo,
disabling = ui.busy == DISABLING,
- // With nothing left on the list, Debloat leads to the apps for one-off changes.
- onDebloat = if (debloat.todo) actions.debloat else ({ tab = TvTab.Apps }),
+ // With nothing left on the list, Debloat leads to the apps for one-off changes,
+ // through a gate that says so until the user turns it off.
+ onDebloat = when {
+ debloat.todo -> actions.debloat
+ state.debloatGate && ui.lists is Suggestions.Ready -> ({ gate = true })
+ else -> ({ tab = TvTab.Apps })
+ },
)
}
}
@@ -545,6 +564,38 @@ internal data class DebloatState(
val todo: Boolean,
)
+/**
+ * Debloat with everything on the list already off. [launcher]: a minimal home screen is the next
+ * step, so it leads; otherwise Apps does. Don't show again also goes on to Apps.
+ */
+@Composable
+internal fun DebloatGate(launcher: Boolean, onChoose: () -> Unit, onApps: () -> Unit, onNeverAgain: () -> Unit, onDismiss: () -> Unit) {
+ AlertDialog(
+ onDismissRequest = onDismiss,
+ icon = { Icon(Broom, contentDescription = null) },
+ title = { Text(Copy.GATE_TITLE) },
+ text = {
+ Column(verticalArrangement = Arrangement.spacedBy(12.dp)) {
+ Text(Copy.GATE_DONE)
+ Text(if (launcher) Copy.GATE_LAUNCHER else Copy.GATE_APPS)
+ }
+ },
+ // Three actions stack full width; two sit side by side.
+ confirmButton = {
+ if (launcher) {
+ Column(Modifier.fillMaxWidth()) {
+ Button(onClick = onChoose, Modifier.fillMaxWidth()) { Text(Copy.CHOOSE_HOME) }
+ TextButton(onClick = onApps, Modifier.fillMaxWidth()) { Text(Copy.GO_TO_APPS) }
+ TextButton(onClick = onNeverAgain, Modifier.fillMaxWidth()) { Text(Copy.DONT_SHOW_AGAIN) }
+ }
+ } else {
+ Button(onClick = onApps) { Text(Copy.GO_TO_APPS) }
+ }
+ },
+ dismissButton = if (launcher) null else ({ TextButton(onClick = onNeverAgain) { Text(Copy.DONT_SHOW_AGAIN) } }),
+ )
+}
+
internal fun debloatState(ui: DeviceUi): DebloatState {
// History lives on this phone, so it only knows what this phone turned off.
val ours = ui.history.filter { it.action == Action.Disable && it.undoneAt == null }.map { it.packageName }.toSet()
diff --git a/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt b/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt
index 1997fa6..46f5259 100644
--- a/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt
+++ b/app/src/main/java/app/tellyscope/ui/TellyscopeViewModel.kt
@@ -223,6 +223,8 @@ data class UiState(
val screenOff: Set<String> = emptySet(),
/** The Remote's Screen off button explains itself, the first time only. */
val screenOffTip: Boolean = false,
+ /** Debloat with nothing left on the list explains why it opens Apps, until Don't show again. */
+ val debloatGate: Boolean = true,
/** The Apps tabs whose System section the user folded away. */
val foldedSystem: Set<AppsTab> = emptySet(),
/** The report screen; null when it's closed. */
@@ -256,6 +258,9 @@ data class Restart(val since: Long, val down: Boolean = false, val waitFrom: Lon
/** The newest messages a report's log keeps. */
private const val LOG_LINES = 200
+/** The gates book's key once the user said Don't show again on the Debloat gate. */
+private const val DEBLOAT_GATE = "debloat"
+
/** Most TVs are back within this; after it the Remote asks whether to keep waiting. */
const val RESTART_WAIT_MS = 60_000L
@@ -294,6 +299,8 @@ class TellyscopeViewModel(
private val updates: UpdateCheck? = null,
private val folds: FoldBook? = null,
private val keyHaptics: KeyHaptics? = null,
+ /** App-wide prompts the user turned off: [DEBLOAT_GATE]. */
+ private val gates: FoldBook? = null,
/** This build and phone, for reports. */
private val appFacts: AppFacts = AppFacts("unknown", "unknown phone"),
) : ViewModel() {
@@ -363,6 +370,9 @@ class TellyscopeViewModel(
keyHaptics?.let { k ->
viewModelScope.launch(Dispatchers.IO) { _state.update { it.copy(keyHaptics = k.on, screenOffTip = !k.screenOffTipSeen) } }
}
+ gates?.let { g ->
+ viewModelScope.launch(Dispatchers.IO) { _state.update { it.copy(debloatGate = DEBLOAT_GATE !in g.folded()) } }
+ }
folds?.let { f ->
viewModelScope.launch(Dispatchers.IO) {
val folded = f.folded().mapNotNull { name -> AppsTab.entries.firstOrNull { it.name == name } }.toSet()
@@ -1505,6 +1515,11 @@ class TellyscopeViewModel(
return ok
}
+ fun debloatGateOff() {
+ _state.update { it.copy(debloatGate = false) }
+ viewModelScope.launch(Dispatchers.IO) { gates?.set(DEBLOAT_GATE, true) }
+ }
+
fun screenOffTipSeen() {
_state.update { it.copy(screenOffTip = false) }
viewModelScope.launch(Dispatchers.IO) { keyHaptics?.screenOffTipSeen = true }
diff --git a/app/src/test/java/app/tellyscope/DebloatGateTest.kt b/app/src/test/java/app/tellyscope/DebloatGateTest.kt
new file mode 100644
index 0000000..39926ed
--- /dev/null
+++ b/app/src/test/java/app/tellyscope/DebloatGateTest.kt
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: GPL-3.0-only
+
+package app.tellyscope
+
+import androidx.compose.ui.test.junit4.v2.createComposeRule
+import androidx.compose.ui.test.onNodeWithText
+import androidx.compose.ui.test.performClick
+import app.tellyscope.ui.Copy
+import app.tellyscope.ui.DebloatGate
+import org.junit.Assert.assertEquals
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.robolectric.RobolectricTestRunner
+import org.robolectric.annotation.Config
+
+@RunWith(RobolectricTestRunner::class)
+@Config(sdk = [35])
+class DebloatGateTest {
+ @get:Rule val compose = createComposeRule()
+
+ private val taps = mutableListOf<String>()
+
+ private fun gate(launcher: Boolean) = compose.setContent {
+ DebloatGate(launcher, onChoose = { taps += "choose" }, onApps = { taps += "apps" }, onNeverAgain = { taps += "never" }, onDismiss = { taps += "dismiss" })
+ }
+
+ @Test fun withoutAnAddedLauncherAHomeScreenLeads() {
+ gate(launcher = true)
+ compose.onNodeWithText(Copy.GATE_LAUNCHER).assertExists()
+ compose.onNodeWithText(Copy.CHOOSE_HOME).performClick()
+ compose.onNodeWithText(Copy.GO_TO_APPS).performClick()
+ compose.onNodeWithText(Copy.DONT_SHOW_AGAIN).performClick()
+ assertEquals(listOf("choose", "apps", "never"), taps)
+ }
+
+ @Test fun withALauncherSetAppsLeads() {
+ gate(launcher = false)
+ compose.onNodeWithText(Copy.GATE_APPS).assertExists()
+ compose.onNodeWithText(Copy.CHOOSE_HOME).assertDoesNotExist()
+ compose.onNodeWithText(Copy.DONT_SHOW_AGAIN).performClick()
+ assertEquals(listOf("never"), taps)
+ }
+}
diff --git a/app/src/test/java/app/tellyscope/ScreenshotTest.kt b/app/src/test/java/app/tellyscope/ScreenshotTest.kt
index 55bdd04..5b7f6cb 100644
--- a/app/src/test/java/app/tellyscope/ScreenshotTest.kt
+++ b/app/src/test/java/app/tellyscope/ScreenshotTest.kt
@@ -71,6 +71,7 @@ import app.tellyscope.ui.AccessActions
import app.tellyscope.ui.AdvancedScreen
import app.tellyscope.ui.AppsTab
import app.tellyscope.ui.ConnectScreen
+import app.tellyscope.ui.DebloatGate
import app.tellyscope.ui.DebloatScreen
import app.tellyscope.ui.DeviceActions
import app.tellyscope.ui.DeviceTabsScreen
@@ -1064,6 +1065,10 @@ class ScreenshotTest {
@Test fun reboot() = shot("15_reboot", screen = true) { RebootDialog({}, {}) }
+ @Test fun debloatGate() = shot("95_debloat_gate", screen = true) { DebloatGate(launcher = true, {}, {}, {}, {}) }
+
+ @Test fun debloatGateApps() = shot("95_debloat_gate_apps", screen = true) { DebloatGate(launcher = false, {}, {}, {}, {}) }
+
@Config(qualifiers = "w411dp-h2400dp-xxhdpi")
@Test fun advanced() = shot("17_advanced") { AdvancedScreen(deviceState(), back = {}) }