Skip to content

Fix partial incompatibility with LineageOS #2685

@Anderhar

Description

@Anderhar

Please check before submitting an issue

  • I have searched the issues and haven't found anything relevant
  • I will upload bugreport file in KernelSU Manager - Settings - Report log
  • I know how to reproduce the issue which may not be specific to my device

Describe the bug

Currently, in certain scenarios, KernelSU relies on automatic detection of the KMI version. But LineageOS developers follow an atypical kernel naming scheme that doesn't include AndroidRelease and KmiGeneration parts.
Here's an example:
Compatible: 5.15.176-android13-8-g878bb89d69a4
LineageOS: 5.15.176-g878bb89d69a4

This leads to partial incompatibility of KernelSU with LineageOS and its derivatives (/e/OS, iodéOS, etc) and has some unwanted effects.
One of the most annoying and a bit dangerous among these effects is the need to manually select KMI on each OTA in LKM mode, which is not only inconvenient, but also involves the possibility of bootloop in case of an accidental wrong selection.

There's already at least one issue here caused by this exactly aspect of LineageOS. Unfortunately, its developers stay away from anything related to root and they are unlikely to help with this.

So here are two suggested solutions:
A. Look for another way to get the missing data for automatic KMI detection.
B. Add a persistent KMI selector to the KernelSU manager's settings to allow the user to manually set KMI once for all cases.

To Reproduce

No response

Expected behavior

No response

Screenshots

Image Image

Logs

07-17 01:13:00.823 2292 3733 D CoreBackPreview: Window{5172cdb u0 com.rifsxd.ksunext/com.rifsxd.ksunext.ui.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@31c2a8d, mPriority=-1, mIsAnimationCallback=false, mOverrideBehavior=0}
07-17 01:13:00.823 2292 3733 D CoreBackPreview: Window{5172cdb u0 com.rifsxd.ksunext/com.rifsxd.ksunext.ui.MainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@e034442, mPriority=0, mIsAnimationCallback=true, mOverrideBehavior=0}
07-17 01:13:00.866 6727 6727 I KernelSU Next: ksud::cli: command: BootInfo { command: SupportedKmi }
07-17 01:13:00.880 2292 2863 I ImeTracker: com.rifsxd.ksunext:e8571d96: onRequestHide at ORIGIN_SERVER reason HIDE_UNSPECIFIED_WINDOW fromUser false
07-17 01:13:00.881 6490 6490 D InsetsController: hide(ime(), fromIme=false)
07-17 01:13:00.881 6490 6490 I ImeTracker: com.rifsxd.ksunext:e8571d96: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
07-17 01:13:01.665 2292 2838 D ActivityManager: freezing 3626 com.android.permissioncontroller
07-17 01:13:01.673 2292 2904 D InetDiagMessage: Destroyed 0 sockets, proto=IPPROTO_TCP, family=AF_INET, states=14
07-17 01:13:01.675 2292 2904 D InetDiagMessage: Destroyed 0 sockets, proto=IPPROTO_TCP, family=AF_INET6, states=14
07-17 01:13:01.675 2292 2904 D InetDiagMessage: Destroyed live tcp sockets for uids={10192} in 5ms

Device info

  • Device: Motorola X40 (rtwo)
  • OS Version: LineageOS 21/22 (official)
  • KernelSU Version: 1.0.5
  • Kernel Version: 5.15.176-g878bb89d69a4

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions