Skip to content

About

Native hardware-control suite for Xiaomi Rodin (POCO X7 Pro / Redmi Turbo 4), built with Flutter and Rust.

Topics

Resources

Stars

23 stars

Watchers

1 watching

Forks

Repository files navigation

Rodin Essential

Rodin Essential is a native hardware-control application for Xiaomi Rodin (POCO X7 Pro / Redmi Turbo 4) and its MediaTek Dimensity 8400-Ultra platform. It combines an Android NativeActivity, a Flutter AOT interface, a Rust host runtime, and a separately privileged Rust daemon. The UI and hardware-control logic remain native/AOT. A small, framework-only DEX adapter provides the Quick Settings bypass tile and Android predictive Back callbacks; it contains no AndroidX, Compose or third-party managed libraries.

The APK never runs as root, does not use the system UID, and does not request privileged Android permissions. Kernel and vendor controls are owned by the daemon and reached through authenticated local transports restricted to the installed application UID.

Supported target

  • Device codename: rodin
  • SoC: MediaTek MT6899 / Dimensity 8400-Ultra
  • CPU: 8× Cortex-A725 (4+3+1 policies), up to 3.25 GHz
  • GPU: Mali-G720, 7 cores, up to 1300 MHz
  • ABI: ARM64
  • Android: API 31 or newer
  • Kernel userspace: 16 KB page-compatible native binaries
  • Vendor dependencies: Rodin touch and display AIDL services plus MediaTek GED

This is device-specific software. Other devices are rejected by the root-module installer and are not supported by the included AOSP policy.

Main features

  • Four persistent GPU performance profiles with live hardware readback.
  • Mali devfreq range, governor, GED boost, power-policy, and OPP controls.
  • CPU core mask, independent cluster governors, and validated per-cluster minimum/maximum or sustained exact-lock controls sourced from the live kernel OPP table.
  • UFS scheduler selection across every detected UFS logical unit.
  • Touch profiles for 240 Hz native timing, 480 Hz native timing, and the original v1.18.0 one-millisecond Android output stream generated from the native 480 Hz source.
  • Xiaomi touch/display AIDL integration, color modes, expert calibration, sunlight mode, HDR/video controls, resolution, and density controls.
  • ZRAM size, algorithm, swappiness, compaction, charging, and power telemetry.
  • Kernel-supported bypass charging with Immediate or 20/40/80/90% thresholds, daemon-owned persistence and measured battery-flow reporting.
  • Whole-app hardware-control pause and reset, plus OEM Control defaults for touch response and display colour/temperature.
  • System Colors: Android Material You seed palettes, wallpaper reset, style previews, and capability-based native color readback without a HyperOS, ColorOS, or AOSP ROM-name allowlist.
  • Daemon-owned persistence and background reassertion after boot, screen wake, vendor resets, app force-close, or removal from recents.
  • Configurable in-app motion timing with native 120 Hz frame pacing.
  • Per-App Controls: foreground touch, refresh-rate, CPU and GPU overrides, with saved profiles and global/ROM restoration. Starts disabled; system apps are hidden by default.
  • Memory DVFS & UFS: supported dynamic ranges, exact driver-policy requests and OEM Reset. These are session controls, recovered to originals after daemon restart or reboot.
  • Bypass Charging Quick Settings/Control Center tile with direct access to Charging Control on long-press.

Screenshots

The redesigned interface groups live device telemetry and hardware tuning into focused panels for each subsystem.

Home dashboard
Home - Device Pulse and quick controls
Control hubs
Control Hubs - Hardware subsystem navigation
CPU controls
CPU - Core and frequency control
GPU controls
GPU - Mali profiles and GED
Touch controls
Touch - Response profiles
Display controls
Display - Color and HDR tuning
Battery controls
Battery - Charging telemetry
ZRAM controls
ZRAM - Memory compression
Diagnostics
Diagnostics - Runtime health checks
Support and project information
Support - Community and safety information
System Colors
System Colors - Material You palette control
Advanced Configuration
Advanced Configuration - CPU governors and device tuning
Resolution controls
Resolution - Canvas, density, and refresh settings
Additional screen 1
Additional Screen 1 - Device configuration
Additional screen 2
Additional Screen 2 - Device configuration
Updated System Colors
System Colors - Updated palette controls

Performance profiles

Profile GPU range and governor GED / power policy CPU behavior
Stock Balanced Vendor-managed 260–1300 MHz, dummy GED off, coarse_demand Unchanged; controlled separately
Gaming Dynamic 260–1300 MHz, simple_ondemand GED on, always_on Unchanged; controlled separately
Battery Saver 260–598 MHz, powersave GED off, coarse_demand Unchanged; controlled separately
Extreme Beast Fixed 1300 MHz, performance, DVFS off GED on, always_on Unchanged; controlled separately

GPU profiles never modify CPU governors, CPU clock ranges, or CPU core state. Vendor CPU and platform thermal services remain running in every mode. Gaming Dynamic and Extreme Beast override the Mali cooling constraint and can still cause extreme heat, rapid battery drain, instability, or an emergency hardware shutdown.

Custom CPU ranges remain separate from GPU profiles and governors. While at least one custom CPU range is active, the daemon selects Rodin's OEM thermal-nolimits configuration so Xiaomi's userspace policy cannot replace an exact lock with a lower ceiling. It keeps the thermal services alive, remembers the configuration that was active beforehand, and restores it when the final custom CPU range is reset.

Integration choices

Method APK privilege Backend Persistence
AOSP ROM integration Normal app UID Root init daemon /data/system/rodin-essential/state.conf
KernelSU Next or Magisk Normal app UID Root module daemon /data/adb/rodin-essential/state.conf
Standalone APK Normal app UID None Hardware controls unavailable

