A GitHub Actions CI pipeline that builds a KernelSU-patched kernel for the Samsung Galaxy A04s (SM-A047F) and packages it as a flashable AnyKernel3 ZIP.
- ⚙️ Automated kernel compilation using Clang 17 with full LLVM toolchain
- 🛡️ KernelSU integration — patches root support directly into the kernel
- 📦 AnyKernel3 packaging — produces a flashable ZIP ready for TWRP / OrangeFox
- 🚀 Optional GitHub Release — automatically publishes the ZIP as a tagged release
- 🔧 Auto-patches Mali GPU Kconfig — fixes Samsung Exynos
shell()syntax errors at build time - 📊 Compile log upload on failure — artifacts are saved for debugging failed builds
- A GitHub account with Actions enabled
- No local setup needed — everything runs on GitHub-hosted runners
- Fork this repository to your own GitHub account.
- Go to the Actions tab and select Build Kernel with KernelSU (Samsung A04s).
- Click Run workflow and fill in the inputs:
| Input | Default | Description |
|---|---|---|
kernel_source |
SavedByLight/android_kernel_samsung_a04s |
Kernel source repo URL |
kernel_branch |
main |
Branch to build from |
kernelsu_tag |
main |
KernelSU release tag, or main for latest |
create_release |
false |
Set to true to publish a GitHub Release |
- The workflow will compile the kernel, package it, and upload the ZIP as a build artifact.
- Download the ZIP from the Artifacts section of the completed Actions run (or from Releases if you enabled it).
- Boot your Samsung A04s into TWRP or OrangeFox recovery.
- Flash the ZIP.
- Reboot to system.
- Install the KernelSU Manager APK and open it — status should show Working.
- Clones the specified kernel source at the given branch.
- Fixes script permissions and patches the Mali GPU Kconfig for Samsung Exynos compatibility.
- Downloads and integrates KernelSU via the official setup script.
- Sets up Clang 17 from ZyCromerZ/Clang.
- Configures the kernel using the A04s defconfig with KernelSU and overlay FS enabled.
- Compiles with
make -j$(nproc)using the full LLVM toolchain. - Collects DTBs and packages everything with AnyKernel3.
- Optionally creates a GitHub Release with build metadata.
| Device | Codename | Model |
|---|---|---|
| Samsung Galaxy A04s | a04s |
SM-A047F |
MIT