Skip to content

About

Systemless proximity and raise-to-wake compatibility fix for RealmeUI ports on Redmi Note 14 Pro 5G / POCO X7 (malachite).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Malachite Sensor Fix

Systemless proximity and raise-to-wake compatibility fix for Redmi Note 14 Pro 5G / POCO X7 (malachite) running a RealmeUI/ColorOS port.

Build Release

What it fixes

Proximity sensor

The malachite vendor image already contains:

  • /vendor/lib64/hw/sensors.elliptic.so
  • /vendor/etc/elliptic_sensor.xml

However, sensors.elliptic.so is missing from /vendor/etc/sensors/hals.conf. Android consequently exports no type-8 proximity sensor and the framework reports mProximitySensor=null.

The KernelSU/Magisk module mounts a corrected HAL configuration before SensorService starts. This exposes the stock wake-up capable Elliptic Proximity sensor without modifying the vendor partition.

Raise to wake

The Xiaomi sensor HAL exposes pickup as vendor type 33171036 (xiaomi pick up sensor), while the RealmeUI port expects a different Oplus/Android sensor path. No listener is registered when the screen turns off.

The LSPosed companion registers Xiaomi's wake-up pickup sensor together with Oplus' wake monitor and wakes the display only when:

  • the Realme Raise-to-wake toggle is enabled;
  • the display is not already interactive; and
  • proximity is not near.

It uses the sensor hub's wake-up sensor and does not poll the accelerometer.

Included UI cleanup

The companion also neutralizes porter branding on About Device:

  • version label: 7.0
  • update status: Version up to date
  • high-contrast white text/shadow for the card background

These are secondary cosmetic changes; the project is primarily a sensor compatibility fix.

Requirements

  • Device: malachite
  • RealmeUI/ColorOS port based on the tested Android 16 build
  • KernelSU Next, KernelSU, Magisk, or APatch
  • Zygisk-compatible LSPosed

Installation

  1. Download Malachite-Sensor-Fix-v2.1.0.zip from Releases.
  2. Install the ZIP from KernelSU/Magisk/APatch.
  3. The installer automatically installs the companion APK.
  4. Open LSPosed and enable Malachite Sensor Fix.
  5. Select only these scopes:
    • Settings (com.android.settings)
    • System UI (com.android.systemui)
  6. Reboot once.
  7. Enable Raise to wake in Settings.

LSPosed intentionally does not allow third-party installers to silently enable a module. The one-time enable/scope step is required for a fresh installation. Updates retain the existing scope automatically.

Verification

adb shell dumpsys sensorservice | grep -A2 -i "Elliptic Proximity"
adb shell dumpsys display | grep -A3 -i "mProximitySensor="
adb shell dumpsys sensorservice | grep -A2 -i "pickup.*connections"

Expected results include:

Elliptic Proximity | Elliptic Labs | type: android.sensor.proximity(8)
pickup Wakeup (handle=0x00000019, connections=1)

Safety

Android 16 intentionally aborts system_server if sensor handles change after SensorService has started. Therefore:

  • the module configures the HAL only during post-fs-data;
  • it never restarts Sensor HAL after Android finishes booting;
  • uninstall takes effect on the next reboot.

Do not manually restart vendor.sensors-hal-multihal after boot.

Uninstall

  1. Disable Malachite Sensor Fix in LSPosed.
  2. Uninstall/disable the KernelSU or Magisk module.
  3. Reboot.
  4. Optionally uninstall the companion APK:
adb uninstall com.ridhzlabs.abouthook

The legacy package ID is retained so existing installations update in place without losing their LSPosed scope.


Bahasa Indonesia

Malachite Sensor Fix adalah perbaikan systemless untuk proximity dan Raise-to-wake pada Redmi Note 14 Pro 5G / POCO X7 (malachite) yang memakai port RealmeUI/ColorOS.

Penyebab

  • Library proximity Elliptic sebenarnya tersedia di vendor, tetapi tidak dimuat oleh hals.conf. Akibatnya Android menganggap proximity tidak ada.
  • Sensor pickup Xiaomi memakai tipe vendor 33171036, sedangkan framework RealmeUI mencari jalur sensor yang berbeda. Akibatnya tidak ada listener saat layar mati.

Cara pasang

  1. Flash ZIP melalui KernelSU/Magisk/APatch.
  2. APK companion dipasang otomatis.
  3. Buka LSPosed dan aktifkan Malachite Sensor Fix.
  4. Centang scope Settings dan System UI saja.
  5. Reboot sekali.
  6. Aktifkan Angkat untuk membangunkan di Settings.

Untuk instalasi pertama, enable dan scope LSPosed tetap harus dilakukan manual. Update berikutnya mempertahankan scope lama secara otomatis.

Penghapusan

Nonaktifkan companion di LSPosed, uninstall module root, lalu reboot. Jangan restart Sensor HAL secara manual setelah Android selesai boot.

License

MIT. See LICENSE.

About

Systemless proximity and raise-to-wake compatibility fix for RealmeUI ports on Redmi Note 14 Pro 5G / POCO X7 (malachite).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages