Git repo: https://git.zx2c4.com/kernel-assisted-superuser/about/
1. cd into your kernel tree.
2. Run this command:
curl -LsS "https://git.zx2c4.com/kernel-assisted-superuser/plain/fetch-and-patch.sh" | bash -
3. Enable CONFIG_ASSISTED_SUPERUSER=y in your config.
4. Gain root by running su.
For so many reasons, this is an awful idea and totally insecure. Don't ship kernels to your users with this enabled! I've tested this on the Pixel 3.
KernelSU - Kernel-Assisted Superuser for Android Root Shell, Kernel for all devices (see above for details)
Source Code: https://git.zx2c4.com/kernel-assisted-superuser/about/
Kernel Special Features:
Last Updated 2018-11-23