Skip to content

Instantly share code, notes, and snippets.

@0x4f53
Last active August 25, 2024 14:25
Show Gist options
  • Save 0x4f53/27bee9a0069f7bd6a2aa9eb60bb10d1e to your computer and use it in GitHub Desktop.
Save 0x4f53/27bee9a0069f7bd6a2aa9eb60bb10d1e to your computer and use it in GitHub Desktop.
TCL TV debloater. I've tried making it as close to stock Android TV as possible without messing up too many core features of Android TV.
#!/bin/bash
bloat=()
bloat+=("com.tcl.partnercustomizer")
bloat+=("com.tcl.smartalexa") # Alexa integration for tv controls
bloat+=("com.tcl.gallery") # Gallery app
bloat+=("com.tcl.notereminder") # Notes and reminders app
bloat+=("com.google.android.videos") # Google Play Movies and TV (Doesn't get rid of homescreen recommendations)
bloat+=("com.google.android.play.games") # Google Play Games
#bloat+=("com.android.vending") # Google Play Store
bloat+=("com.tcl.MultiScreenInteraction_TV")
#bloat+=("com.tcl.tv") # Important TV elements, such as switching between HDMI and AV mode
bloat+=("com.tcl.ui_mediaCenter") # USB File explorer app
bloat+=("com.tcl.messagebox")
bloat+=("com.netflix.ninja") # Netflix TV app
#bloat+=("com.amazon.amazonvideo.livingroom")
bloat+=("tv.wuaki.apptv")
bloat+=("com.tcl.guard") # Shitty "antivirus"
bloat+=("com.tcl.tvweishi") # Homescreen service for shitty "antivirus"
bloat+=("com.tcl.t_solo")
bloat+=("com.tcl.dashboard")
bloat+=("com.tcl.tv.tclhome_master")
#bloat+=("com.google.android.tv.remote.service")
bloat+=("com.tcl.copydatatotv")
bloat+=("com.tcl.initsetup")
bloat+=("com.android.camera2")
bloat+=("com.android.messaging")
bloat+=("com.tcl.usercenter")
bloat+=("com.tcl.externaldevice.update")
bloat+=("com.tcl.useragreement")
bloat+=("com.tcl.appstatecontroller")
#bloat+=("com.tcl.micmanager") # Enables mic on TV remote
#bloat+=("com.google.android.youtube.tv")
bloat+=("com.google.android.youtube.tvmusic")
#bloat+=("com.google.android.tvlauncher") # Stock Android TV (7.0) Launcher (lightweight)
bloat+=("com.google.android.leanbacklauncher.recommendations") # "Shop" page on homescreen
#bloat+=("com.google.android.apps.tv.launcherx") # New Google TV Launcher (heavy and hated).
bloat+=("com.google.android.tvrecommendations")
bloat+=("com.google.android.marvin.talkback")
bloat+=("com.android.dreams.basic")
bloat+=("com.tcl.bi")
bloat+=("com.google.android.backdrop")
bloat+=("com.google.android.apps.mediashell")
bloat+=("com.tvos")
bloat+=("com.tcl.videoplayer")
bloat+=("com.google.android.apps.nbu.smartconnect.tv")
bloat+=("android.autoinstalls.config.tcl.device")
bloat+=("com.android.printspooler")
bloat+=("com.tcl.esticker")
#bloat+=("com.google.android.inputmethod.latin") # Gboard
# bloat+=("com.google.android.katniss") # Google Assistant overlay for TV
bloat+=("com.google.android.syncadapters.calendar")
bloat+=("com.google.android.onetimeinitializer")
bloat+=("com.google.android.partnersetup")
#bloat+=("com.google.android.gms") # Play Services
bloat+=("com.google.android.gsf")
bloat+=("com.android.providers.calendar")
bloat+=("com.tcl.keyhelp")
bloat+=("com.android.providers.contacts")
#bloat+=("com.google.android.tv.assistant") # Google Assistant
bloat+=("com.google.android.feedback")
bloat+=("com.android.providers.userdictionary")
bloat+=("com.tcl.miracast")
bloat+=("com.tcl.audioplayer")
bloat+=("com.tcl.overseasappshow")
bloat+=("com.tcl.rc.ota")
bloat+=("com.tcl.imageplayer")
bloat+=("com.tcl.pvr.pvrplayer")
bloat+=("com.tcl.appmarket2")
bloat+=("com.google.android.sss.authbridge")
#bloat+=("com.google.android.tts") # Text to speech, talks back to user
bloat+=("com.tcl.xian.StartandroidService")
bloat+=("com.tcl.versionUpdateApp")
bloat+=("com.tcl.assistant")
bloat+=("com.tcl.waterfall.overseas")
bloat+=("com.tcl.factory.view")
bloat+=("com.tcl.system.server")
bloat+=("com.google.android.tv.frameworkpackagestubs")
bloat+=("com.google.android.ext.shared")
#bloat+=("com.tcl.framework.custom") # Important TV UI elements, such as the volume controls
#bloat+=("com.google.android.permissioncontroller") # Permissions granter
#bloat+=("com.google.android.overlay.modules.permissioncontroller") # Permissions granter
#bloat+=("com.google.android.overlay.modules.permissioncontroller.forframework") # Permissions granter
bloat+=("com.google.android.overlay.modules.ext.services")
#bloat+=("com.google.android.overlay.modules.modulemetadata.forframework")
#bloat+=("com.android.location.fused") # Supports Android's location services framework
bloat+=("uk.co.freeview.mdsclient")
bloat+=("uk.co.freeview.amc_catchup")
bloat+=("com.update.appnews")
bloat+=("com.tcl.bootadservice") # Ads within tcl apps
bloat+=("uk.co.freeview.onnow")
bloat+=("au.com.stan.and")
bloat+=("uk.co.freeview.uktv")
bloat+=("uk.co.freeview.fvpconfigauth")
bloat+=("uk.co.freeview.systemdistributor")
bloat+=("uk.co.freeview.tifbridge")
bloat+=("com.linecorp.linetv")
bloat+=("uk.co.freeview.explore")
bloat+=("com.google.android.videos")
bloat+=("uk.co.freeview.bbc")
bloat+=("uk.co.freeview.ch5")
bloat+=("uk.co.freeview.itv")
bloat+=("uk.co.freeview.stv")
bloat+=("com.aos.aostv")
bloat+=("uk.co.freeview.amc_horror")
bloat+=("uk.co.freeview.ch4_vod")
bloat+=("com.graymatrix.did")
for package in "${bloat[@]}"; do
echo "> ${package}"
#adb shell cmd package install-existing $package # Uncomment this to reinstall everything you uninstalled
adb shell pm uninstall --user 0 $package
done
adb reboot
@0x4f53
Copy link
Author

