# TCL 55P615 — Android TV cleanup and speed-up

> This file is a working brief for an AI coding agent (Claude Code). It was used on a TCL 55P615 (Android TV 11). If you use it on another Android TV, change the "TV" section to match your device; package names differ by brand and firmware. Every step is reversible, but you are responsible for your own TV.

> **Preparation (your part)**
> 1. Settings > Device Preferences > About > press OK on **Build** 7 times with the remote.
> 2. Settings > Device Preferences > Developer options > **USB debugging**: On.
> 3. Write the TV's IP address in the "TV" section below (Settings > Network & Internet > connected network, or Device Preferences > About > Status). If you don't, Claude will ask.
> 4. Create an empty `tv-debloat` folder on your computer, save this file in it as `CLAUDE.md`, start Claude Code in that folder and type **"Start"**. You can also paste the contents straight into the chat.

## Task
Clean up and speed up my TCL Android TV over ADB: disable the factory apps and background services I don't use, remove the ad/recommendation rows, and replace the home screen with a lightweight launcher. Run the commands yourself and tell me in one plain sentence what you did at each step. When I need to do something at the TV (approve a prompt, test something, press "Install" in the Play Store), ask clearly and wait.

## TV
- Model: TCL 55P615, Android TV 11, TCL TV+ OS V5.2.0 (BeyondTV)
- Firmware: V8-R851T02-LF1V674.000019 · Client type: TCL-EU-RT2851-S1
- Hardware: Realtek RTD2851 (RT51 chassis), 4× Cortex-A55 1.1 GHz, 2 GB RAM, 16 GB storage
- TV IP address: **<TV_IP>**
- Developer options and USB debugging are on; the computer and the TV are on the same network.

**Context:** The real bottleneck is the 2 GB of RAM and the slow CPU. The goal is to reduce what occupies RAM and runs in the background. Disabling a package that never runs gains no speed and only adds risk, so set priorities from measurements. This TV is Realtek-based, not MediaTek: the package names in Xiaomi/MediaTek guides (`*.hotkey.dispatcher`, `*.wwtv.tvcenter`) don't exist here; look for the TCL and Realtek equivalents.

## Rules (strict)
1. **Never uninstall.** Only use `pm disable-user --user 0 <package>`; the rollback is `pm enable <package>`. `pm uninstall`, `pm clear` (deletes app data and sign-ins) and writing to system files are forbidden.
2. **No root, no bootloader unlock, no custom ROM, no firmware flashing.** If Widevine L1 breaks, Netflix and Prime drop to SD quality, and there is nothing to gain.
3. **Take a backup and measurements first** (Phase 1), and repeat the same measurements at the end.
4. **Work in groups.** Disable at most 10 packages at a time, then STOP and have me run the test list below. Don't move to the next group without my approval. Within a group, also disable packages one by one: wait about 15 seconds after each and check that the system is still up. On this TV, disabling two packages in quick succession crashed `system_server` and none of the changes stuck. Disable packages marked "one by one" on their own and test with a reboot.
5. **Don't disable a package you are unsure about; ask.** Apart from the ones named in the candidate lists, packages whose names contain `input`, `source`, `hdmi`, `cec`, `tuner`, `dtv`, `epg`, `passthrough`, `pq`, `picture`, `audio`, `dolby`, `bluetooth`, `rcu`, `remote`, `key`, `provider`, `permission`, `webview`, `framework`, `settings`, `systemui`, `ota` or `update` are off-limits by default; show your reasoning and get my approval before disabling one. Don't touch `com.realtek.*` packages.
6. **Don't force a package that can't be disabled.** If `pm disable-user` fails (protected package, SecurityException), don't try another way; skip it and log it.
7. **Keep records.** Write every package you disable, in order, to `disabled.txt`. In `CHANGELOG.md`, record for each group the package, what it is, its RAM use before disabling and the test result. Save the previous value of every setting you change (if it was `null`, use `settings delete` when rolling back).
8. **If something breaks,** first re-enable the whole last group and confirm the problem is gone; then find the culprit by bisection and add it to the do-not-touch list.
9. **If the TV is not what you expect** (not Android 11, a different launcher, different package names), stop and ask me.

