cat ./work/zuxfree.md

ZUXFree

A clean-room, reversible toolkit that strips China-only bloat from the Lenovo Legion Y700 Gen 4 — root module, LSPosed hooks and a firmware pipeline.

Role
Solo — research, engineering, release
Type
Personal project
Year
2026
Status
in development
  • Shell
  • Kotlin
  • LSPosed
  • Python
  • GitHub Actions
  • Android
Cover card: ZUXFree — systemless, reversible, clean-room

The problem

The Legion Y700 Gen 4 (TB322FC) is a great small tablet that ships only with Lenovo’s China ROM, and there’s no official global firmware. Removing the China-only apps over adb doesn’t stick, because ZUI quietly turns them back on at every boot. The existing community tool was closed and bundled firmware. I wanted something open, auditable and fully reversible.

What I built

ZUXFree is a family of four repos, each attacking the problem at a different layer:

  • zuxfree, a root module for Magisk, KernelSU or APatch. It hides 13 system apps systemlessly with empty overlay directories, removes 20 user apps by exact package name, and records each removal in a ledger. On every boot it re-checks for apps an OTA brought back. Uninstalling restores everything, with a fallback path when the normal restore isn’t available.
  • ZUXFree Xposed, my fork of miner7222’s DeZUXposed LSPosed module (MIT), written in Kotlin. It flips ZUI feature flags at runtime and hooks Settings, Launcher, Game Assistant, Gallery and Wallpaper. A verification script checks all 13 hook targets against real firmware dex files.
  • zuxfree-addon, a Python pipeline with its own small parser for Android’s super partition. It inventoried 300 APKs and packages seven Google-signed apps from Lenovo’s official global firmware, with a SHA-256 provenance file for every one.
  • zuxfree-rom, a firmware-level debloat that only deletes files from a manifest, then re-signs the image so it boots on a locked bootloader.

Hard parts

  • Bootloops teach rules. Two early ROM builds that patched framework.jar bootlooped. The project now has a hard rule, debloat by deleting files, never patch code, and a validation gate fails the build unless framework.jar is byte-identical to stock. It’s one of 13 gates.
  • Don’t strand the user. Switching off ZUI’s own installer with no replacement left the device with no way to install apps at all. v1.1.0 only disables ZUI’s installer and permission screens when a Google replacement is actually present, and that policy has unit tests.
  • Testing a root module without a device. 30 assertions run against a simulated device with fake pm, getprop and resetprop. ShellCheck, the tests and the build all run in CI, and every release ships with a checksum.

Outcome

The root module (v0.1.0 pre-release) and the LSPosed module (v1.1.0) are published on GitHub, with CI and checksummed releases. Real-hardware testing of the module and the ROM is the next milestone, so this is honestly labelled in development.