Skip to content
This repository was archived by the owner on Nov 1, 2025. It is now read-only.

ESK-Project/gki_kernel_builder

Repository files navigation

GKI Kernel Builder

codecov Telegram

Effortlessly building Android Generic Kernel Image (GKI).


Table of Contents


Requirements

  • Linux
  • Python 3.12

System packages:

  • Debian-based

    sudo apt update
    sudo apt install --no-install-recommends \
      bc bison ccache curl flex git tar wget aria2 jq make
  • Fedora

    sudo dnf install bc bison ccache curl flex git tar wget aria2 jq make

Install uv (python package manager):

curl -LsSf https://astral.sh/uv/install.sh | sh
uv --version

Ensure Python 3.12 installed

Note

If your distro already ships Python 3.12, you can skip this step.

uv python install 3.12
uv run -p 3.12 -- python -V    # should print 3.12.x

Setup Kernel Builder

  1. Clone the repository:

    git clone --recurse-submodule https://github.com/bachnxuan/gki_kernel_builder.git
    cd gki_kernel_builder
  2. Set up venv:

    uv sync --frozen --no-install-project
    source .venv/bin/activate

    Once you are finished working with the project, disable the virtual environment (venv) via deactivate.

Build the kernel

Builds are performed via the custom wrapper script cli.sh

Setup Environment

Note

PAT scopes (read and write): workflow, content

  1. Rename .env.template to .env
  2. Fill in the GH_TOKEN in .env

Quick Start

To build your kernel with default configuration:

./cli.sh build

CLI Structure

The CLI consists of the following commands:

  • build - Configure and compile the kernel

  • clean - Clean up build artifacts

View all available options:

./cli.sh --help

Example Commands

Build KernelSU NEXT with SUSFS (no LXC):

./cli.sh build -k NEXT -s

Build SukiSU with LXC without SUSFS:

./cli.sh build --ksu SUKI --no-susfs --lxc

GitHub Workflows

  1. Fork this repo to your GitHub account.

  2. Add secret GH_TOKEN

    • PAT scopes (read and write): workflow, content
    • Add PAT access to your release and kernel builder repo
    • Repo → Settings → Secrets → Actions → New secret.
  3. Optional Telegram secrets

Note

Add the below Telegram secrets below when you want to notify completed build on Telegram. The Telegram notify feature can be config via NOTIFY on workflows_dispatch and workflows_call input.

  • TG_BOT_TOKEN – Telegram Bot Token
  • TG_CHAT_ID – Telegram Chat ID

Configuration

Warning

If you build a GKI kernel for devices other than xaga (ESK Kernel), set LXC to false or remove the LXC function entirely.

Customize your build by:

  • config/config.py – Contains kernel configuration settings.
  • config/manifest.py – Specifies repository sources and branches.
  • kernel_builder.py – The main script responsible for orchestrating the build.

Note

See the dedicated guide for more information: Kernel Builder Configuration guide


License

This project is distributed under the GNU GPL v3. See LICENSE for details.

About

An android12-5.10 kernel builder

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •