Skip to content

About

Personal Android 16 GKI 6.12.38 kernel build workflow with SukiSU-Nova.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

59 Commits

Folders and files

Repository files navigation

Bernkastel

Personal GitHub Actions workflow for building an Android 16 GKI 6.12.38 (android16-6.12-2025-09) kernel with SukiSU-Nova.

Caution

Use at your own risk. This repo exists for personal use. Flashing a custom kernel can bootloop, corrupt data, or brick your device. Always back up your stock boot image before flashing. I am not responsible if this kernel bricks, damages, or breaks your Android device in any way.

Warning

Reduced kernel security by default. To prioritize raw low-latency performance, the default workflow toggles disable several stock Android kernel hardening features and CPU mitigations:

  • disable_cpu_mitigations: defaults mitigations=off and kpti=off (disables Spectre v2, Spectre v4/SSBD, Spectre-BHB, and KPTI side-channel isolation).
  • disable_mem_hardening: disables kernel UBSAN (CONFIG_UBSAN=n) and automatic kernel stack zeroing (CONFIG_INIT_STACK_NONE=y), bypasses SLUB freelist hardening and randomization (mm/slub.c), hardened_usercopy, and KASAN_HW_TAGS, disables KFENCE sampling (CONFIG_KFENCE_SAMPLE_INTERVAL=0), and enables slab merging (CONFIG_SLAB_MERGE_DEFAULT=y).
  • disable_init_on_alloc: disables CONFIG_INIT_ON_ALLOC_DEFAULT_ON (newly allocated heap pages/objects are not zeroed by default).

All bypasses keep GKI 6.12 KMI structs and symbols intact, and any of them can be turned off individually before triggering a build if stock Android kernel hardening is desired.

What's in it

  • Base: Google ACK common-android16-6.12-2025-09 (6.12.38, arm64, HZ=1000, --lto=none)
  • Root & hiding: SukiSU-Nova HEAD (builtin branch when SUSFS is on, main when off), SUSFS (gki-android16-6.12-dev HEAD), Baseband Guard (BBG), NoMount
  • Schedulers & patches (testing):
    • BORE 7.0.1r2 CPU scheduler (state relocated to KABI slot 8 to keep GKI kABI intact)
    • ADIOS 4.0.0-rc1 I/O scheduler (default MQ scheduler with automatic blk-wbt disable on attach; BFQ/mq-deadline fallback when use_adios_default is off)
    • LIFO accept() wakeup order, shmem/tmpfs THP ADVISE default, 64 KB anonymous mTHP default (ARM64_CONTPTE, 16x TLB reach), THP defer+madvise defrag, TEO default CPU idle governor, ZRAM lz4 default
    • MT6789 (Cortex-A76/A55) CPU codegen tuning (-march=armv8.2-a+lse+crc+rcpc -mtune=cortex-a76; disable use_mt6789_cpu_opt on older ARMv8.0 hardware), Linux 6.13 ARM64 4-way PMULL CRC-32/CRC-32C backport (crc32-glue.c), and ARM64 NEON crypto (CRYPTO_AES_ARM64_BS, CRYPTO_AES_ARM64_NEON_BLK, CRYPTO_NHPOLY1305_NEON)
    • KMI-safe low-latency and VM/VFS/scheduler tweaks (CONFIG_PID_IN_CONTEXTIDR=n, CONFIG_SOFTLOCKUP_DETECTOR=n, CONFIG_WQ_WATCHDOG=n, page_cluster=0, compaction_proactiveness=0, watermark_boost_factor=0, MGLRU min_ttl_ms=1000, dirty_background_ratio=5, dirty_writeback_interval=10s, vfs_cache_pressure=50, sched_migration_cost=300us, async RCU evdev reclaim, dm-crypt workqueue bypass) and lib/zstd 1.5.6
    • Optional KMI-safe hardening and CPU mitigation bypasses (disable_init_on_alloc, disable_cpu_mitigations, disable_mem_hardening; see security warning above)
    • CVE-2026-43499 / CVE-2026-53163 rtmutex fix chain
  • Containers, networking & drivers: Droidspaces (SYSVIPC, IPC_NS, PID_NS, USER_NS, MACVLAN, DEVTMPFS, netfilter/IPSet; CONFIG_CGROUP_PIDS stays off to avoid breaking GKI 6.12 kABI), NTSync, KMI-preserving BBRv3 (bbr3) default (alongside BBR v1) + fq default qdisc, TCP/backlog low-latency defaults (tcp_slow_start_after_idle=0, tcp_fastopen=3, tcp_notsent_lowat=16384, netdev_max_backlog=4096), ARMv8 CE AES-CCM (CRYPTO_AES_ARM64_CE_CCM), fq_codel/cake/pie/fq_pie, IPv6 NAT, WireGuard, CIFS, and optional extra built-in drivers (use_extra_drivers: native NTFS3 with LZX/XPRESS + Xbox/Nintendo/Logitech/HID gamepad rumble & controllers)

Details and checksums for the vendored patches live in patches/README.md.

Building

Everything runs from .github/workflows/build.yml via manual trigger:

  1. Go to Actions -> Build Bernkastel 6.12.38 -> Run workflow (builds automatically stamp -Bernkastel-g<sha7> and the current UTC build time).
  2. Adjust toggles if needed (defaults enable the full patch stack):
    • publish_release: set true to also publish the AnyKernel3 zip, manager APK, and NoMount zip to Releases (default false).
    • Feature toggles: enable_susfs, use_bbg, use_net_enhance, use_perf_tuning, use_bore, use_adios, use_adios_default, use_lifo_accept, use_thp_advise, use_low_latency_tweaks, use_zstd_update, disable_init_on_alloc, disable_cpu_mitigations, disable_mem_hardening, use_mt6789_cpu_opt, use_mthp_64k, use_teo_cpuidle, use_droidspaces, use_ntsync, use_nomount, use_extra_drivers, cve_2026_43499_patch.

Flashing

Make sure your device actually runs GKI 6.12.38 (2025-09 SPL) and that you have a stock boot backup ready.

Flash Bernkastel-SukiSU-<ver>-6.12.38-AnyKernel3.zip in a custom recovery or kernel flasher, reboot, then install the matching SukiSU-Nova manager APK. AnyKernel3 repacks the device's existing boot image so ramdisk and vendor metadata stay intact.

Credits

License

GPL-3.0. See LICENSE.

About

Personal Android 16 GKI 6.12.38 kernel build workflow with SukiSU-Nova.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages