Skip to content

v1.2.3

Latest

Choose a tag to compare

@bcrtvkcs bcrtvkcs released this 21 Feb 00:24
· 56 commits to 16.0 since this release
6a2bbdc

What's New?

  • ROM-side changes. Here's is the changelog.
  • Fix brightness stuck at 100%: disable sysfs HBM for AMB670YF01
  • Fix (susfs): add missing devpts hook and remove deprecated sus_su
  • Cleanup (kernelsu): remove __NR_statx from syscall hook manager

Commits: 1dd56ed a894cf3 c0a6c81

Fix brightness stuck at 100%: disable sysfs HBM for AMB670YF01

Root cause identified via debug logging: crDroid framework writes
hbm_mode=1 to /sys/kernel/oplus_display/hbm, which triggers
dsi_display_normal_hbm_on() sending DSI_CMD_NORMAL_HBM_ON to the
panel. This sets brightness register (0x51) to 0x0EFF (max) and
puts the panel in HBM mode (0x53=0xE0). The hbm_mode guard then
blocks ALL subsequent brightness writes from userspace.

The FOD (fingerprint-on-display) HBM path works correctly via a
completely separate mechanism (oplus_dimlayer_hbm -> fingerprint_mode
-> sde_connector_update_hbm) and is not affected by this change.

Fix:

  1. Skip DSI commands in both sysfs HBM handlers for AMB670YF01
    (oplus_display_panel_set_hbm and oplus_display_set_hbm) -
    the variable is still set but no panel commands are sent
  2. Remove the hbm_mode brightness blocking guard in
    dsi_panel_update_backlight() so brightness writes always go through
  3. Remove the hbm_mode check in sde_connector_update_hbm() that
    skipped sending HBM OFF during FOD exit
  4. Remove all temporary BRIGHTNESS_DEBUG logging

Fix (susfs): add missing devpts hook and remove deprecated sus_su

  • Apply missing ksu_handle_devpts() hook in fs/devpts/inode.c that was defined in sucompat.c but never called, breaking PTY/TTY security context handling for root-granted apps
  • Remove deprecated and unused fs/sus_su.c and include/linux/sus_su.h (dead code not compiled by Makefile, marked deprecated in susfs v2.0.0)

Cleanup (kernelsu): remove __NR_statx from syscall hook manager

Remove __NR_statx from both check_syscall_fastpath() and the sys_enter handler in syscall_hook_manager.c, matching upstream KernelSU-Next which no longer intercepts statx at syscall level.

This code is dead anyway when CONFIG_KSU_SUSFS is enabled (which this kernel uses), but cleaning it up keeps us closer to upstream and removes unnecessary dead code paths.

Installation

Instructions for OnePlus 9 Pro (lemonadep)

  1. Follow the official crDroid installation guide for OnePlus 9 Pro.
  2. At the zip flashing step, flash the zip you downloaded from this repository's releases instead of the stock crDroid zip.
  3. (Optional GAaps) When asked to sideload GApps, choose 'Yes' to reboot to recovery or 'No' if you don't want gapps and want to reboot to system. Now if you choosed to install GApps, simply sideload GApps.zip the same way you installed crDroid.zip then reboot to system.
  4. After booting up, install the latest version of KernelSU Next manager on your device. Alternatively, you can use the nightly manager.
  5. (Optional) Open KernelSU Next manager and install the a meta-module for Magick Mount module management alongside OverlayFS. Hybrid Mount recommended.
  6. Install the BRENE module by rrr333nnn333 from within the manager to control SuSFS features.

In step 5, you can also use the susfs4ksu module nightly builds from sidex15, but BRENE module hides better.

If you are using Bindhosts, select Mode 0 (default) in the module settings. Otherwise, any application will be able to SEE your modified hosts file.

The prebuilt zip in Releases contains the full crDroid 12.7 ROM (latest) + ÆSIR Kernel. The installation process is identical to a standard crDroid installation. The build script retrieves the sources directly from the crDroid upstream repositories. Whenever an update is released on the official crDroid website, I rebuild the ROM and the kernel and post them in the Releases section. Alternatively, you can build the ROM with my custom kernel repository yourself.

Instructions for OnePlus 9 (lemonade)

  1. Follow the official crDroid installation guide for OnePlus 9.
  2. At the zip flashing step, flash the zip you downloaded from this repository's releases instead of the stock crDroid zip.
  3. (Optional GAaps) When asked to sideload GApps, choose 'Yes' to reboot to recovery or 'No' if you don't want gapps and want to reboot to system. Now if you choosed to install GApps, simply sideload GApps.zip the same way you installed crDroid.zip then reboot to system.
  4. After booting up, install the latest version of KernelSU Next manager on your device. Alternatively, you can use the nightly manager.
  5. (Optional) Open KernelSU Next manager and install the a meta-module for Magick Mount module management alongside OverlayFS. Hybrid Mount recommended.
  6. Install the BRENE module by rrr333nnn333 from within the manager to control SuSFS features.

In step 5, you can also use the susfs4ksu module nightly builds from sidex15, but BRENE module hides better.

If you are using Bindhosts, select Mode 0 (default) in the module settings. Otherwise, any application will be able to SEE your modified hosts file.

I can't test the OnePlus 9 (lemonade)'s prebuilt zip because I don't have the device. It probably works fine, but there might be something I don't know about. Just in case. If you would like to test it and share your results, I would be appriciate it. If you encounter a bug or want to have a feature request, please let me know.

The prebuilt zip in Releases contains the full crDroid 12.7 ROM (latest) + ÆSIR Kernel. The installation process is identical to a standard crDroid installation. The build script retrieves the sources directly from the crDroid upstream repositories. Whenever an update is released on the official crDroid website, I rebuild the ROM and the kernel and post them in the Releases section. Alternatively, you can build the ROM with my custom kernel repository yourself.

⚠️ Warning & Disclaimer ⚠️

  • NO WARRANTY. This software is provided "as-is" without any warranty of any kind, express or implied. Use at your own risk. You've been WARNED!!!
  • Device brick risk: Flashing custom kernels and ROMs can permanently brick your device. You are solely responsible for any damage to your device, data loss, eye twitching, mental blackouts, or thermonuclear war.
  • Prebuilt ZIP compatibility: The prebuilt ROM+kernel zip available in the releases section is for OnePlus 9 Pro (lemonadep) and OnePlus 9 (lemonade). The prebuilt ZIP files are NOT compatible with each other. Flashing it on an incompatible device WILL brick it.
  • For the other devices; This repository is NOT compatible to build for any other Snapdragon 888 (SM8350/Lahaina) devices.

Although everything has been tested, this project is still a work in progress and may contain bugs. If you encounter a bug, please open an issue.

If you'd like to support the project, feel free to leave a star ⭐