[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] mostafaz:
Gabriel Kernel for Stock MIUI and AOSP Based Roms

Telegram Channel​

GLOBAL OPTIONS:

Kernel support both MIUI/AOSP

Kernel Supports both Clang & GCC Compilers

Kernel updated up to 3.18.115 build.

Kernel updated up to CAF-LA.UM.6.6.r1-09000-89xx.0

Kernel include advanced binder driver from main line 4.10.y kernel.

Kernel include advanced KSM driver (UKSM, operate with selectable cpu governor/usage).

Kernel has enabled crypto ARM64 CRC32 hw accelerated module and its friends.

Kernel operate in 300HZ

Kernel include Enhanced TCP methods

Kernel include latest F2FS driver for 3.18.y

Kernel include ZEN,NOOP,BFQ,DEADLINE,CFQ,FIOPS,FIFO,ROW,SIO,MAPLE I/O govs tuned for SSD.

Kernel includes Impulse, Cultivation, Lionfish, Interactive, Conservative, Ondemand, Performance CPU GOVS.

Kernel default CPU GOV is patched and tuned Interactive.

Kernel support FSYNC mode for FS. (Off at Screen-On & will be On at Screen-Off)

Kernel support thermal driver tuning.

Kernel includes updated EXFAT drivers.

Kernel includes support for Haptic Feedback (vibrate) tuning (more/less)

Kernel include boost to I/O by mounting partitions with optimized flags.

Kernel has enabled process-reclaim (moving apps to zram without killing them).

Kernel support lz4 compression for zram and max 8 core streams.

Kernel will add advanced busybox binary in /sbin/busybox

Kernel will set power-saving config at Screen-Off and back to normal at Screen-On

Kernel will stop logging drivers at Screen-Off and back to normal at Screen-On

Kernel include state-notifer to say system-state to io/governors to save power.

Kernel has disabled some debugging options to improve the system performance.

Kernel 9.0

*Upstream to 3.18.115

*Merge CAF tag LA.UM.6.6.r1-09000-89xx.0

*Merge Prima Wlan CAF tag LA.UM.6.6.r1-08600-89xx.0

*Merge latest Code update to f2fs

*merge massive update to power, irq, kernel scheduler from msm 4.2.y & 4.4.y

*Merge massive update to cpu driver from msm 4.4.y (cpu 8998/snapdragon 835)

*Merge update to cpuidle from msm 4.4.y

*Merge update to devfreq from msm 4.4.y

*Merge certificate handling from msm 4.4.y

*Merge update to printk from msm 4.4.y

*Merge DTS eagle sound

*Merge update to wireguard

*Merge official charger/battery driver

*Merge few kernel improvement from pixel 2 & sony experia devices

*Merge fix to offline charging led

*Removed VDSO32 (32bit Driver)

*Introducing gabriel/gabriel-plus governor with idle load treshold & timing (based on pixel 2 p-preview interactive Governor)

*Overclock little cluster up to 1.26 MHz

*Overclock gpu up to 575 MHz

*Introduce init process fixer

*Introduce charger current limiter

*Fixed battery stats

*Fixed clock flag no rate cache

*Patch key layout at flashing time

*Add sd card deferred resume (save power wile not using)

*Add target os detector to kernel flasher (anykernel2)

*Treble and non-treble builds combined into one kernel package (AOSP)

*Disable clock scaling for msm sdhci

*Kernel package signed

*Run fstrim at flashing time

*Show kernel version as banner at flashing time

*Add clang support

*Busybox update to latest code changes

*Few improvements in stweak options

*Fixed gpu governor & frequency set

*Fixed setting per governor profile

*Add gabriel memory config

*Reworked profiles

note:

*Compiled with Dragontc 7.0

Kernel 8.0

*Upstream to 3.18.105

*Merge CAF tag LA.UM.6.6.r1-07400-89xx.0

*Merge Prima Wlan CAF tag LA.UM.6.6.r1-07400-89xx.0

*Merge latest Code update to f2fs

