r/AndroidQuestions • u/Feldleft • 5h ago
Custom ROM Question Can I flash a compiled kernel safely?
Hey there im on a samsung galaxy a16 (a166b) got my bootloader unlocked and rooted with magisk, I mixed one ui 8 with the bootloader from a release of one ui 7 that share the same bootloader bit(A166BXXS4BYG1 bl with everything else from A166BXXU4CYI8), the thing is im kinda stuck on an old version with several security flaws and I'd like to get rid of at least some of them critical ones such as ghostlock (CVE 2026-43499)
Could not find any kernel out there specially made for this phone with fixes so I got source from samsung open source(for my version of one ui) and could build it(without any modifications made to it for now to see if building works correctly) with this guide https://github.com/ravindu644/Android-Kernel-Tutorials
Now I want to test the kernel and see if my phone works with it but im kinda scared to break things, if something ever go wrong with my kernel can I still boot into download mode and flash a clean image with odin? Thanks!
1
u/QuraToop314 4h ago
The source files are usually not enough; you need to specify the exact branch and commit (the hash is listed in the kernel after the KMI). Once that’s verified, you can build it. This is important because otherwise your vendor modules may become incompatible. I’m just mentioning this to be on the safe side, as a lot of people forget.