Magisk/APatch module source for the Lenovo TB371FC (Lenovo Legion Tab / Xiaoxin Pad Pro 12.7, Snapdragon 870) running a Treble GSI. It was developed against the Evolution X Android 16 GSI release dated 2025-09-02.
- Forces a tablet form factor, landscape boot animation, and a 36dp tablet status bar.
- Removes the Wi-Fi tablet's visible Phone/SIM/carrier UI without deleting shared telephony framework files.
- Enables the real ambient-light sensor and a conservative brightness curve.
- Raises the broken GSI AOD/doze brightness default.
- Enables the TB371FC pen switch and four-channel speaker route.
- Keeps double-tap-to-wake enabled through deep idle, where this Lenovo touch driver can lose its write-only gesture flag.
- Keeps Android window-level blur enabled across boot.
- Installs a small foreground Hall-cover listener. It has no launcher entry; APatch root is used only for the sleep/wake key events.
Freeform/desktop windowing is intentionally disabled. This EvoX build shows the switch but its SystemUI/Shell path breaks minimization. The tablet taskbar and large-screen status bar remain enabled.
- Build the flashable module as described in Building.
- Flash its ZIP from Magisk or APatch, then reboot.
- On the first cover open/close event, allow the
dev.monefiera.gsi.coverroot request in APatch.
The cover helper starts after boot and after module updates. It deliberately does not expose a Google Launcher or Recents entry. It still appears in Android Settings > Apps, which is necessary for a real installed boot receiver.
The repository does not ship extracted framework-res.apk, platform-signing
keys, or private font files.
Required inputs:
- Android SDK Build Tools (tested with 34.0.0).
- The exact
framework-res.apkfrom the target GSI. - An overlay signing key/certificate accepted by that GSI.
- JDK 17 and Gradle 8.6 for the cover helper.
- Optional Topology Sans TTF files in
assets/fonts/; these are deliberately ignored by Git. Omit them if you do not have redistribution rights. Building with them also requires PythonfontTools; the build normalizes their Android vertical metrics to avoid excessive default line height.
Set the inputs and run:
export FRAMEWORK_RES_APK=/path/to/framework-res.apk
export RRO_PK8=/path/to/platform.pk8
export RRO_PEM=/path/to/platform.x509.pem
export ANDROID_BUILD_TOOLS=/path/to/android-sdk/build-tools/34.0.0
export JAVA_HOME=/path/to/jdk-17
./scripts/build-module.shThe ZIP is written to dist/. The script compiles the static framework RRO
against the supplied framework resources and packages the cover helper APK.
service.sh guards all kernel writes by ro.product.device=TB371FC. Do not
flash it on another Y700-family tablet: its audio mixer indices are device and
kernel specific. The telephony packages are disabled for user 0 rather than
uninstalled, so they can be restored with pm enable.
The module cannot remove the bootloader's software integrity warning; that is outside Magisk/APatch's systemless mount scope.
- monefiera/Lenovo-Legion-Tab-GSI-FIX
- reindex-ot/LegionY700-GSI-Fix_MOD
- phhusson/treble_experimentations
MIT. The files under assets/fonts/, extracted framework APKs, and signing
keys are intentionally not part of this repository and are not covered by
this license.