One example is that there are patches for Android kernels to allow rooting the phone with maximum discretion in order to bypass integrity checks. Unfortunately manufacturers modify Linux sources so sloppily that diffs never apply cleanly and you have to endlessly fix hunk rejects.
I created Coccinelle patches that can universally apply to any Linux kernel between 3.18 and 5.15. It has been tested over 100+ Linux kernel sources from Android phone manufacturers and works flawlessly! https://github.com/devnoname120/kernelsu-coccinelle
The learning curve is steep (documentation is thin so you have to look at the code), but the rewards are well worth it. I compiled a list of conferences, slides, and examples to get started if anyone is interested: https://github.com/devnoname120/kernelsu-coccinelle#how-to-l...