*Stweak has control over Performance Daemon

*All Profiles will reset at 1st boot

*Build with 3 different toolchain in 2 different library support (bionic & glibc like past) & 3 different optimization support!

*Gnu gccs compiled by me with latest stable libs & bins

*The regular build like previous builds has no extra character to it's package name (built with hz300 & linaro 7.3 & ofast & graphite gcc flags)

*H3 : Hz300 & o2 & no grapgite flag

*H1 : Hz100 & o2 & no grapgite flag

*B : Bionic toolchain

*7.3 & 6.4 : Gnu gcc 7.3.0 & 6.4.0

*Hz 100 should keeps more battery backup

*You may get better battery backup with Hz100 & gcc 6.4.0

Kernel 7.0

*Kernel Codes Compiled with new Linaro GCC 7.3.1 2018.03(compiled by me)

*Merge Kernel tag CAF-LA.UM.6.6.r1-07200-89xx.0

*Kernel has Reduced "Screen ON" delay (affect on fp unlock)

*Implement Finger Print Boost (boost availalbe cores on fp unlock)

*Kernel has been Disabled Debug Kernel

*Merge Codes Update to Kernel Scheduler

*Merge CPU, CPU_STATS, CPU_IDLE from mainline 4.2.y & 4.4.y

*Merge Interactive & Conservative gov family, Ondemand from mainline 4.4.y

*Remove Lionfish gov

*Kernel Overclocked LITTLE Cluster to 1.34 MHz

*Merge Led driver from Xiaomi Official Source

*Kernel with Official Drivers not Supported for Now

*Stweak has Control over CPUSET

*Stweak has Control over Fingerprint Boost

*Stweak has a Module to Restore Kcal parameters at "Screen ON" state (fix MIUI kcal/panel bug)

Kernel 6.0

*Kernel Updated to 3.18.102

*Kernel Codes Compiled with new Linaro GCC 7.2.1 2018.01(compiled by me)

*Merge Kernel tag CAF-LA.UM.6.6.r1-06700-89xx.0

*Merge Prima WLAN tag CAF LA.UM.6.6.r1-06700-89xx.0

*Merge Codes to ARM64, RCU, Kernel Core & Scheduler Driver from main line 4.4.y

*Merge VDSO32 (32bit Driver) from main line 4.4.y (compiled with GCC Linaro ARM32 7.2.1)

*Busybox Updated to Latest Code Changes (compiled by me)

*Kernel has MIUI F2FS Support & Dtiver Updated to Latest Code Changes

*Kernel codes compiled with Ofast & Graphite Optimization Flags

*Kernel has USB HID gadget suport

*Merge CPU Governor Alucard, Darkness, Nightmare, Chill, Relaxed

*Merge update to SDCARDFS

*Kernel has CPU & GPU Underclock/Overclock

*Kernel Boot UP With Stock CPU Frequencies

*Kernel Flasher will Backup Current Boot (kernel image & ramdisk) and Modules for MIUI Rom in case of Restoring/Uninstalling the Kernel to Previous one

*Add Adreno-Idler support

*Add Stweak Support

*Stweak has 7 Predifined Profile

*Stweak has Control over big.LITTLE Clusters Control

*Stweak has Control over Awake & Suspend state for CPU, GPU, HMP,I/O Scheduler, UKSM, etc

*Stweak has Per Cluster & Governor Profiling

*Stweak has F2FS Searching Boost option

*Stweak has Advance Memory Control options

*Stweak has Auto Clear Ram Cache Switch (affect on multitasking/Performance)

*Stweak has Control over ZRAM & SWAP Disk

*Stweak has Control over WIFI, init.d, ADB, Sound, Battery, Dmesg state

*Stweak has Control over ROM's MIN/MAX backlight value

note:

*Kernel Uploaded into 2 Separate Build with Official & UNOfficial Drivers

*Official Build Has More CPU Overclock Steps

*Official Build Can't Mount OTG Drive at This Time

*To Convert EXT4 to F2FS Follow this Instruction

