-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
porting KernelSU to android kernel3.18 failed #539
Comments
KernelSU does not support kernels below version 4.4. If you are interested, you can try it on your own, but this requires some kernel-related knowledge, as some features may not be available on lower versions of the kernel. It is not as simple as compiling the source code. |
If anyone in the future is searching for 3.18, i have managed to get it working on my samsung galaxy S7 with 3.18.140 Notes : This only compiles with Werror disabled, there are few casting errors in ksu_handle_prctl , apk_sign check_block and few others i did not have the urge to fix, but i assume they will cause errors later on. Also it works while having Selinux enforcing so thats nice. I also tested some modules like Zygisk on kernelSU and youtube-revanced-magisk Thanks @tiann for kernelSU, it is amazing and i have been using it on pretty much all my phones. EDIT : To be able to use Zygisk / LSPOSED and co, you need to upstream OverlayFS and related vfs/fs : Here For easier reading, look in this commit range : Here You mainly need : VFS and friends : VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(de… The most difficult however is you need LSM_HOOKS which was not in my 3.18 kernel, i was able to pick it from 4.4 kernel source, but it needed some work From how to implement on non GKI FInally i need to edit the fetcher because 3.18 has different headers for input (we dont split input codes) we also needed uaccess header and AIO header for kiocb
ROOT testModuleModule after OverlayFS update |
Update, For module support to work on 3.18 (Zygisk for example) it wont initialize properly and would not mount, the solution in my case was upstreaming ovl (overlayfs) and whatever dependencies it needed in FS, i found it easy to cherry-pick directly from 4.4 kernel source. Range i picked : https://github.com/ananjaser1211/Cronos_8890//compare/3b260b125e3eb9508e9110043d795554215ec8cf...cab7f2b816073fcfe64543b21a44253a1697b7c6 This made zygisk work and made modules like LSposed work, i do notice in log when using Zygisk there is a CMD 12/13 error
I think its something in the REGS but i dont know how to read them yet, works otherwise. |
@ananjaser1211 sorry to hijack but does #1464 work on 3.18? |
Describe the bug
A clear and concise description of what the bug is.
porting KernelSU to android kernel3.18 failed
To Reproduce
Steps to reproduce the behavior:make ARCH=arm64
O=../out
CLANG_TRIPLE=aarch64-linux-gnu-
CROSS_COMPILE=$HOME/aarch64-linux-android-4.9>
CROSS_COMPILE_ARM32=$HOME/arm-linux-androidea>
Expected behavior
A clear and concise description of what you expected to happen.
build complete
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
CC drivers/input/touchscreen/of_touchscreen.o
/home/synaptic/linux-3.18/drivers/kernelsu/ksu.c: In function 'kernelsu_init':
/home/synaptic/linux-3.18/drivers/kernelsu/ksu.c:60:2: warning: #warning ("KPROBES is disabled, KernelSU may not work, please check https://kernelsu.org/guide/how-to-integrate-for-non-gki.html") [-Wcpp]
error, forbidden warning: ksu.c:60
make[3]: *** [/home/synaptic/linux-3.18/scripts/Makefile.build:257: drivers/kernelsu/ksu.o] エラー 1
make[2]: *** [/home/synaptic/linux-3.18/scripts/Makefile.build:402: drivers/kernelsu] エラー 2
make[2]: *** 未完了のジョブを待っています....
CC drivers/irqchip/irq-gic-common.o
/home/synaptic/linux-3.18/drivers/kernelsu/allowlist.c: In function 'do_load_allow_list':
/home/synaptic/linux-3.18/drivers/kernelsu/allowlist.c:175:3: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
error, forbidden warning: allowlist.c:175
make[3]: *** [/home/synaptic/linux-3.18/scripts/Makefile.build:257: drivers/kernelsu/allowlist.o] エラー 1
make[2]: *** [/home/synaptic/linux-3.18/scripts/Makefile.build:402: drivers/kernelsu] エラー 2
make[2]: *** 未完了のジョブを待っています....
CC drivers/iommu/iommu-sysfs.o
The text was updated successfully, but these errors were encountered: