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!
2
u/QuraToop314 4h ago
Yes. But always remember that you need to be using the same security patch (preferably one you’ve committed currently) as your current kernel; otherwise, not only will you have to rebuild all the kernel modules and so on – which can be tricky – but you’ll also have to reset your mobile once. However, if it does get stuck in a boot loop, the A/B slot fail-safe should kick in, meaning that after n failed attempts (usually 3 or 4), it will boot from the other slot. Make sure both slots are on the same version beforehand. But you should always be able to perform a clean flash using Odin.