Kernel 5.0

*Kernel Updated to 3.18.93

*Kernel Codes Compiled with new GNU GCC 7.3.0 (compiled by me)

*Busybox Updated to Latest Code Changes (compiled by me)

*Implement Adreno Idler

*Add 100 & 160 MHz GPU Frequencies

*Adreno Idler & GPU Clock Tuned for Power Saving

*Implement Force Fast Charge (disabled by default)

*Merge Updates to CFQ IO-Scheduler

*Merge Update to BFQ IO-Scheduler (v8r12)

*Merge Updates to Interactive Governor

*Inject SQLITE3 Bin to Rom for DB-Optimization (needs command/script, attached to this post)

*Remove Code Changes to Touchscreen Driver (initial fix for dt2w issue)

*Kernel Boot Script run FSTRIM at Boot

*Fix & Tune Core Control (4 cores online 2 big+ 2 LITTLE)

Kernel 4.0

*Enable 19 MHz GPU Frequency

*Implement Kcal Colour Control (works with non-stock roms)

*Implement Backlight Dimmer

*Different LMK & Zram Config for 2/3/4 GiB Ram Variants

*Cortex Keeps 4 (2 big & 2 Little) Cores online at Sleep State

*Merge MDSS Codes to Avoid Underrun Risk while Changing Clock & Bandwidth

Kernel 3.0

*Merge Advance Zram & Zsmalloc driver from main line 4.6.y

*New Zram driver has 2 new Compression algorithm (lzo, lz4, [lz4hc, deflate])

*New Zram driver has Per-CPU Compression Streams

*New Zram driver use Crypto Compression API

*Merge Workqueue driver from main line 4.4.y

*Merge Random driver from main line 4.4.y

*Implement Sound Control

*Implement FRandom

*Merge update to IPA

*Fix Boot Script Failure with Magisk 15.3

*Tune Interactive Gov

*Merge update to Bitmap Lib

*Merge update to Kgsl, Devfreq, ARM64 & Kernel Scheduler

*Simplified Cortex Script for While Leaving the Sleep State

Kernel 2.0

*Upstream to 3.18.92

*Implement Boeffla wakeock-blocker v1.1.0

*Implement DT2W/S2W

*Cpuset disabled

*Merge update to Kernel Scheduler

*Merge update to RCU (how drivers talks to kernel)

*Disabled extended HMP drivers, use Generic HMP and related drivers

*Merge fixes for high load average and queuing works on power-efficient workqueue

*Merge fixes to led-flashlight

*Merge fixes to Battery/Charger

*Merge IPA fixes from caf-tag LA.UM.5.6.r1-05400-89xx.0 (internet packet accelerator)

*Merge fixes to Xiaomi Colour and Contrast

*Entropy Tweaks at Startup

*Separated to 2 Builds for MIUI and AOSP Based Roms

*Selinux is Permissive for Oreo and Enforcing for Nougat

Kernel 1.0

*All options in the global options list

*Selinux is in enforcing mode, so won't boot current oreo rom.

*Software CRC control is Off

*Doesn't support F2FS for Stock Rom at this time but AOSP.

*Doesn't support LCD Gestures, D2W,D2S,S2S

Instruction

if you came from a custom kernel, please restore your rom's stock kernel then flash.

as always, unlocked bootloader and flash in twrp

Flash at you own Risk !

There is a file named "build.log" in kernel zip file

that says which branch i used for build process.

Download Folder

AFH directory,beta & stable builds

Global Credits!

noyer for kernel source

rainforce279

dorimanx

asiier

sonicron

Cyanogen/LineAge/Code Aurora for many kernel mods

To all my sources in GITHUB!

XDA:DevDB Information

Gabriel Kernel, Kernel for the Xiaomi Redmi 4X

Contributors

mostafaz

Source Code: https://github.com/mostafa-z/Gabriel_msm8940_mi-redmi4x

Version Information

Status: Testing

Created 2018-01-17

Last Updated 2018-01-17