## Never disable
| Package | Why |
|---|---|
| `com.tcl.suspension` | The remote's Source/Inputs menu. The name looks unimportant, but on another TCL TV disabling it made HDMI switching impossible. |
| `com.tcl.tv`, `com.tcl.tvinput`, `com.tcl.tvpassthrough`, `com.tcl.sourcemananger` | HDMI, antenna/satellite and source management |
| `com.tcl.settings`, `com.android.tv.settings`, `com.tcl.framework.custom`, `com.tcl.xian.StartandroidService` | TV settings, picture/sound menus, the TCL framework and the boot service |
| `com.tcl.tcl_bt_rcu_service`, `com.tcl.autopair`, `com.tcl.keycustomfunctionservice`, `com.google.android.tv.remote.service` | Remote, pairing and custom keys |
| `com.google.android.gms`, `com.google.android.gsf`, `com.android.vending` | Play Services and Play Store |
| `com.android.location.fused` | Disabling it can make the TV hang at boot (boot loop) |
| `com.android.providers.tv` | Channel list and "Continue watching" data |
| The active keyboard (`settings get secure default_input_method`) | On-screen keyboard. The inactive second keyboard is in Group 2. |
| `com.android.shell` | The ADB connection |
| `android`, `com.android.systemui`, `com.android.bluetooth`, WebView, the permission controller, the package installer, `com.android.providers.*`, network and mainline modules | Core system |
| The current launcher (`com.google.android.tvlauncher`) | Don't disable it before the new launcher is installed, set as default and verified with a reboot: black screen. |

## Candidates
First check which of these are actually installed and which are running in RAM. The list was compiled from TCL community guides; some may not exist on this firmware and other names may show up.

**Group 1: most likely unnecessary** (still in groups of at most 10, with tests)
- `com.tcl.bootadservice`: boot ad service
- `com.tcl.esticker`: store/demo sticker
- `com.tcl.bi`: probably usage data and analytics
- `com.tcl.messagebox`: TCL notification box
- `com.tcl.usercenter`: TCL account center
- `com.tcl.partnercustomizer`, `com.tcl.partnercustomizer.resource`: manufacturer/partner recommendations on the home screen
- `com.tcl.appmarket2`: TCL app store
- `com.tcl.smartalexa`: Alexa
- `com.tcl.notereminder`, `com.tcl.copydatatotv`, `com.tcl.dashboard`, `com.tcl.useragreement`
- Preinstalled streaming apps I don't use (e.g. `tv.wuaki.apptv` Rakuten TV, `com.iqiyi.i18n.tv.tcl` iQIYI)
- `com.google.android.videos` (Play Movies), `com.google.android.play.games`, `com.google.android.feedback`, `com.google.android.tv.bugreportsender`, `com.android.dreams.basic`, `com.android.printspooler`, `com.android.bips`
- After the launcher change (Phase 5): `com.google.android.tvrecommendations` (recommendation rows)

**Group 2: depends on my usage** (ask these questions in one message)
- Do I watch live TV (satellite/antenna)? Even if the answer is no, don't touch `com.tcl.tv`; only consider the extra broadcaster apps.
- Do I play video, music or photos from a USB stick? → `com.tcl.ui_mediaCenter`, `com.tcl.videoplayer`, `com.tcl.audioplayer`, `com.tcl.gallery`
- Do I cast from my phone with Chromecast? → `com.google.android.apps.mediashell`
- Do I use Google Assistant or voice search? → `com.google.android.katniss`
- Do I use the TCL phone app (T-Cast/MagiConnect)? → `com.tcl.MultiScreenInteraction_TV`, `com.tcl.magiconnectfree`
- Do I want the screensaver (Ambient)? → `com.google.android.backdrop`
- Which streaming apps do I use? (Netflix, Prime Video, YouTube Music, YouTube Kids, local apps)
- The inactive second keyboard: `com.tcl.inputmethod.international` or `com.google.android.leanback.ime`
- TCL software updates (`com.tcl.versionUpdateApp`): keep enabled by default
- Screen reader: `com.google.android.marvin.talkback`

**One by one, at the end, tested with a reboot** (only if they use noticeable RAM)
- `com.tcl.overseasappshow`: TCL's regional app manager. If packages you disabled come back on their own after a reboot, this is the most likely cause; on this TV it was disabled without problems.
- `com.tcl.tvweishi` or `com.tcl.guard`: Probably TCL's "TV Guard / Safety Guard" app (the name varies by version). On some versions it manages which apps may start automatically; it can affect whether the launcher comes up at boot.
- `com.tcl.common.terminalmanagerplus`: Probably TCL's remote service/management agent. A 2020 security study found remote management capabilities in TCL's TerminalManager app; a privacy candidate.
- `com.tcl.waterfall.overseas`: Reports conflict. Some TCL models disabled it without problems, on others it caused boot hangs.
- `com.tcl.appstatecontroller`: Unclear purpose; ask me if it runs and uses RAM.

Note: On this firmware, persistent system apps can start again at boot even when disabled. Disabling them may not free any RAM; first check whether they actually run after boot.

## Steps

### Phase 0: Connection
- Check whether `adb` is installed; if not, install it for my OS (Windows: Google platform-tools plus PATH, macOS: `brew install android-platform-tools`, Linux: `sudo apt install adb`).
- `adb connect <IP>:5555`. The TV will show "Allow USB debugging?"; tell me, and I'll tick "Always allow from this computer" and confirm. If you can't connect and the TV has a separate "Wireless debugging" option, pair with `adb pair`.
- Record the values of `getprop ro.build.version.release`, `ro.product.model` and `ro.build.fingerprint`.

### Phase 1: Backup and baseline (into the `00-before/` folder)
- Packages: `pm list packages -f`, `-s`, `-3`, `-d`
- Settings: `settings list global`, `settings list secure`, `settings list system`
- Home screen and keyboard: `cmd package resolve-activity --brief -a android.intent.action.MAIN -c android.intent.category.HOME`, `cmd package query-activities --brief -a android.intent.action.MAIN -c android.intent.category.HOME`, `dumpsys role` (Android 11 has no `cmd role get-role-holders`), `settings get secure default_input_method`
- Memory: `cat /proc/meminfo` (MemAvailable) and the full `dumpsys meminfo` (Total/Free/Used RAM plus the first 30 lines of "Total PSS by process")
- Storage: `df -h /data`
- Compilation state: the status of my most-used apps in `dumpsys package dexopt` (verify, quicken, speed-profile…)
- Launch time: 3 cold starts each for YouTube (and Netflix if present) (`am force-stop`, then `am start -W`; find the component with `cmd package resolve-activity --brief -c android.intent.category.LEANBACK_LAUNCHER <package>`). Record the median TotalTime.
- Smoothness: `dumpsys gfxinfo <launcher-package> reset` for the current launcher, navigate the home screen for 20 seconds, then record the "Janky frames" percentage and the 90th/99th percentile frame times. Manual navigation differs every time; for a before/after comparison use a fixed key sequence with `input keyevent`.
- Take measurements 2 minutes after a reboot. Right after boot, Play Store and Play Services run updates, so memory figures fluctuate.
- Optional: listening TCP ports, `netstat -tln` (if that fails, `/proc/net/tcp` and `tcp6`).

### Phase 2: Classification
Sort all packages into three groups and show a table: (1) unnecessary, (2) depends on my usage, (3) do not touch. Columns: package, what it is, running now, RAM (PSS), your recommendation. Put the ones running in the background and using RAM at the top. Ask the Group 2 questions in one message.

### Phase 3: Settings (save the previous values)
- Halve the animations: `settings put global window_animation_scale 0.5`, `settings put global transition_animation_scale 0.5`, `settings put global animator_duration_scale 0.5`
- If I don't want a screensaver: `settings put secure screensaver_enabled 0`
- Optional, ask me first: Private DNS to block ads and trackers: `settings put global private_dns_mode hostname` and `settings put global private_dns_specifier dns.adguard-dns.com`. Then have me test the apps I use. If the internet stops working or an app won't open, roll it back (ADB keeps working on the local network).

### Phase 4: Disabling packages
Disable the Group 1 and Group 2 packages I approved, starting with the biggest RAM users, in groups of at most 10 and one at a time within a group. After each group, reboot, confirm the packages stayed disabled, take a quick RAM measurement and have me run the test list. Leave the "one by one" packages for the end.