0x4f53 commented Jul 21, 2024

This script tries to debloat TCL TVs running Android TV 7.0 and makes them resemble stock Android TV 7.0 as closely as possible.

Tested on: TCL BeyondTV v8-r851t02-lf1v634

Core functionality such as Google Assistant, TV input picker, TV image settings etc. still works. You can uncomment the commented lines to remove them as well.

After you're done with these, if you want to get rid of the Android TV home screen, install an app like Projectivy Launcher first, then remove the Android TV launcher by running adb shell pm uninstall --user 0 com.google.android.tvlauncher.


Inspired by:
https://sites.google.com/site/tweakradje/devices/xiaomi-mi-tv-stick

https://gist.github.com/ungeskriptet/b97929def22723f925a7ed3a295dac57

@BassMyAss
Copy link

BassMyAss commented Aug 8, 2024

DON'T DISABLE THESE:
com.tcl.waterfall.overseas - (Google TV logo bootloop hanging.)
com.android.location.fused - (Google TV logo bootloop hanging.)
com.google.android.apps.tv.launcherx - (Google TV, if you disable this you will see blank screen, without launcher UI, but the TV will still work,)

Tested on this TV:
Model: 55P635
Prodcut Ver.: V8-R51AT01-LF1V107.020689
European TCL Model