For a ROM release, use the AOSP integration. It installs the APK and daemon in /product, creates a dedicated app SELinux domain, restricts the control socket to that domain, starts the daemon after boot, and restores saved state without a root manager.

See AOSP ROM integration for the complete maintainer workflow and Architecture for runtime details.

Build from source

Required tools:

  • Linux host
  • Flutter SDK and revision-matched Flutter engine checkout
  • Rust toolchain with aarch64-linux-android
  • Android SDK, platform 36, build-tools, and NDK r27 or newer
  • JDK 17 or newer, ninja, zip, unzip, and standard ELF tools

Build the pinned engine once:

rustup target add aarch64-linux-android
./tools/build-flutter-engine.sh

Build without touching a connected device:

RODIN_BUILD_ONLY=1 ./build-and-install.sh

Output is written under out/release/<timestamp>/. The build verifies Flutter analysis, ARM64 AOT output, the restricted platform DEX adapter, APK signing, 16 KB ZIP alignment, 16 KB ELF segment alignment, and a content stamp covering the packaged Flutter assets and ICU data. If no signing key is supplied, a stable development key is created once under the ignored out/signing/ directory and reused by later local builds.

For release signing, set:

RODIN_KEYSTORE=/absolute/path/release.jks \
RODIN_KEY_ALIAS=release \
RODIN_KEYSTORE_PASS='store-password' \
RODIN_KEY_PASS='key-password' \
RODIN_BUILD_ONLY=1 ./build-and-install.sh

Export for an AOSP tree

RODIN_KEYSTORE=/absolute/path/rom-app.jks \
RODIN_KEY_ALIAS=rodin-essential \
RODIN_KEYSTORE_PASS='store-password' \
RODIN_KEY_PASS='key-password' \
  ./tools/export-aosp-bundle.sh

The generated dist/aosp/RodinEssential-<timestamp>/ directory contains the APK, daemon, control client, Android.bp, init service, split product/vendor SELinux policy, the APK public certificate used by the dedicated app-domain mapping, and checksums. Keep the same private key for every ROM update; the private key is never copied into the bundle.

To build, stage, and wire the integration into an existing ROM source tree in one command, provide the Rodin product makefile and BoardConfig path:

RODIN_KEYSTORE=/absolute/path/rom-app.jks \
RODIN_KEY_ALIAS=rodin-essential \
RODIN_KEYSTORE_PASS='store-password' \
RODIN_KEY_PASS='key-password' \
  ./tools/integrate-aosp-rom.sh /absolute/path/to/aosp \
    device/xiaomi/rodin/device.mk \
    device/xiaomi/rodin/BoardConfig.mk

The helper creates vendor/rodin-essential, verifies the complete build, and adds the two exact include lines only when absent. It refuses paths outside the selected source tree and never replaces an existing integration directory. Passing only the AOSP root keeps the previous stage-only behavior.

KernelSU Next and Magisk module

For an existing rooted ROM, build the combined application and daemon module:

RODIN_KEYSTORE=/absolute/path/release.jks \
RODIN_KEY_ALIAS=release \
RODIN_KEYSTORE_PASS='store-password' \
RODIN_KEY_PASS='key-password' \
  ./tools/build-kernelsu-next-module.sh

Install the ZIP from KernelSU Next Manager or the Magisk app while Android is running. The installer registers the bundled APK as an ordinary user app and the module runs only the separate hardware daemon as root. No live SELinux patch, system overlay, privileged-app conversion, or app-to-root socket rule is used. The direct Unix transport uses SO_PEERCRED. ROMs that block cross-domain Unix connectto use a root-privileged localhost port instead; the app first proves from its own UID/SELinux context that low-port binding is denied, and the daemon resolves the accepted client's UID from /proc/net/tcp before serving a command. A daemon-initiated Unix path remains as a compatibility fallback. Module Action reports which authenticated transport completed instead of treating a root-only control-client ping as proof. The package uses skip_mount; because it overlays no partition files, KernelSU does not require a metamodule. Recovery installation is not supported.

Keep the signing key for every future module update. Android rejects an APK update signed by a different certificate. The first release after the signing identity reset includes a one-time migration for module installations: it tries a normal update first and only removes/reinstalls the user application when Android reports a certificate mismatch. Hardware profiles stored under /data/adb/rodin-essential remain intact, while application-local preferences reset once. Later releases signed by the retained key update normally.

The same ZIP can also act as a temporary update layer over a ROM-native Rodin Essential installation when that ROM APK uses the same signing certificate as the release APK. The installer updates the app without clearing its data, the module daemon reuses /data/system/rodin-essential, and native init is stopped before the module daemon starts. Removing the module rolls the app back to the ROM copy and restarts the native service. A differently signed ROM build is rejected without uninstalling the app or deleting its data; that build must be updated through its maintainer's OTA or original signing key.

Repository layout

android/
  aosp/                 AOSP prebuilt, init, and SELinux integration template
  kernelsu-next/        KernelSU Next and Magisk module source
  package/              Manifest and Android resources
  platform/             Minimal Android tile and Back callback adapters
docs/                   Architecture, build, and ROM maintainer documentation
runtime/
  daemon-rust/          Privileged hardware backend and control client
  flutter-engine/       Embedder header and ignored pinned engine prebuilts
  host-rust/            NativeActivity, Flutter embedder, JNI, and IPC bridge
tools/                  Engine, AOSP export, and module build scripts
ui/flutter/             Flutter AOT interface

Documentation

License

Licensed under the Apache License, Version 2.0. See LICENSE.

About

Native hardware-control suite for Xiaomi Rodin (POCO X7 Pro / Redmi Turbo 4), built with Flutter and Rust.

Topics

Resources

Stars

23 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages