KernelSU
KernelSU copied to clipboard
Supporting x86/x86_64
Hi, I just read about the project and I really like it. I am maintaining BlissOS and currently looking for a better root solution than the old Superuser made by koush. But looking at the codes, it seems like the project only support arm64 so far, are there any plan for x86/x86_64 ? I can help you test with x86_64 if you want.
x86_64 is feasible and I will try it, but 32bit arch such as x86 and arm is unsupported
thanks
x86_64 support is added in https://github.com/tiann/KernelSU/commit/0d8785ec789ee71392af4bc35aceaeac91c24956, could you test it with the latest commit?
ok, by the way I can only test SELinux in permissive because this is Android-x86
If it is permissive, may this cause bootloop?
if you make that hack then it might be, iirc we can't even get SurfaceFlinger running with enforcing
https://github.com/tiann/KernelSU/commit/280660125faec888b9703eb8fdaa8565c90554fa keeps permissive if it is

I compiled the kernel module and the app, but the app said not detected......... does that mean I have to compile the userspace su too ?
If you build the manager app yourself, you should also change this to the apk's signature: https://github.com/tiann/KernelSU/blob/main/kernel/apk_sign.c#L115
The signature ensure only the manager can allow/disallow root request, you can try my build(it's the builtin app-release.apk.zip signature)
You can modify this line https://github.com/tiann/KernelSU/blob/main/kernel/apk_sign.c#L79 and read the dmesg to get your EXPECTED_SIZE and EXPECTED_HASH.
The signature ensure only the manager can allow/disallow root request, you can try my build(it's the builtin app-release.apk.zip signature)
I tested this and it still not working, but on dmesg it show this

You can modify this line https://github.com/tiann/KernelSU/blob/main/kernel/apk_sign.c#L79 and read the dmesg to get your EXPECTED_SIZE and EXPECTED_HASH.
Thanks
The signature ensure only the manager can allow/disallow root request, you can try my build(it's the builtin app-release.apk.zip signature)
I tested this and it still not working, but on dmesg it show this
The system doesn't have /data/adb directory?
It does but it got mounted in this stage
https://git.osdn.net/view?p=android-x86/bootable-newinstaller.git;a=blob;f=initrd/init;h=f8b5378151f2816afabb622c0b1f4698504f932c;hb=refs/heads/r-x86#l208 https://git.osdn.net/view?p=android-x86/bootable-newinstaller.git;a=blob;f=initrd/scripts/2-mount;h=9cce018c1b672e820720d0ee282946b10ff8b122;hb=refs/heads/r-x86#l10
show some load_allow_list open "/data/adb" failed -2 is OK, when /data/ is mounted, it wouldn't show
This log is actually waiting /data to be mounted.
by the way, a small request
can you limit the manager app to only compile x86_64 and arm64 lib ? to avoid in case the system use x86/arm libs instead
by the way, a small request can you limit the manager app to only compile
x86_64andarm64lib ? to avoid in case the system use x86/arm libs instead
Sure, please try this build: https://github.com/tiann/KernelSU/actions/runs/3709915866
The app does run but su still not working, here is what I got on dmesg.
https://github.com/hmtheboy154/Darkmatter-kernel/tree/umbral This is how I integrate it into my kernel
Does the kernel have CONFIG_KPROBES enabled?
Does the kernel have
CONFIG_KPROBESenabled?
it haven't, and when compile it show this
ld.lld: error: undefined symbol: task_stack_page
>>> referenced by ld-temp.o
>>> vmlinux.o:(sh_user_path)
I'm including linux/sched/task_stack.h to sucompat.c right now, I'll see if that help
Maybe you should enable CONFIG_THREAD_INFO_IN_TASK?
I turn that on already

It compiled and works perfectly
I also made a PR, can you check it, I don't know if older kernel have task_types.h like this
guess we should close this issue, x86_64 is working now
![]()
It compiled and works perfectly
I also made a PR, can you check it, I don't know if older kernel have
task_types.hlike this
Hello, I see that your Android x86 is using Linux kernel 5.15. Do you have any available source code? The 5.15 kernel compiled by myself does not work, and the system graphical interface does not refresh
Hello, I see that your Android x86 is using Linux kernel 5.15. Do you have any available source code? The 5.15 kernel compiled by myself does not work, and the system graphical interface does not refresh
Which Android version are you trying to build ?