kernel-hook-framework icon indicating copy to clipboard operation
kernel-hook-framework copied to clipboard

Crash on ARM64 Android

Open zrose584 opened this issue 1 year ago • 2 comments

Hi, there seems to be a general problem with "unprotecting" the kernel regions / making them writable on newer android kernels. At least it is mentioned at different places, e.g.:

Stackoverflow Android 12 kernel 4.14.190 https://github.com/m0nad/Diamorphine/issues/37

The dmesg.log

I am using 4.14 (had to make a few adjustments to the code). On another phone with kernel 4.4 I had no issue hijacking some kernel symbols.

zrose584 avatar Sep 14 '23 20:09 zrose584

Hi, Thanks for reporting the issue.

Do you know if the issue can be reproduced on other linux distros(fedora/debian/ubuntu etc) other than android?

Frankly I didn't follow the android development recently, so this project hasn't been tested on android for quite sometime. And I doesn't get a android 12 phone at hand and it would be time consuming to install a android emulator...

Anyway, I will look into the issue when I have time. Thanks!

liutgnu avatar Sep 15 '23 01:09 liutgnu

Do you know if the issue can be reproduced on other linux distros(fedora/debian/ubuntu etc) other than android?

No, I don't know. If you have powerful-enough arm64 hardware, maybe this can be reproduced using genymotion - they have some arm64 images: https://support.genymotion.com/hc/en-us/articles/9511224511901-Which-Android-versions-are-available-

And I doesn't get a android 12 phone

Fwiw, Kernel 4.14 seems to be used as early as Android 10 in some devices

The project bmax121/KernelPatch looks interesting, but I am not sure if it uses a (new) way to disable this "additional protection", or it just patches the kernel memory before those additional protections got activated (the project patches the kernel image file and hooks into the very early init phases)

zrose584 avatar Sep 15 '23 09:09 zrose584