/NetHunter-Kernels

My Library for Nethunter kernels. Xiaomi, OnePlus, Samsung ...

Primary LanguageCOtherNOASSERTION

Redmi Note 9 Pro

NetHunter Kernel by Naster17

⚠️ Warning! ⚠️

The author is not responsible for your actions!

CAN interface: Regardless of which solution you choose, it is important to keep safety in mind when working with automotive systems.
Make sure you understand all the risks and associated precautions when working with automotive systems.

👾 Features 👾

NetHunter:

  • Fxation TTL
  • Zram & Zswap
  • HackRF, Ubertooth
  • CAN interface [ What is ]
  • Built-in wifi [ monitor, frame ]
  • Work built-in bluetooth [ hci0 ]
  • Added interfaces [ ip_vti0, sit0, ip6tnl0 ]
  • HID functions [ hid, mass_storage, rndis, ... ]
  • Support RTL8150, RTL8152, RTL8192CU, RTL2830, RTL8192EU, RTL8188EUS, RTL8187[+LEDS], RTL2832[+SDR]
    Compatible: [ Firmware ]
  • Support common bluetooth adapters
  • External drivers supports [ insmod_drivers.zip ]
  • All possible NetHunter functions [ More ]

System:

  • CPU governor seted "schedutil" [ default is performance ]
  • Added all posible CPU governors [performance, powersave, ondemand, ... ]
  • EXT4 and F2FS
  • Disabled logging to reduce performance impact and leaks

How to compile kernel for Redmi Note 9 Pro (joyeuse)

1. Downloading

Create a working folder, for example kernel:

mkdir kernel
cd kernel

Download kernel source:

git clone --depth=1 https://github.com/Naster17/NetHunter-Kernels/ kernel_joyeuse

Download a compatible GCC toolchain. I used AOSP GCC 4.9 for arm64.

git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 aarch64-linux-android

Download Clang toolchain. I used Proton Clang, you can use another suitable one, for example AOSP Clang.

git clone https://github.com/kdrag0n/proton-clang.git proton-clang

2. Building the kernel

Move to the kernel folder:

cd kernel_joyeuse

All config path: arch/arm64/configs/

Setup default config:

./build.sh custj_defconfig

Setup nethunter config:

./build.sh nethunter_defconfig

Note: build.sh - a simple script that sets up environment variables and starts the compilation process.

Optional. You can tweak some kernel parameters:

./build.sh menuconfig

Compiling:

./build.sh

Compiling modules (insmod drivers):

./build_modules.sh

After you will see the archive with external drivers. [ InsmodDrivers.zip ]
Make AnyKernel3.zip:

./MakeAnyKernel3.sh

After you will see the archive. [ NasterKernel.zip ]

And now you can flash it via TWRP! 😁