Skip to content

Instantly share code, notes, and snippets.

@ungeskriptet
Last active March 16, 2024 18:17
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ungeskriptet/b97929def22723f925a7ed3a295dac57 to your computer and use it in GitHub Desktop.
Save ungeskriptet/b97929def22723f925a7ed3a295dac57 to your computer and use it in GitHub Desktop.
TCL TV debloater
#!/usr/bin/sh
set -e
TEMP_DIR=tmp-tcl-debloater
KODI_URL=https://mirrors.kodi.tv/releases/android/arm/kodi-20.1-Nexus-armeabi-v7a.apk
FLAUNCHER_URL=https://gitlab.com/flauncher/flauncher/-/releases/0.18.0/downloads/flauncher-0.18.0.apk
MATERIALFILES_URL=https://f-droid.org/repo/me.zhanghai.android.files_31.apk
BLOAT=$(cat <<EOF
com.tcl.partnercustomizer
com.tcl.smartalexa
com.tcl.gallery
com.tcl.notereminder
com.google.android.videos
com.google.android.play.games
com.android.vending
com.tcl.MultiScreenInteraction_TV
com.tcl.ui_mediaCenter
com.tcl.messagebox
com.netflix.ninja
com.amazon.amazonvideo.livingroom
tv.wuaki.apptv
com.tcl.guard
com.tcl.t_solo
com.tcl.dashboard
com.google.android.tv.remote.service
com.tcl.copydatatotv
com.tcl.initsetup
com.android.camera2
com.android.messaging
com.tcl.usercenter
com.tcl.externaldevice.update
com.tcl.useragreement
com.tcl.micmanager
com.google.android.youtube.tv
com.google.android.youtube.tvmusic
com.google.android.tvlauncher
com.google.android.tvrecommendations
com.google.android.marvin.talkback
com.android.dreams.basic
com.tcl.bi
com.google.android.backdrop
com.google.android.apps.mediashell
com.tvos
com.tcl.videoplayer
com.google.android.apps.nbu.smartconnect.tv
android.autoinstalls.config.tcl.device
com.android.printspooler
com.tcl.esticker
com.google.android.inputmethod.latin
com.google.android.katniss
com.google.android.syncadapters.calendar
com.google.android.onetimeinitializer
com.google.android.partnersetup
com.google.android.gms
com.google.android.gsf
com.android.providers.calendar
com.tcl.keyhelp
com.android.providers.contacts
com.google.android.tv.assistant
com.google.android.feedback
com.android.providers.userdictionary
com.tcl.miracast
com.tcl.audioplayer
com.tcl.overseasappshow
com.tcl.imageplayer
com.tcl.pvr.pvrplayer
com.google.android.sss.authbridge
com.google.android.tts
com.tcl.xian.StartandroidService
com.tcl.versionUpdateApp
com.tcl.assistant
com.tcl.waterfall.overseas
com.tcl.factory.view
com.tcl.system.server
com.google.android.tv.frameworkpackagestubs
com.google.android.ext.shared
com.google.android.permissioncontroller
com.google.android.overlay.modules.permissioncontroller
com.google.android.overlay.modules.permissioncontroller.forframework
com.google.android.overlay.modules.ext.services
com.google.android.overlay.modules.modulemetadata.forframework
com.android.location.fused
EOF
)
read -p "TCL IP: " TCL_IP
adb connect $TCL_IP | grep -q fail && echo "Unable to connect to TCL TV" && false
mkdir -p $TEMP_DIR
echo "Downloading Kodi"
wget $KODI_URL -O $TEMP_DIR/kodi.apk
echo "Installing Kodi"
adb install $TEMP_DIR/kodi.apk
echo "Downloading FLauncher"
wget $FLAUNCHER_URL -O $TEMP_DIR/flauncher.apk
echo "Installing FLaucher"
adb install $TEMP_DIR/flauncher.apk
echo "Downloading Material Files"
wget $MATERIALFILES_URL -O $TEMP_DIR/materialfiles.apk
echo "Installing Material Files"
adb install $TEMP_DIR/materialfiles.apk
echo "Grating permission for Material Files"
adb shell pm grant me.zhanghai.android.files android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant me.zhanghai.android.files android.permission.WRITE_EXTERNAL_STORAGE
rm -r $TEMP_DIR
for package in $BLOAT
do
echo "Disabling ${package}"
adb shell pm uninstall --user 0 $package
done
echo "Rebooting TV"
adb reboot
@mimmo9669
Copy link

Hey, thanks for your efforts!
can you please provide some instructions on how to run the sh file on the TV? i tried everything on my TCL 65C639 but it just doesn't respond..

@gvtenberg
Copy link

gvtenberg commented Jan 15, 2024

Hey, thanks for your efforts! can you please provide some instructions on how to run the sh file on the TV? i tried everything on my TCL 65C639 but it just doesn't respond..

Did you succeed? I haven't tried to use this script, since my TV model is different.

I was able to disable some apps after I did this:

  1. installed android-tools-adb and android-tools-fastboot on a Linux PC;
  2. connected both PC and TV to the same network;
  3. enabled USB debug in the TV;
  4. ran the command adb connect TV_IP:5555 where TV_IP is the TV IP address;
  5. ran adb shell
  6. ran pm list packages to see which packages are installed on my TV
  7. ran pm uninstall -k --user 0 PACKAGE_NAME where PACKAGE_NAME is something like com.google.android.play.games or any package from the package list

@mimmo9669
Copy link

@gvtenberg
no! I wasn't able to run the script, but i basically did most of the steps that you did except I did It through a software called adb appcontrol with a UI and not cmd :D
but be careful which apps you decide to disable/uninstall or you might break the tv like i did:

  • com.android.location.fused will straight up send you to the recovery and force you to reset the tv
  • com.tcl.tv will mess up your remote functions

these are just some examples

@Blazko381
Copy link

com tcl.tv is for tuner DVB-T2, DVB-S2...Without this you can't watch channels! Guard app is required to enable or disable auto start apps, relevance start permission must be enabled for all apps. Ofc manager in both must be turn off(With on, tv manages these settings)

@dgita24
Copy link

dgita24 commented Feb 13, 2024

@gvtenberg no! I wasn't able to run the script, but i basically did most of the steps that you did except I did It through a software called adb appcontrol with a UI and not cmd :D but be careful which apps you decide to disable/uninstall or you might break the tv like i did:

  • com.android.location.fused will straight up send you to the recovery and force you to reset the tv
  • com.tcl.tv will mess up your remote functions

these are just some examples

Would you please be able to post a list of all apps that might 'break' tv.
Looking to uninstall as many TCL apps as possible from my TV but unsure of what most of them actually do or if they are needed.
I've seen com,.tcl.tv mentioned several times on different sites but not much info on anything else really
Thanks!!

@kernelzeroday
Copy link

@gvtenberg no! I wasn't able to run the script, but i basically did most of the steps that you did except I did It through a software called adb appcontrol with a UI and not cmd :D but be careful which apps you decide to disable/uninstall or you might break the tv like i did:

  • com.android.location.fused will straight up send you to the recovery and force you to reset the tv
  • com.tcl.tv will mess up your remote functions

these are just some examples

Would you please be able to post a list of all apps that might 'break' tv. Looking to uninstall as many TCL apps as possible from my TV but unsure of what most of them actually do or if they are needed. I've seen com,.tcl.tv mentioned several times on different sites but not much info on anything else really Thanks!!

I was able to disable all apps with tcl in their package name besides tcl.tv, and the only thing disabling that did was kill my remote's power button. it seems that's the only one needed. would be nice to reimplement whatever it's doing without the rest of the tcl junk in their tv app

@dgita24
Copy link

dgita24 commented Feb 23, 2024

@gvtenberg no! I wasn't able to run the script, but i basically did most of the steps that you did except I did It through a software called adb appcontrol with a UI and not cmd :D but be careful which apps you decide to disable/uninstall or you might break the tv like i did:

  • com.android.location.fused will straight up send you to the recovery and force you to reset the tv
  • com.tcl.tv will mess up your remote functions

these are just some examples

Would you please be able to post a list of all apps that might 'break' tv. Looking to uninstall as many TCL apps as possible from my TV but unsure of what most of them actually do or if they are needed. I've seen com,.tcl.tv mentioned several times on different sites but not much info on anything else really Thanks!!

I was able to disable all apps with tcl in their package name besides tcl.tv, and the only thing disabling that did was kill my remote's power button. it seems that's the only one needed. would be nice to reimplement whatever it's doing without the rest of the tcl junk in their tv app

Thanks for that reply. Think I'll go ahead and disable the rest of the tcl apps I haven't yet disabled.

@kernelzeroday
Copy link

@gvtenberg no! I wasn't able to run the script, but i basically did most of the steps that you did except I did It through a software called adb appcontrol with a UI and not cmd :D but be careful which apps you decide to disable/uninstall or you might break the tv like i did:

  • com.android.location.fused will straight up send you to the recovery and force you to reset the tv
  • com.tcl.tv will mess up your remote functions

these are just some examples

Would you please be able to post a list of all apps that might 'break' tv. Looking to uninstall as many TCL apps as possible from my TV but unsure of what most of them actually do or if they are needed. I've seen com,.tcl.tv mentioned several times on different sites but not much info on anything else really Thanks!!

I was able to disable all apps with tcl in their package name besides tcl.tv, and the only thing disabling that did was kill my remote's power button. it seems that's the only one needed. would be nice to reimplement whatever it's doing without the rest of the tcl junk in their tv app

Thanks for that reply. Think I'll go ahead and disable the rest of the tcl apps I haven't yet disabled.

I was concerned that removing one of the tcl apps was causing instability on my tv remote, but i got a brain flash and realized bad batteries can cause repeated or delayed inputs! tested my remote batteries and they were about to die, new batteries and everything is running amazing. fyi i disabled a few google services too, both android tv home and android tv core services, opting to use projectivity launcher. projectivity accessibility service would NOT start until i started removing tcl services, and once i swapped default launcher to projectivity and disabled google home it was working as the default and MUCH snappier ui not just on the home launcher but inside of apps like youtube and jellyfin. I used the ADB TV app to disable, for some reason using adb shell pm disable failed while the ADV TV app from play store was able to successfully disable TCL apps and services. Of note, there are a few services that seemed scary to remove such as the tcl service with BT in the name, remote was fine after removing that, autopair, remote still worked fine, i removed every single item that had "tcl" in it besides tcl.tv and all functions remained intact. i recommend removing the android tv home and the android tv home core services. I'm on a "C06_2k_US" model according to projectivity launcher. If you have any interest in reversing the power button feature let me know!

@kernelzeroday
Copy link

Update: I was wrong, just noticed i don't have any of my TV inputs available anymore. will update when i determine responsible package.

@mimmo9669
Copy link

Update: I was wrong, just noticed i don't have any of my TV inputs available anymore. will update when i determine responsible package.

@kernelzeroday this happened to me too 😅, it's suppose to be either com.tcl.tvinput or com.android.inputdevices, or both!
hope that helps

@kernelzeroday
Copy link

kernelzeroday commented Mar 5, 2024 via email

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