Skip to content
androidk26 edited this page Apr 18, 2026 · 5 revisions

Detailed guide for building and installation of custom kernel for Redmi Note 10 (sunny/mojito)

🛠️ Buiding the kernel

Pre-requisites

  • A proper and fast internet connection
  • A PC/Cloud Computer running Linux OS (Ubuntu/ArchLinux/*) (for WSL2 please refer to wiki/guide on setting up kernel building environment).
  • A better processor (better the processor, lower the compile times).
  • Around 15 GB free space
  • Brain and patience. Keep in mind, Google is your friend, but AI is your professor, and community is your guide. You should have some experience with Linux environment and aware of how to run commands. There's no harm in trying.

Preparing the Build Environment

If you have not built a kernel on your system before, there are some packages needed for building kernel environment. You can get these installed with:

for Ubuntu/Linux Mint

curl https://raw.githubusercontent.com/akhilnarang/scripts/master/setup/android_build_env.sh | bash

for ArchLinux

curl https://raw.githubusercontent.com/akhilnarang/scripts/master/setup/arch-manjaro.sh | bash

for Fedora

curl https://raw.githubusercontent.com/akhilnarang/scripts/master/setup/fedora.sh | bash

Obtaining kernel source tree

This subsections aims at downloading and building the kernel from source. Not applicable if you are trying to develop/work on the source since you have no authority to push changes. You will have no commit history hereby and it is not advisable to work on a source with no commit history.

Run the following command to clone the source locally.

git clone --depth 1 https://github.com/androidk26/Redmi-Note-10-Kernel.git sunny-mod -b kernelsu-next-susfs

Workflow and modifications (optional)

Note

You may skip this part if you don't have any modification or changes to do.

  • Your work and modifications happens here.
  • You are free to modify and or apply changes to this kernel tree as long as you are recognizing and giving credits to the maintainer.

Building the kernel

This is the easiest part, since you are going to use cyberknight777's script to accomplish the task smoothly.

Change directory to sunny-mod folder. This is the root folder of kernel tree.

Note

You need to change the command below to point the root depending on which directory or folder you have clone the kernel tree.

cd path/to/cloned/kernel/tree/sunny-mod

Execute the command:

sed -i 's/TGI=1/TGI=0/' kramel.sh.

Execute the build script:

CI=0 OTA=0 RELEASE=0 bash kramel.sh img mod mkzip

and it will start building the kernel. Sit back and relax because this will download toolchains, flasher, and some scripts. Everything at this point depends on your internet speed and processors.

If the build is successful, obtain the flashable kernel zip from anykernel3-sunny folder inside root directory.

NetErnels-sunny-*.zip

Please refer to installation guides for flashing the kernel directly or patching the kernel into boot partition.

Clone this wiki locally