[Samsung Galaxy S7 Edge (Exynos) ROMs, Kernels, Rec] kylothow:
Welcome to the official thread for Primal Kernel project for the Exynos Galaxy S7 edge (SM-G935F/FD/W8/S/L/K) running TouchWiz based ROMs (Nougat only currently).

The aim of this project is to provide a rock solid, ready to use tweaked kernel, without useless features.​

Introduction:

Primal Kernel, formerly known as The Outsider Kernel, is the first S7 edge kernel for TouchWiz based ROMs sporting the AnyKernel2 installation approach.

The most widespread method consists of flashing a complete prebuilt boot image (this means that it will be flashed straight away without any modification).

This is the most practical method for providing a working kernel, but it has disadvantages too:

1) the installation package will be bigger.

2) the developer must keep the ramdisk updated with the newest from stock kernels. This requires rebasing the patches and keeping up with the newest firmwares sometimes with frequent releases.

3) it makes the compatibility with older ROMs a little more complicated as a newer ramdisk could add modifications not supported by the older ROM.

4) for the ported ROMs the developer has to manually patch the ramdisk with the required changes from the ported device's one. So you have to create a different boot.img for every ported device for every S7 edge variant.

But we have an alternative...

AnyKernel2 is a different approach to the installation of the kernel: the package only contains the prebuilt zImage (the actual kernel), the dtb (basic hardware instructions like reserved memory and so on) and the patches for the stock ramdisk. AnyKernel while installing unpacks the previous kernel and replaces zImage, dtb and, after patching it, the new ramdisk.

This implies various benefits:

1) smaller installation package.

2) you can always have the most updated ramdisk without the need of waiting an update from the developer.

3) better compatibility as you can flash it on top of any stock (or close to) boot image.

4) it makes life a lot easier for the developer with many ready to use patching functions.

5) with some efforts from me, the package can adapt the stock S7 edge ramdisk to work on any S8 or Note FE ported ROM, making it even more adaptable.

All this sounds great (and it is great) but introduces a problem: you can't flash it on top of another custom kernel. This because custom kernels almost always have scripts and other modifications to the ramdisk, which might not be compatible with my kernel.

Installation instructions:

If you correctly follow these instructions you'll be able to run Primal on any ROM (as above).

If it doesn't work, read twice and try installing again before asking for help.

● Instructions for BatMan ROM (S8 port) users:

1) install the ROM (you can dirty flash if you already have it installed)

make sure to choose stock kernel

(so it doesn't install the new GPU libs, which aren't supported by Primal).

3) after the ROM flashing process has been completed flash the Primal kernel zip for your device.

4) flash your preferred root method.

5) reboot and be patient as first boot might take a little more time.

● Instructions for any other ROM (any other S8 and Note FE ported ROM and, obviously, any S7 edge ROM) running a custom kernel:

1) make sure you have the stock S7 edge kernel zip (or any stock boot.img from any S7 edge Odin package or ROM zip containing the stock kernel) and Primal Kernel zip.

2) if you have a boot.img flash it to the boot partition using Flashify or TWRP itself.

3) if you have the flashable stock kernel zip and Primal Kernel zip reboot to recovery and flash in this order: stock kernel zip, Primal Kernel zip and then your preferred root method.

● Instructions for any S7 edge ROM running stock kernel:

1) reboot to recovery and flash in this order Primal Kernel and your root method of choice.

If you get into a bootloop...

● if you're running a port make sure it says dream2lte (if an S8 port) or gracerlte (if a Note FE port) in the build.prop; if there isn't any add a line at the bottom, "primal=dream2lte" for S8 or "primal=gracerlte" for Note FE.

● make sure your ROM doesn't come with the new GPU libs installed, if it does restore the old libs somehow (flashable zip coming soon!).

Thanks and Credits:

● Samsung OSRC for the kernel source code

● @Tkkg1994 and @jesec for their clear and vast source code and scripts

● @flar2, @UpInTheAir, @franciscofranco, @eng.stk, @osm0sis, @andip71 and others for their great contributions to the community and Android

Features:

● based on the latest Samsung kernel source code G935FXXU1DQH8 merged with G935SKSU1DQG1

● always have the latest ramdisk for your specific model and variant, thanks to AnyKernel2

● ported ROMs are supported (like S8 and Note FE based ROMs)

● compiled with custom built Uber Toolchain 6.4.1 (20170826) and optimization flags

● custom scripts with tweaks applied at boot, optimizations and wakelock fixes

● init.d support

● added a few tested and updated CPU governors (blu_active, conservative, ondemand, powersave, interactive, performance).

default: interactive

● added a few tested and updated I/O schedulers (noop, deadline, row, cfq, bfq, zen)

default: cfq with custom parameters

● added a few TCP congestion algorithms (westwood, reno, bic, cubic, htcp, lia, olia, wvegas)

default: westwood

● full f2fs support from jaegeuk's f2fs-stable plus OnePlus improvements

● fstab mount tweaks for both ext4 and f2fs

● fixed various bugs in the Linux code like improved cyptography algorithms, filesystems, network...

● architecture specific fixes

● cpuidle improvements

● random (entropy) generation improvements

● power managemnet, schedulers, governor and memory management improvements

● unlocked lower CPU frequencies with correct voltages and set recommended defaults (312MHz big - 338MHz LITTLE)

● schedule workqueues on awake CPUs enabled

● improved hotplug and idle with interactive governor

● added 112MHz minimum GPU frequency and clock control

● voltage control for GPU

● LED control with fading option

● voltage control for big and LITTLE clusters

● preset I/O scheduler tunables

● disabled SWAP and ZSWAP for best performance

● preset VM tunables

● SELinux permissive

● Knox 0x0, Samsung security checks and SafetyNet spoofed to pass

● Fsync switch added

● Software CRC control switch added

● and many other changes (too many to be listed here)...

Notes:

● If you want root, you need to flash the root zip after flashing this kernel (Magisk is recommended to pass SafetyNet).

● If you want to access the advanced kernel controls MTweaks by @morogoku is the only app which supports all the features (download it here).

Everything has always been stable, and almost bug free, so no notes on that side at the moment :laugh:

Latest stable version is 2.3.4.

If you want to flash an older version see Archive in the download links below.

Source > GitHub

Commits (kind of a changelog) > GitHub

Download:

hero2lte (S7 edge SM-G935) > Android File Host

Support:

If you want to receive support, find and share settings, report bugs and try Beta versions, join our Telegram group:

TouchWiz Projects by kylothow | Official Group

You're welcome :)

XDA:DevDB Information

Primal Kernel, Kernel for the Samsung Galaxy S7 Edge

Contributors

kylothow

Source Code: https://github.com/kylothow/universal8890-NN-G935

Kernel Special Features: Stable f2fs porting, tweaked with recommended settings, a few but working governors, schedulers and patches are just some of the awesome features.

Version Information

Status: Stable

Current Stable Version: 2.3.4

Stable Release Date: 2017-09-13

Created 2017-04-26

Last Updated 2017-09-14