### Phase 5: Launcher change (Projectivy Launcher)
Projectivy rather than FLauncher: it has a ready-made "Inputs" row that shows the HDMI inputs. The order matters:
1. Open the Play Store page on the TV: `am start -a android.intent.action.VIEW -d "market://details?id=com.spocky.projengmenu"`. I'll press "Install"; confirm the install with `pm list packages`.
2. Open Projectivy once; I'll do its first-run setup. Permission to read TV listings is needed for the "Inputs" row; file and notification access and usage reporting are not.
3. Make it the default home screen: `cmd role add-role-holder android.app.role.HOME com.spocky.projengmenu`, then verify with `resolve-activity`. If that doesn't work, try `pm set-home-activity <component>`. Keep Projectivy's accessibility-based "override launcher" feature as a last resort: it reportedly stops working after a reboot on TCL TVs. Note: even when the role moves to Projectivy, the Home key may keep opening the old launcher, because the HOME filter of `com.google.android.tvlauncher` has a higher priority. In that case step 5 is required.
4. Reboot. Have me test whether Projectivy comes up at boot and on the Home key, and whether the Source key and HDMI switching work.
5. If everything works, disable the old launcher (`com.google.android.tvlauncher`) and `com.google.android.tvrecommendations`, so the Home key can no longer open the old home screen. If the HOME candidates include packages that aren't launchers (settings, TV service), don't touch them; ask me.
6. Reboot again and repeat the tests from step 4. If Projectivy doesn't come up at boot, check the auto-start permissions in the TCL Guard/Safety Guard app.
7. Make Projectivy lighter. With default settings it drew about 53 frames per second even while idle: Appearance > Background > Launcher wallpaper: None; Image transition: Fade; Cards > Focused card > Glow animation and Frame effect: None. On this TV, janky frames on the home screen dropped from 48.9% to 2.1%.

### Phase 6: Cache and compilation
- If `/data` is more than 85% full, run `pm trim-caches 999G`. (The `1G` in online guides does nothing: on Android 11 this command exits without deleting anything if at least 1 GB is already free.)
- `cmd package bg-dexopt-job`: runs now the app compilation the system is supposed to do while idle. Since the TV mostly sits in standby, this job may never have run. It can take a while; run it in the background, tell me not to turn the TV off, and when it finishes compare the states with `dumpsys package dexopt`.

### Phase 7: Final measurement
Reboot the TV, wait 2 minutes and repeat the Phase 1 measurements (measure smoothness in Projectivy). Before/after table: MemAvailable, Free/Used RAM, number of running processes, YouTube cold start, janky frames percentage, free space on `/data`, (if measured) number of listening ports.

### Phase 8: Wrap-up
- Write a rollback script for my OS (`rollback.ps1` on Windows, `rollback.sh` on macOS/Linux): re-enable the packages in `disabled.txt` in reverse order with `pm enable`, restore the settings to their previous values, and make the old launcher the default again if needed.
- Give me: the before/after table, the list of disabled packages (one sentence each), and a one-line rollback command.
- Run `adb disconnect` and remind me to turn off USB debugging on the TV; I'll turn it back on when needed.
- Last resort: a factory reset re-enables every disabled package (this state is kept on the `/data` partition).

## Test list (have me run it after every group)
1. Source/Input on the remote: does the source menu open and can you switch to HDMI?
2. Does live TV (if I use it) open?
3. The settings key on the remote: do the picture and sound menus open?
4. Sound: TV speakers, volume keys, soundbar/ARC if present
5. Do YouTube and Netflix open and play?
6. Does the on-screen keyboard appear in a search box?
7. Does the Home key go to the right home screen?
8. Reboot after risky groups: `adb reboot`, then reconnect with `adb connect` and wait until `getprop sys.boot_completed` is 1. Does it boot normally?

If I'm not at the TV, automate these tests over ADB: the focused window after the Source key, HDMI switching via `persist.sys.curInput`, YouTube playback via `media_session`, the on-screen keyboard via `mInputShown`, and the crash and ANR logs. I'll check picture and sound quality by hand when I'm back.

## Later sessions
When this folder is opened again, read `CHANGELOG.md` first. If I say "roll back", use `disabled.txt` and the saved setting values.

## Appendix: Türksat "No signal" (after the 15–16 August 2026 switchover)
This has nothing to do with the cleanup, but it happened in the same period. If a channel scan finds hundreds of channels but some of them show "No signal":
1. From the live TV settings, open the channel scan and go to **Auto Scan > Satellite setup**. To open it directly over ADB: `am start -n com.tcl.tv/.chscan.AutoScanActivity`. On this TV, the start frequency of the "Turksat TKGS 42.0E" entry was 11096 MHz / Vertical / 30000 and the signal showed 0%: the TV was trying to fetch the channel list from a frequency that had been switched off.
2. Replace it with a working frequency. On this TV, 12303 MHz / Vertical / 27500 gave 100% signal. Frequencies can change over time; check the current value in Türksat's frequency list.
3. Run the auto scan again with "Scan mode: All". On this TV it found 779 digital channels and the channels played. If a single channel is still missing, scan that channel's frequency separately with Manual scan.
