tiann / KernelSU

A Kernel based root solution for Android
https://kernelsu.org
GNU General Public License v3.0
10.05k stars 1.64k forks source link

Configs are not going into effect for KernelSU #100

Closed akash07k closed 1 year ago

akash07k commented 1 year ago

I'm trying to build my kernel with KernelSU and have defined the config in the device_defconfig file as per the documentation. But still, when I'm trying to build it, I'm getting the error: #error("CONFIG_KPROBES must be enabled for KernelSU!") Any pointers on this please? Below are the flags which I'm putting in my defconfig file:

CONFIG_KPROBES=y
CONFIG_HAVE_KPROBES=y
CONFIG_KPROBE_EVENTS=y
hmtheboy154 commented 1 year ago

your kernel doesn't have kprobes ?

akash07k commented 1 year ago

Oh, so what can be done in this case? I followed the second way too about patching the files manually, but after that too I get the same error.

your kernel doesn't have kprobes ?

hmtheboy154 commented 1 year ago

check Kconfig and remove depends on Kprobes

akash07k commented 1 year ago

You mean KernelSU configs?

check Kconfig and remove depends on Kprobes

akash07k commented 1 year ago

You mean KernelSU configs?

check Kconfig and remove depends on Kprobes

I removed that. Still the same error regarding Kprobes.

config KSU
    tristate "KernelSU module"
    default y
        depends on OVERLAY_FS
    help
    This is the KSU privilege driver for android system.

config KSU_DEBUG
    tristate "KernelSU module debug mode"
    default n
    depends on KSU
    help
    This enables debug mode for KSU
Ylarod commented 1 year ago

If you append this to your defconfig, you should make xxx_defconfig Kconfig is for make menuconfig. If you patch your kernel, comment this #error in code

akash07k commented 1 year ago

Ok, I'm trying. actually my device's defconfig file name is munch_defconfig so I was adding these configs to that file. Should I create another defconfig file with these values if I don't want to comment the error in the code?

--Edit: for now I have removed Kprobe check lines from the source. It built successfully. Will check if it works or not

If you append this to your defconfig, you should make xxx_defconfig Kconfig is for make menuconfig. If you patch your kernel, comment this #error in code

natsumerinchan commented 1 year ago

Have you enabled CONFIG_MODULES? It is required for KPROBE.

akash07k commented 1 year ago

Ah, no, I will try that. for now I manually patched the source.

On 1/22/2023 9:39 PM, セリカ・シルフィル wrote:

Have you enabled |CONFIG_MODULES|? It is required for KPROBE.

— Reply to this email directly, view it on GitHub https://github.com/tiann/KernelSU/issues/100#issuecomment-1399531996, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQWBM5ZPNV4TGCIE3VSNIDWTVLS3ANCNFSM6AAAAAAUCM36BQ. You are receiving this because you authored the thread.Message ID: @.***>