Releases: ravindu644/Android-Kernel-Tutorials
Kernel-Builder-v7-minimal
How to use..?
-
Download the
kernel-builder.zipfile. -
Unzip it.
-
Install Docker if it's not already installed.
-
Ubuntu/Debian based systems:
sudo apt install docker.io && sudo usermod -aG docker $USER && sudo reboot -
Fedora/RHEL based systems:
sudo dnf -y install dnf-plugins-core sudo dnf config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo systemctl enable --now docker sudo usermod -aG docker $USER sudo reboot -
Run
kernel-builder.sh, which is located inside the unzipped folder to power up the docker container :)./kernel-builder.sh
Kernel-Builder-v7-full
How to use..?
-
Download the
kernel-builder.zipfile. -
Unzip it.
-
Install Docker if it's not already installed.
-
Ubuntu/Debian based systems:
sudo apt install docker.io && sudo usermod -aG docker $USER && sudo reboot -
Fedora/RHEL based systems:
sudo dnf -y install dnf-plugins-core sudo dnf config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo systemctl enable --now docker sudo usermod -aG docker $USER sudo reboot -
Run
kernel-builder.sh, which is located inside the unzipped folder to power up the docker container :)./kernel-builder.sh
Kernel-Builder-v6-minimal
How to use..?
- Download the
kernel-builder.zipfile. - Unzip it.
- Install Docker if it's not already installed.
- In Ubuntu based systems, you can run:
sudo apt install docker.io && sudo usermod -aG docker $USER && sudo reboot
-
Run
kernel-builder.sh, which is located inside the unzipped folder to power up the docker container :)./kernel-builder.sh
Kernel-Builder-v6-full
How to use..?
- Download the
kernel-builder.zipfile. - Unzip it.
- Install Docker if it's not already installed.
- In Ubuntu based systems, you can run:
sudo apt install docker.io && sudo usermod -aG docker $USER && sudo reboot
-
Run
kernel-builder.sh, which is located inside the unzipped folder to power up the docker container :)./kernel-builder.sh
Kernel-Builder-v5-minimal
How to use..?
- Download the
kernel-builder.zipfile. - Unzip it.
- Install Docker if it's not already installed.
- In Ubuntu based systems, you can run:
sudo apt install docker.io && sudo usermod -aG docker $USER && sudo reboot
-
Run
kernel-builder.sh, which is located inside the unzipped folder to power up the docker container :)./kernel-builder.sh
Kernel-Builder-v5-full
How to use..?
- Download the
kernel-builder.zipfile. - Unzip it.
- Install Docker if it's not already installed.
- In Ubuntu based systems, you can run:
sudo apt install docker.io && sudo usermod -aG docker $USER && sudo reboot
-
Run
kernel-builder.sh, which is located inside the unzipped folder to power up the docker container :)./kernel-builder.sh
Android Kernel Tutorials 2.0
What's Changed
- docs: Refine and correcting some information by @rsuntk in #4
- Update README.md by @forsaken-heart24 in #6
- docs: Give more details about GKI and also use pre-GKI as non-GKI sub… by @rsuntk in #8
- docs: Refine languages, fix tables, and add credits to contributor(s) by @rsuntk in #9
New Contributors
Full Changelog: toolchains...guides
Ubuntu-based Docker Container for Building Kernels
How to use..?
-
Download the
kernel-builder.zipfile. -
Unzip it.
-
Install Docker if it's not already installed.
-
Run
kernel-builder.sh, which is located inside the unzipped folder to power up the docker container :)bash kernel-builder.sh
Mirrored Toolchains for compiling Kernels
Toolchains I've Used to Compile Kernels for Various Devices
How to unpack ?:
- Unpack a tar.xz file:
tar -xvf filename.tar.xz - Unpack a tar.gz file:
tar -xvf filename.tar.gz
1. Linux 4.9:
-
Tested on 4.9.227-309: proton-12, linaro-aarch64-7.5
- Usage: here
-
Tested on 4.9.227: clang-r416183b
-
Additinal notes:
CROSS_COMPILE=/path/to/clang/host/linux-x86/clang-r416183b/bin/aarch64-linux-gnu- # check the location of toolchain CC=/path/to/clang/host/linux-x86/clang-r416183b/bin/clang # check the location of toolchain
-
2. Linux 4.14:
-
Common 4.14 (For other devices like realme): clang-r383902b, arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu
-
Samsung with Knox: clang-4639204-cfp-jopp, gcc-cfp-jopp-only/aarch64-linux-android-4.9
- Tested on Linux 4.14.113 (Galaxy S10x)
- Usage: here
-
Samsung without Knox: clang-4639204, aarch64-linux-android-4.9
- Tested on Linux 4.14.113 (Galaxy M21)
-
AOSP Based Kernels (lineage): neutron-clang, arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu
- Tested on Linux 4.14.355
- Usage: here
3. Linux 4.19:
-
Tested on Linux 4.19.191: arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu, clang-r383902
- Usage: here
-
Tested on Linux 4.19.198: clang-r353983c, aarch64-linux-android-4.9
- Usage: here
4. Linux 5.4 qGKI: llvm-arm-toolchain-ship-10.0.9, aarch64-linux-android-4.9-Linux-5.4
- Tested on Linux 5.4.249
5. Linux 5.10: clang-r416183b, arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu
- Tested on Linux 5.10.198
- Usage: here
6. Linux 5.15: clang-r450784e, arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu
- Tested on Linux 5.15.123 - 5.15.149
7. Other GKI 2.0 Kernels (Linux 6.1 or higher): neutron-clang, arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu
- Usage: here
Additional Notes:
-
In MediaTek Kernels, you must use arm-gnu-toolchain-14.2.rel1-x86_64-aarch64-none-linux-gnu toolchain alongside a proper Clang compiler to make the kernel boot :)
-
Starting from March 21, 2025, all my build scripts use the ARM GNU toolchain as the
CROSS_COMPILE- Reference: here