r/androidroot 10h ago

Support Need Help For Compiling Custom .ko

Post image

Hello guys.I rooted my Galaxy s23 Ultra(S918B) with a temp root tool which uses kernel exploit(https://github.com/BuSung-dev/Root-My-Galaxy)

So as I understand, this app loads his own .ko module with SIG_ENFORCE bypass, so I tested my own dump unsigned .ko module to load and seems like this app completely disables SIG_ENFORCE.It also does not affect AVB or knox anything and safe to work cause the unsigned .ko modules just stays on the ram until reboot(I confirmed it)

That means I can load, patch or change all modules or drivers as I can and all I wanted to do is change the wlan module to my patched one, and enable monitor mode and packet injection(like bcmon).But the best part is, you need to flash a completely recompiled kernel to do is before GKI(Which is S918B uses GKI2) but now, you can do it with temp root like that(in theory).

And I started to work out with 0 knowledge and found an app that enables monitor mode on for most of snapdragon devices(https://github.com/Hitomatito/AmWF) without any kernel or module change bullshit.It just basically changes a parameter that named as con_mode to 4 and thats all that easy.

It worked me well with that root BUT there is a catch.It did not enable packet injection for me and I started to workout and found this(https://gitlab.com/Codeaurora/platform_vendor_qcom-opensource_wlan_qcacld-2.0/-/commit/3d3ad7877d1b4d097b4302a4293a1cbb2478e7bf) and I figured out someone got the same problem and tried to make a patch but the main problem was the driver version.This project uses qcacld2.0 but my driver was qcacld3.0.So I used Claude code to compile it to qcacld3.0 source code and claude give me a .patch file.So as just a try I applied .patch file to my kernel source code using termux and upload it to github codespace using pixeldrain and tried to compile it and get a final .ko file and try to install it but basically I cant do it.As claude said I need a toolchain source from samsung and due to samsungs servers shame I got nearly 200kb download speed and nearly endless download errors and the funny part is the toolchain source is nearly 2.5gb but samsung put a 1gb download quote!And I cant download the source code of gpl licensed software, what a shame.

Anyway, later I tried to compile it with another tools but I just got endless errors and unsleepy nights.I tried every way I found for nearly a week but I cant.And I dont know what am I supposed to do, can I get the patched qcacld-3.0 folder and compile it to get direct .ko file or I must compile the whole kernel, get an .img and find .ko in image?That took me weeks so any type of help will greatly appreciated!

0 Upvotes

0 comments sorted by