feat: Add a Debloat settings page #22

Open
namillis wants to merge 1 commit from feat/tv-debloat into main
Owner

Google TV and Sony TVs ship apps people never use, like feedback senders, bug report tools and screensaver providers. Turning them off meant running adb shell pm disable-user from a computer.

Fix: Settings -> Home, debloat & backup has a new Debloat page that turns those apps off and back on from the TV itself.

  • Debloat page. It lists only the installed apps from a fixed 21-entry catalog (TvDebloatCatalog, sourced from Universal Android Debloater), each with a one-line description. Left, Right or OK toggles a row between On and Off with pm disable-user --user 0 / pm enable --user 0. Nothing is uninstalled, so every change can be undone from the same page.
  • Turn off recommended. This row turns off every installed entry that loses no visible feature, after a confirm dialog that lists them by name. The row is hidden when none of those apps are installed. Sony Help Guide and Connectivity Diagnostics are opt-in only, because each removes something a person can see.
  • Shared ADB code. The connect and command code that was private in GoogleTvSetup is now LocalAdb, used by both Default home setup and Debloat. They share the existing one-operation-at-a-time flag. Package names are checked against a regex and commands are only built from the catalog. Errors read "ADB command failed:" instead of "ADB setup failed:".
  • Shorter authorization wait. The wait for the TV's debugging prompt drops from 45 to 20 seconds, and its error says the prompt was cancelled or timed out. Pressing Cancel sends no reply, so this timeout is how the app finds out. Default home setup gets the same change.

Adds TvDebloatCatalogTest (9 JVM tests for the catalog contents, the commands it builds, the package-name check and which entries count as recommended), a README section and an Unreleased changelog entry.

Build, 218 unit tests and lint pass. On an Android 14 TV emulator, the page listed the three catalog apps that image has, toggling off and on matched pm list packages -d, Turn off recommended disabled both recommended apps, the row hid when they were missing, D-pad focus landed on the dialog buttons, and Cancel on the debugging prompt showed the error after about 20 seconds. Not yet tried on a real TV: the "could not connect" error with Network debugging off, which the emulator can't produce, and whether com.google.android.tungsten.setupwraith (which Default home setup already disables) breaks volume control on a Sony Bravia, as UAD reports.

Google TV and Sony TVs ship apps people never use, like feedback senders, bug report tools and screensaver providers. Turning them off meant running `adb shell pm disable-user` from a computer. **Fix:** Settings -> Home, debloat & backup has a new Debloat page that turns those apps off and back on from the TV itself. - **Debloat page.** It lists only the installed apps from a fixed 21-entry catalog (`TvDebloatCatalog`, sourced from Universal Android Debloater), each with a one-line description. Left, Right or OK toggles a row between On and Off with `pm disable-user --user 0` / `pm enable --user 0`. Nothing is uninstalled, so every change can be undone from the same page. - **Turn off recommended.** This row turns off every installed entry that loses no visible feature, after a confirm dialog that lists them by name. The row is hidden when none of those apps are installed. Sony Help Guide and Connectivity Diagnostics are opt-in only, because each removes something a person can see. - **Shared ADB code.** The connect and command code that was private in `GoogleTvSetup` is now `LocalAdb`, used by both Default home setup and Debloat. They share the existing one-operation-at-a-time flag. Package names are checked against a regex and commands are only built from the catalog. Errors read "ADB command failed:" instead of "ADB setup failed:". - **Shorter authorization wait.** The wait for the TV's debugging prompt drops from 45 to 20 seconds, and its error says the prompt was cancelled or timed out. Pressing Cancel sends no reply, so this timeout is how the app finds out. Default home setup gets the same change. Adds `TvDebloatCatalogTest` (9 JVM tests for the catalog contents, the commands it builds, the package-name check and which entries count as recommended), a README section and an Unreleased changelog entry. Build, 218 unit tests and lint pass. On an Android 14 TV emulator, the page listed the three catalog apps that image has, toggling off and on matched `pm list packages -d`, Turn off recommended disabled both recommended apps, the row hid when they were missing, D-pad focus landed on the dialog buttons, and Cancel on the debugging prompt showed the error after about 20 seconds. Not yet tried on a real TV: the "could not connect" error with Network debugging off, which the emulator can't produce, and whether `com.google.android.tungsten.setupwraith` (which Default home setup already disables) breaks volume control on a Sony Bravia, as UAD reports.
Author
Owner

Intent: let people turn off unused preinstalled TV apps from the launcher, using the same local ADB connection that Default home setup already uses.

Not a goal:

  • Uninstalling apps or touching anything outside the fixed 21-entry catalog.
  • Changing what Default home setup disables, including setupwraith.
  • Real-TV verification. Testing so far is the Android 14 TV emulator only; the "could not connect" error and the Sony Bravia volume report still need a real TV.
**Intent:** let people turn off unused preinstalled TV apps from the launcher, using the same local ADB connection that Default home setup already uses. **Not a goal:** - Uninstalling apps or touching anything outside the fixed 21-entry catalog. - Changing what Default home setup disables, including `setupwraith`. - Real-TV verification. Testing so far is the Android 14 TV emulator only; the "could not connect" error and the Sony Bravia volume report still need a real TV.
This pull request has changes conflicting with the target branch.
  • CHANGELOG.md
  • README.md
  • glasslauncher/app/src/main/java/tv/glass/launcher/LauncherActivity.java
  • glasslauncher/app/src/main/res/values/strings.xml
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/tv-debloat:feat/tv-debloat
git switch feat/tv-debloat

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/tv-debloat
git switch feat/tv-debloat
git rebase main
git switch main
git merge --ff-only feat/tv-debloat
git switch feat/tv-debloat
git rebase main
git switch main
git merge --no-ff feat/tv-debloat
git switch main
git merge --squash feat/tv-debloat
git switch main
git merge --ff-only feat/tv-debloat
git switch main
git merge feat/tv-debloat
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
namillis/GlassLauncherTV!22
No description provided.