Skip to content

About

origin kernel v3 vanilla with bakasu, for the cmf phone 1 (tetris)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Β 
Β 

Latest commit

Β 

History

1,181,004 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ Origin Kernel

Performance β€’ Stability β€’ Control

A feature-rich custom kernel for MediaTek-based Nothing devices.

OriginSU SUSFS Nethunter Linux 6.1 MediaTek License GitHub release

Origin Kernel

πŸ“š Contents

Warning

⚠️ Flash at your own risk

Custom kernel flashing can result in bootloops, data loss, or a non-booting device. Always keep a working copy of your stock boot-related images before modifying your device.

The maintainer is not responsible for bricked devices, damaged hardware, data loss, or any other issues caused by using this kernel. By flashing Origin Kernel, you accept responsibility for the modifications you make to your device.

🌌 About Origin

Origin Kernel is built with a focus on balancing performance, stability, battery life, and additional kernel functionality for MediaTek-based Nothing devices.

The project combines kernel features, upstream improvements, custom tuning, and selected third-party components into device-specific builds.

πŸ’‘ Why Origin Kernel?

Stock MediaTek kernels prioritize stability over performance and lack features power users expect. Origin Kernel fills that gap:

  • Root done right β€” ReSukiSU with SUSFS for seamless root and hiding, compatible with multiple KernelSU managers.
  • Performance without compromise β€” CASS scheduler, Thin LTO, and curated optimization patches improve responsiveness without sacrificing battery life.
  • Modern networking β€” BBRv3 as default, IPSet, IPv6 NAT, and TTL manipulation out of the box.
  • Device-specific tuning β€” each device gets its own optimized build, not a one-size-fits-all approach.
  • Transparent development β€” open source, community-driven, with upstream backports for stability and security.

πŸ“± Supported Devices

Device Codename Status
CMF by Nothing Phone 1 Tetris 🟒 Supported
CMF by Nothing Phone 2 Pro Galaga 🟒 Supported
Nothing Phone (3a) Lite Galaxian 🟒 Supported

Important: Always flash the build intended for your exact device. Kernel images and AnyKernel3 packages are not interchangeable between devices.

🧩 Feature Availability Matrix

Release notes take priority over this table β€” availability may change between releases.

Feature Tetris Galaga Galaxian
Root & Security
ReSukiSu βœ… βœ… βœ…
SUSFS βœ… βœ… βœ…
Multi-manager KSU βœ… βœ… βœ…
Baseband-Guard βœ… βœ… βœ…
Performance
Thin LTO βœ… βœ… βœ…
CASS Scheduler βœ… βœ… βœ…
Optimization patches βœ… βœ… βœ…
Memory
ZRAM LZ4 βœ… βœ… βœ…
TMPFS_XATTR βœ… βœ… βœ…
TMPFS_POSIX_ACL βœ… βœ… βœ…
MemKernel βœ… βœ… ❌
Networking
BBRv1 βœ… βœ… βœ…
BBRv3 (default) βœ… βœ… βœ…
IPSet & IPv6 NAT βœ… βœ… βœ…
TTL Target 🚧 🚧 🚧
Advanced
Droidspaces-OSS βœ… βœ… βœ…
NetHunter 🚧 🚧 🚧

Legend: βœ… Available Β· 🚧 WIP Β· ❌ Unavailable

✨ Features

πŸ” Root & Security

  • ReSukiSu β€” KernelSU-based root solution for Android GKI devices, operating in kernel mode to provide root access to userspace applications.
  • SUSFS β€” Kernel patches and userspace support for KernelSU-oriented root hiding.
  • Multi-manager KSU β€” works with multiple KernelSU-based managers: Official KernelSU, KernelSU-Next, MKSU, SukiSU, Wild KSU, and KowSU.
  • Baseband-Guard β€” LSM-based protection that blocks unauthorized writes to critical partitions and device nodes.

⚑ Performance

  • Thin LTO β€” Link-Time Optimization for smaller and faster kernel builds.
  • CASS (Capacity Aware Superset Scheduler) β€” custom CPU scheduler tuning for better battery life and responsiveness.
  • Optimization patches β€” curated memory, I/O, and networking tuning from the Android and Linux communities.

🧠 Memory

  • ZRAM with LZ4 compression β€” compressed swap for more usable memory.
  • TMPFS_XATTR β€” extended attributes for tmpfs (required by Mountify and similar tools).
  • TMPFS_POSIX_ACL β€” POSIX access control lists for tmpfs.
  • MemKernel β€” kernel driver for reading/writing physical memory from userspace.

🌐 Networking

  • BBRv3 [DEFAULT] β€” modern TCP congestion control for high throughput and low latency.
  • BBRv1 β€” legacy BBR option for compatibility.
  • IPSet & IPv6 NAT β€” firewall and NAT capabilities for advanced networking.
  • TTL Target 🚧 β€” packet TTL manipulation (in development).

🐧 Advanced / Experimental

  • Droidspaces-OSS β€” lightweight container runtime for running Linux environments on Android.
  • NetHunter 🚧 β€” Kali NetHunter support (work in progress).

πŸ§ͺ Planned / Upcoming

Features in development that may appear in future releases:

  • 🚧 Boeffla Wakelock Blocker β€” blocks specific system wakelocks to improve battery life and reduce sleep latency.
  • 🚧 BORE CPU Scheduler β€” Burst-Oriented Response Enhancer for better UI responsiveness.
  • 🚧 ADIOS I/O Scheduler β€” Adaptive Deadline-based I/O scheduling for faster storage performance.
  • 🚧 WQ Power Efficiency β€” reduces CPU wakeups during idle periods.
  • 🚧 ZRAM Writeback β€” writes idle/compressed ZRAM pages to backing storage for more effective swap.
  • 🚧 DAMON β€” Data Access MONitor for proactive memory management based on access patterns.

Backported Upstream Fixes (pending stable integration):

  • ZRAM β€” multi-stream compression for better ratios.
  • f2fs β€” inline inode handling, compress cache validation, ACL fixes, write I/O UAF prevention.
  • ext4 β€” inline data bounds checking, superblock update checks, DAX restrictions on encrypted files.
  • mm β€” percpu bitmap overflow, page reporting UAF during suspend, vmalloc ptdump UAF, huge_zero_pfn race.
  • Scheduler β€” deadline migration warnings, RT push task race, PSI timer shutdown for power savings.
  • Network β€” IGMP UAF prevention, bridge multicast UAF fix.
  • Vendor hooks β€” memcg PSI recording skip, migration batch hooks, direct reclaim hooks.

🧩 Variants

Variant Description
Origin-ReSukiSU Includes ReSukiSU for ready-to-use kernel root.
Origin-KSUN Built with KernelSU-Next for the latest KernelSU experience.
Origin-Vanilla No pre-integrated root β€” for use in custom ROM builds.

Note: Variant availability may differ between devices and releases. Check release notes before flashing.

πŸ“² Installation

Prerequisites

  • Unlocked bootloader
  • Backup of current boot image (stock boot.img, init_boot, or vendor_boot)
  • Root access via Magisk / KernelSU / APatch (required for some methods)
  • MagiskBoot β€” for manual boot image patching
  • Wild KSU Manager β€” for Wild KSU workflow

Important

⚠️ Fenrir users

If you are using Fenrir, the AnyKernel3 ZIP will not change the kernel due to a conflict. Patch your boot.img with the Origin Kernel Image and flash via fastboot instead. See Method 3.

Method 1 β€” Kernel Flasher

  1. Download the correct AnyKernel3 (AK3) ZIP for your device.
  2. Clean up any previous root setup:
    • Magisk: fully uninstall after flashing.
    • KSU LKM: restore the stock image that was patched.
    • KSU GKI: restore stock images if not already done.
    • APatch: remove /data/adb contents to avoid conflicts.
  3. Flash the ZIP to the active slot using Kernel Flasher.
  4. Install the KernelSU-Next Manager APK from the release notes.
  5. Reboot.

Method 2 β€” KernelSU / KernelSU-Next App

If already rooted with KernelSU or a compatible fork, flash the AnyKernel3 ZIP directly from the manager.

Method 3 β€” Manual Boot Image Patching

# 1. Unpack stock boot image
./magiskboot unpack boot.img

# 2. Delete the extracted kernel file
rm kernel

# 3. Copy and rename Origin Kernel Image to kernel
cp Image kernel

# 4. Repack
./magiskboot repack boot.img

# 5. Flash the patched image
fastboot flash boot new-boot.img

Method 4 β€” Wild KSU Manager

  1. Obtain root with Wild KSU.
  2. Open Wild KSU β†’ Install β†’ GKI β†’ Patch boot image.
  3. Select the AnyKernel3 ZIP, then select your stock boot image.
  4. Flash the resulting WildKSU-GKI---- image via Kernel Flasher or fastboot.

πŸ”§ Building from Source

# 1. Clone the repository
git clone https://github.com/samakshkambxj/origin-kernel.git
cd origin-kernel

# 2. Set up the build environment (requires clang + GCC toolchain)
export ARCH=arm64
export SUBARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
export CROSS_COMPILE_ARM32=arm-linux-gnueabi-

# 3. Generate defconfig
make gki_defconfig

# 4. Build the kernel
make -j$(nproc)

Output kernel image will be at arch/arm64/boot/Image. Use AnyKernel3 to package it as a flashable ZIP.

πŸ” Troubleshooting

Issue Solution
Bootloop after flashing Boot to recovery, restore stock boot.img via fastboot: fastboot flash boot boot.img
No root access Install the KernelSU-Next manager APK from the release notes and reboot
App detects root (SafetyNet/Play Integrity) Enable DenyList in KernelSU-Next manager, enable SUSFS mount hiding
Device feels slower after flashing Clear cache from recovery, reboot again; performance improves after a few charge cycles
WiFi/BT broken Ensure you flashed the correct device variant; restore stock image and re-flash

If none of these work, collect logs (dmesg, logcat) and open an issue on GitHub.

πŸ› οΈ Kernel Information

Codename Device Kernel Root Method
Tetris CMF Phone 1 6.1.162 KernelSU-Next
Galaga CMF Phone 2 Pro 6.1.145 KernelSU-Next
Galaxian Nothing Phone (3a) Lite 6.1.145 KernelSU-Next

πŸ”— Useful Links

πŸ’¬ Community & Support

🀝 Contributing

Contributions are welcome. Here's how you can help:

  • Bug reports β€” open an issue with device model, OS version, and steps to reproduce.
  • Code contributions β€” fork the repo, create a feature branch, and submit a pull request.
  • Testing β€” flash experimental builds and report back on stability and performance.
  • Documentation β€” improve this README, translate guides, or write tutorials.

Please follow the existing code style and test changes on your device before submitting.

πŸ™ Credits

Thanks to all contributors, testers, and the Nothing community.

⭐ Like My Work?

If you found Origin Kernel useful, consider giving the repo a star on GitHub β€” it helps support the project!

⚠️ Disclaimer

Flashing a custom kernel involves inherent risks, including bootloops, data loss, or device failure. Unlocking the bootloader or modifying system software may also affect warranty or service eligibility.

Always back up your data and stock boot images before flashing. Use only the build intended for your exact codename.

Proceed at your own risk.

About

origin kernel v3 vanilla with bakasu, for the cmf phone 1 (tetris)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages