Skip to content

Remove the outdated TrichromeLibrary | 移除过时的 TrichromeLibrary

License

Notifications You must be signed in to change notification settings

entr0pia/trichromelibrary-squoosh

Repository files navigation

TrichromeLibrary-Squoosh

English | 中文

Remove the outdated TrichromeLibrary.

Description

As we know, Google uses TrichromeLibrary to share the same code in Chrome and Webview on Android Q+ devices to save space on the device. The Play Store will automatically install the corresponding TrichromeLibrary version when installing and upgrading Chrome and Webview, but will not uninstall the old version, which takes up a lot of storage space.

It is known that the corresponding version of TrichromeLibrary can be uninstalled through the command pm uninstall com.google.android.trichromelibrary_$version, so you can manually uninstall the version number of TrichromeLibrary. Unfortunately, Android does a poor job of shared library management. TrichromeLibrary cannot be displayed in the application list like a normal application (because it is a shared library), nor can use adb shell pm list libraries to query installed libraries version on the device.

Thanks to issue#1, TrichromeLibrary-Squoosh now uses a method that does not require root privileges. The command dumpsys package|grep name:c only needs shell privileges to run, and can get the version of TrichromeLibrary.

Old method:
Since each Android application will have its own directory under /data/app, as shown in the figure below, and the folder name of TrichromeLibrary will also append the version number, so we can search for keywords, and then extract the version number from the results. However, root access is required to access /data/app. TrichromeLibrary dirs

Usage

  1. Just like a normal Magisk module. Download it from the release page, and install it. The script will automatically check for excess Trichromelibrary and remove it after each system reboot.
  2. If you don't have a Magisk, run the follow commands on PC in adb shell:
    sh -c "$(curl -sLf https://raw.githubusercontent.com/entr0pia/trichromelibrary-squoosh/master/service.sh)"