trichromelibrary squoosh
This module is meant to “squoosh” (remove or compress) old TrichromeLibrary packages that build up on your device and take up space.
Description
Google added TrichromeLibrary to Android Q (Android 10) and later systems. This library is a way to save space on your device by making it more efficient. It does this by having the same core code in both the Google Chrome browser and the system’s WebView. This stops code from being duplicated.
When you install or update Chrome or WebView (which happens automatically through the Play Store), the system correctly downloads and installs the right version of TrichromeLibrary to go with it.
But there is a big mistake in this process: the Play Store does not always uninstall the old, outdated versions of the library. Over time, as you get more updates for Chrome and WebView, these old libraries build up, taking up a lot of space—exactly what the library was supposed to do in the first place.
The Technical Challenge
Cleaning these old libraries by hand is hard. To get rid of one, use the command “pm uninstall com.google.android.trichromelibrary_$version.” The hard part is finding the exact $version of the old packages.
This is difficult for two main reasons:
- Library that is not visible: TrichromeLibrary is not a regular program. Because it is a shared library, it does not show up in your device’s app list (like in “Settings > Apps”).
- Listing that is hard to find: You also can’t easily check the installed versions with the normal command “adb shell pm list libraries.”
Old Method (Root Needed): Before, a common way to find these versions was to get root access and look in the
/data/appdirectory. You can find a directory for each application here, and the folder name for TrichromeLibrary has its version number in it. We could then get the version number from the names of those folders. To read the/data/appdirectory, though, you had to have root access.
The Modern Solution
Because of feedback from the community (specifically issue#1), TrichromeLibrary-Squoosh now uses a better method that does not require root privileges.
The command “dumpsys package|grep name:c” is now used in the script. To successfully list all installed versions of TrichromeLibrary, this command only needs basic “shell privileges,” which Magisk or ADB can give.
The script then automates the cleanup logic:
- It asks the system for a list of all the
com.google.android.trichromelibrarypackages that are already installed. - It sorts the list that comes out to find the one newest version, which is the one that is being used right now.
- It goes through all the other versions it finds and runs the “pm uninstall” command on each outdated package in a systematic way.
This process makes sure that only the library that is currently needed stays, and all of the older versions that take up space are deleted.
Usage
Depending on how your device is set up, you can use this script in two ways.
1. Magisk Module (Recommended Method)
This is the “set-it-and-forget-it” solution that runs automatically for people who have Magisk, KSU, APatch, or KSU Next.
- Get the module from the latest release page.
- Install the module ZIP file using an app for superusers, like Magisk.
- Reboot your device.
After installation, the script will run on its own every time your device restarts. This will make sure that any new, old libraries are removed after system updates.
2. Manual Execution (via ADB Shell)
You can still clean up your device once using ADB from your computer if you don’t have Magisk or a similar tool.
*Turn on USB Debugging on your device (usually found in “Developer Options”).
Connect your device to your PC.
Run the command below in the terminal or command prompt on your PC:
sh -c "$(curl -sLf [https://raw.githubusercontent.com/entr0pia/trichromelibrary-squoosh/master/service.sh](https://raw.githubusercontent.com/entr0pia/trichromelibrary-squoosh/master/service.sh))"
This command gets the script’s content straight from the GitHub repository and runs it in your device’s shell, which does the cleanup. Please note that you will have to run this command again by hand in the future to clean up again.
Download Link
Module Info
- Module By
- Root SupportMagisk KernelSU APatch
- Source View on GitHub/Source
- Latest Update
- Word Counter 676
- Character Counter 6049
trichromelibrary squoosh is a Module that supports installation on Magisk, KernelSU, APATCH, KSUNext