Before you try all these settings, check the firmware version on your TV settings and search for it online, then download the "Update.img".
So if you brick your TV O.S. you have an option to revive it.

@0x4f53
Copy link
Author

0x4f53 commented Aug 9, 2024

Alright, I've commented these out. Thanks for the heads up.

I tried an experiment: since I disable location access on my TV, the bootloop may have not been triggered. So I enabled it and you're right, the TV does indeed bootloop without the com.android.location.fused package (probably since the OS is looking for it if Location is enabled in settings, to finish the boot process).

However, the com.tcl.overseas.waterfall package can be disabled successfully on multiple TCL models. This is confirmed by users on this XDA thread.

@jzazo
Copy link

jzazo commented Aug 24, 2024

this script removes too many things and now my tv is not stable. How do I do a factory reset? This script is completely untested

@dearminder
Copy link

this script removes too many things and now my tv is not stable. How do I do a factory reset? This script is completely untested

What happened?
I also think it removes too mutch but don't want to mess up my setup

@0x4f53
Copy link
Author

0x4f53 commented Aug 25, 2024

@jzazo @dearminder
Guys, rule no. 1 of open-source development: don't run random things from the internet on your main/production devices. It's a bit of an unspoken rule in this community that we're not responsible if you brick your device. That being said, this is obviously unintentional. Let me know the breaking packages and I'll happily modify the script, just like @BassMyAss helped me out.

This script works on MY android TV, on my setup. The original script(s) I derived inspiration from didn't give an easy way to programatically test individual packages, so I made a script in this style so that packages can be commented out.

However, if your TV is indeed soft-bricked, there's nothing to worry about as long as you have adb and can still shell in wirelessly. Uncomment everything in the script, uncomment the first adb command and comment out the second adb command.

@jzazo
Copy link

jzazo commented Aug 25, 2024

Yeah, I learnt my lesson. I installed stock firmware as I didn't know how to reinstall uninstalled packages. Next time I will try reinstalling as you suggest. However, I don't have a production TV and a non-production one, I just have one TV with bloatware to try things on.

I don't know which packages caused issues, but google play was removed and when shutting TV off and turning it on again it started going black and flashing to launcher. It was so fast that I couldn't do a factory reset with the remote so I tried reinstalling stock. It took a while because reinstalling stock failed. I had to lower the stock version, flash twice to recover. Not nice.

After going back to latest stock, I removed these packages and things seem to be working fine, I believe they are safe to remove.

uk.co.freeview.mdsclient
uk.co.freeview.amc_catchup
uk.co.freeview.onnow
uk.co.freeview.uktv
uk.co.freeview.fvpconfigauth
uk.co.freeview.systemdistributor
uk.co.freeview.bbc_sounds
uk.co.freeview.tifbridge
uk.co.freeview.explore
uk.co.freeview.explore
uk.co.freeview.bbc
uk.co.freeview.ch5
uk.co.freeview.itv
uk.co.freeview.stv
uk.co.freeview.amc_horror
uk.co.freeview.ch4_vod
au.com.stan.and
tv.wuaki.apptv
com.tcl.messagebox
com.tcl.smartalexa
com.tcl.tv.tclhome_passive
com.tcl.MultiScreenInteraction_TV
com.tcl.guard
com.tcl.notereminder
com.tcl.tv.tclhome_master
com.tcl.usercenter
com.tcl.waterfall.overseas
com.tcl.partnercustomizer
com.amazon.amazonvideo.livingroom
com.google.android.marvin.talkback
com.google.android.tvrecommendations
com.google.android.videos
com.google.android.feedback
com.google.android.play.games
com.google.android.katniss
com.google.android.partnersetup
com.google.android.syncadapters.calendar
com.google.android.syncadapters.contacts
com.google.android.tts
com.android.printspooler
com.android.providers.calendar
com.android.providers.contacts
com.android.providers.userdictionary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment