-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- 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.
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
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 -b kernelsu-next-susfs --depth 1 --recurse-submodules --shallow-submodules https://github.com/androidk26/Redmi-Note-10-Kernel.git sunny-modNote
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.
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-modExecute the command:
sed -i 's/TGI=1/TGI=0/' kramel.shExecute the build script:
CI=0 OTA=0 RELEASE=0 bash kramel.sh img mod mkzipand 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-*.zipThere are two methods to install this modified kernel build:
- Method A: By patching boot.img and flash it through fastboot.
- Method B (rooted): By directly flashing anykernel3 zip file through kernel flasher.
- A compatible Redmi Note 10 (sunny/mojito) Unlocked bootloader
- A Linux environment (for Method A: patching boot.img)
Requirements:
- Linux environment
you can use one of these: Linux Distro (PC), WSL2 (PC), or Termux (Android)
- Update your linux environment packages for better performance and latest features:
for Linux distro and WSL2
sudo apt update && upgrade -yfor Termux (android)
pkg update && upgrade -y
In this guide, we are using Magiskboot from Magisk-v*.apk. Download here
- Change the file extension .apk of Magisk-v*.apk file to .zip and extract libmagiskboot.so
Note
Note that you should use a compatible libmagiskboot.so inside magisk depending on your system ARM:
for Linux distro and WSL2
/lib/x86_64/libmagiskboot.so`
for Termux (android)
(Sunny) newer device: /lib/arm64-v8a/libmagiskboot.so legacy / old device: /lib/armeabu-v7a/libmagiskboot.so
- Rename and remove file extension of libmagiskboot.so to magiskboot
- Make it executable:
chmod +x ~/magiskboot-
Extract NetErnels-sunny-*.zip from your kernel building output directory: sunny-mod/anykernel3-sunny/NetErnels-sunny-*.zip or from your downloads if you have downloaded a release from this repository.
-
Change directory where your magiskboot is located.
cd path/to/your/magiskboot- Unpack your target boot.img
./magiskboot unpack path/to/your/boot.imgYou will now see some files unpacked from boot.img
boot.img
kernel
ramdisk.cpio
...
...-
Replace the file named kernel with file named Image from your extracted NetErnels-sunny-*.zip
-
Rename the newly placed file Image to kernel
-
Repack the boot.img
./magiskboot repack boot.imgYou will now see newly modified boot named: new-boot.img
boot.img
kernel
ramdisk.cpio
new-boot.img
...- Flash the newly modified boot.img to device bootloader
Note
If you were ever renamed the new-boot.img, flash it according to its new name.
fastboot flash boot boot.imgImportant
Your device should be already rooted for this procedure to work.
-
Copy your newly build kernel or the downloaded flashable kernel zip from this repository to your device.
-
Download the latest Kernel Flasher
-
Check your active boot partition slot Slot Suffix using Kernel Flasher
-
Tap View on your active slot
-
Tap Flash, then tap Flash AK3 Zip
-
Locate and select your copied NetErnels-sunny-*.zip
-
Reboot