[KERNEL][CUSTOM] Eureka kernel for all variants of Galaxy A40 for android 10(Q) & 11(R) & 12(S) ROMs

How is your experience with Eureka kernel?

  • Improves performance and gaming experience

    Votes: 12 92.3%
  • Improves gaming experience only

    Votes: 0 0.0%
  • Improves performance only

    Votes: 1 7.7%

  • Total voters
    13
Search This thread

Chatur27

Senior Member
Jul 30, 2020
229
235
Moka
Eureka R7.5 update

Changelog:

→ All previous features of Eureka which A40 missed.
→ Upstream Linux Kernel Version from 4.4.270 to 4.4.277
→ Enabled back 208 MHz frequency for big and little cores.
→ DTB is now used to customize Eureka features such as CPU and GPU frequencies.
→ DTBO is only used to disable dm-verity as from now.
→ Added a new flashlight control driver which will be used on AOSP/LOS based ROMs. It will also fix low flashlight issue on GSIs. This new driver does not interfere with camera (which was causing dark photos for some A20 users) Footej camera app is recommended for custom roms.
→ Imported latest Samsung updates from A305F R kernel source.
→ "Samsung A10 1.2A input charging current" feature still depends on Eureka dtbo. Will fix it on next update
→ Further overclocked BIG cores from 2184 MHz to 2288 MHz and LITTLE cores from 1690 MHz to 1794 MHz.
→ Fixed wrongly set GPU throttling frequencies.
→ Updated WireGuard vpn driver to latest version - v1.0.20210606
→ Some other minor optimizations.
 

llek100

Member
Feb 21, 2020
8
3
Hi, this kernel does not seem to work on my Samsung Galaxy A40 SM-A405FN. I tried this with multiple ROMs including the stock one. I get stuck on a black screen after the Samsung logo is shown. The other kernel that is on this forum, the physwizz_kernel.

By the way for users who are stuck on this black screen you need to hold down
'Vol UP + Vol DOWN + Power button' for about 7 seconds, then release the 'Vol DOWN' button but keep holding 'Vol UP + Power button' until you see the samsung logo, this will get you into recovery.
 

Chatur27

Senior Member
Jul 30, 2020
229
235
Moka
Eureka R8.0 update

Changelog:

→ Upstream Linux Kernel Version from 4.4.277 to 4.4.288
→ Added ondemandplus CPU governor.
→ Added BFQ and ZEN v2 I/O schedulers.
→ Added a new backlight brightness controller. [Feature can be used when new EKM app is released] [Experimental]
→ "Samsung A10 1.2A input charging current" feature has been hardcoded in kernel.
→ Nuked CPU quiet and reverted back to Exynos Hotplug. It should fix issue of cores randomly turning off.
→ Fixed GPU frequency being limited to 1100 MHz after being throttled (v2.0).
→ Some optimizations for better FS performance for EXT4 file-system.
→ Fixed non-detection of some gamepad controllers (such as chinese ones).
→ Patched kernel for android 12 (S).
→ Some other minor optimizations.
 

Benji67

New member
Nov 4, 2021
2
0
hi :) how can i install it without TWRP (impossible to install twrp vith odin and impossible to install the apk....my phone is too much "securised") ? thanks !!
 
  • Sad
Reactions: Chatur27

Chatur27

Senior Member
Jul 30, 2020
229
235
Moka
Eureka R9.0 update

Changelog:

→ Upstream Linux Kernel Version from 4.4.288 to 4.4.302 (latest and last update from Linux).
→ Implemented EurekaSound (ESOUND) v1.0, a basic headphone audio controller (For AOSP only).
→ Implemented Eureka Display Control (EKCAL) which is based on Samsung mDNIE driver (Not available for A20e).
→ Modified DT2W driver for A20 and A40 so as to fix DT2W issue on AOSP ROMs.
→ Fixed all remaining warnings in kernel source.
→ For permissive selinux, selinux can be switched to enforcing after boot.
→ Further improvements to SElinux code to fix some warnings in kernel log.
→ Fixed custom flashlight controller for A10.
→ Updated WireGuard VPN driver to latest version (1.0.20211208)
→ Merged 98 % audio and camera changes from R kernel source into Q/R/S (AOSP/OneUI2) kernels.
→ AROMA Installer is now used to facilitate the installation of Eureka Kernel.
→ OneUI and AOSP kernels & custom DTBs have been merged into 1 zip (kept size as small as possible).
→ Built with Vortex Clang & LTO which is based on the latest version of Clang 14 (20220201).
→ Two kernel versions with different schedulers are now available:
→ Implemented EMS (Exynos Mobile Scheduler) which is a scheduler based on EAS (Energy Aware Scheduling).​
→ The normal kernel version has the stock HMP (Heterogeneous Multi-Processing) scheduler.​
→ Eureka kernel R9.0 heavily depends on DTB (not DTBO) for the following features:
→ CPU and GPU overclock & underclock
→ SELinux state (enforcing or permissive)
→ Sound driver compatibility (AOSP, OneUI2 or OneUI3)
→ Energy model and parameters for EMS kernels
→ EMS kernel works best with schedutil based governors. The following governors were added:
→ Blu Schedutil
→ ElectroUtilX
→ PwrUtilX​

→ Updated to latest A305F kernel source (A305FDDU6CUI3).
→ Time left for full charge is now shown on OneUI ROMs.
→ Updated all DTBOs to match latest changes from R source.
→ Possible fix for issue of glitched video renderings on social media apps (E.g: Instragram) - reported by our testers.
→ DTC (Device Tree Compiler) on kernel source has been upreved to 1.6.1, latest available
→ Updated spectrum files.
→ Other minor changes.
 

Chatur27

Senior Member
Jul 30, 2020
229
235
Moka
Please read the post again to better understand Eureka R9.0
Questions which already have their answers on the post will be ignored.
 

sergiomaske

Member
Mar 8, 2020
8
0
Hello i've tryed to install different versions of eureka 9.2 with the last version of cRdroid rom built in february but always crash, which version should i try?
thanks
 

Elmarigo

Senior Member
Jun 13, 2014
207
76
Hello @Chatur27
I just updated my A40 with RR-GSI (February 2022) from Eureka 6.5 to Eureka 9.2 But since then it crashes during booting or within a few minutes after the boot. So I sometimes can see the UI and then it reboots, sometimes it get's already stuck with the RR logo and then reboots. Each time when it runs for a few minutes, before rebooting, then SD card cannot be accessed and the camera does not work.
In between I have factory reset the phone, manually wiped all partitions besides system and it won't get better. (I tried permissive and enforcing modes as as dtb stable v1 and v2)

Do you have an idea why?
 
Last edited:
  • Like
Reactions: netterhamma

netterhamma

Senior Member
Sep 30, 2020
83
10
Samsung Galaxy A40
Hello @Chatur27
I just updated my A40 with RR-GSI (February 2022) from Eureka 6.5 to Eureka 9.2 But since then it crashes during booting or within a few minutes after the boot. So I sometimes can see the UI and then it reboots, sometimes it get's already stuck with the RR logo and then reboots. Each time when it runs for a few minutes, before rebooting, then SD card cannot be accessed and the camera does not work.
In between I have factory reset the phone, manually wiped all partitions besides system and it won't get better. (I tried permissive and enforcing modes as as dtb stable v1 and v2)

Do you have an idea why?

I have the same problem (SM-A405FN)
 

Elmarigo

Senior Member
Jun 13, 2014
207
76
OK, I got it running by installing the previous version (9.0). There's an GSI version inside, which doesn't exist in 9.2.
Previously I thought AOSP/Eureka and GSI where all the same kernel, because this wasn't made clear from the thread. (It sounded more like the opposite). Btw I had to use the stableV1 dtb on my A40, the default isn't stable.

Now I wonder: Will there be no new kernel for GSI? Because the thread only said there wouldn't be a new kernel for OneUI, but GSI wasn't mentioned.

Anyway: Thank you very much for ongoing support, Chatur! :)
 
Last edited:

Elmarigo

Senior Member
Jun 13, 2014
207
76
Hello!
I still have one problem:
My phone sometimes crashes with current Eureka kernel. I think it's because of CPU frequencies. I tried limiting minimum and maximum frequencies for big and little in 'TK Manager', but the manager won't save the settings..
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    EK A40 XDA.jpg

    Hi all,
    this is the thread for a custom kernel i made for Samsung Galaxy A40.
    The custom kernel has been named Eureka which is a greek work which means "I have found the solution". This multi-purpose kernel is the solution for battery, gaming, performance for A40. On creating this kernel, I believed that 1 kernel can be all of the above if properly tweaked!

    As from Eureka R9.0, four kernel variants are available inside 1 same zip. This has been made possible using AROMA Installer.

    Compatibility:
    This kernel is compatible with AOSP GSIs/ROMs, OneUI2 and OneUI3. As from R9.0, there is only 2 variants of zip to download. One is called EMS and the other one is called HMP. Continue reading to learn more about them.


    FEATURES:
    * Disabled Samsung security features
    * Enabled all governors + added other governors
    * Overclocked CPU as follows:
    BIG Cores: from 1768 MHz to 2288 MHz.​
    LIL Cores: from 1586 MHz to 1794 MHz.​
    * Underclocked CPU as follows:
    BIG Cores: from 936 MHz to 208 MHz.​
    LIL Cores: from 839 MHz to 208 MHz.​
    * Added GPU thermal and voltage control
    * Added latest boeffla wl blocker V 1.1.0 and disabled some wakelocks
    * Network speed improvement
    * Enable zram support and set default compressor as zstd.
    * Switch to a lower charging voltage more quickly.
    * GPU max frequency overclocked from 845 MHz to 1300 MHz
    * Implemented Dynamic FSync 2.0
    * Implemented a custom hotplug driver to enhance battery management
    * Implemented Power Suspend driver
    * High torch brightness on custom roms/gsis
    * Has Spectrum support
    * Automatic detection of magisk - If u are rooted, u don't need to flash magisk after kernel.
    * Upstreamed kernel version from 4.4.177 to 4.4.302
    * Built with Vortex Clang 14 toolchain with LTO. Reason: Better performance
    * Support for EMS (Exynos Mobile Scheduler) added

    Please read the changelog on github for full list of changes.

    KNOWN ISSUES:
    * Maybe ADB cannot be used at the same time as MTP


    SOME MINOR TWEAKS FOR BEST GPU PERFORMANCE:
    * Set GPU power policy to "always on"
    * Set min and max GPU frequency to 1200/1300 MHz
    * Disable GPU thermal manager to prevent GPU frequency from dropping
    * Games don't require high CPU frequency because they depend more on GPU. You can therefore decrease CPU max frequencies to reduce heating of the device.

    We have developed our own kernel manager called EKManager which is a fork of HkTweaks. It is compatible only with Eureka Kernels. You can download it from here:
    LINK: Download EKManager app


    Contact info:
    Developers of Eureka Team:
    * Telegram: @Chatur27, @Gabriel260BR and @roynatech

    Channel for Eureka future updates:
    * Telegram: https://t.me/eureka_kernel

    Official discussion group for A40:
    * Telegram: https://t.me/sga40

    I'm grateful to KineSight for designing the logo.
    * Telegram: @Kinesight

    Reference about EMS kernel:
    Energy Aware Scheduling (EAS) gives the scheduler the ability to predict the impact of its decisions on the energy consumed by CPUs. EAS relies on an Energy Model (EM) of the CPUs to select an energy efficient CPU for each task. Allowing to save up battery even further. EMS aka Exynos Mobile Scheduler, is a fork of EAS for Exynos. We ported to our 4.4.y kernel. As written above, EMS kernel is good for battery saving. Some words from kernel official docs: - EAS operates only on heterogeneous CPU topologies (such as Arm big.LITTLE) because this is where the potential for saving energy through scheduling is the highest.
    EMS kernel + pwrutilx governor is very good at battery saving according to our test.

    Reference about HMP kernel:
    It's just the stock scheduler that comes with stock kernel. Basically it's the normal kernel.

    What kernel variant to flash once inside AROMA installer?
    1) AOSP Legacy Q/R/S - If you are using an old Eureka ROM which was released before February 2022, choose this.
    2) AOSP Q/R/S (New) - If you are using an Eureka ROM built as from February 2022, choose this.
    3) OneUI 2 - For any OneUI 2 roms (stock/ports).
    4) OneUI 3 - For any OneUI 3 roms (stock/ports).

    Download link for A40 (Read above to know which version to download for your OS):
    All releases of Eureka for Q/R/S ROMs/GSIs (including OneUI)

    Source code for my kernel:
    Kernel source on GitHub


    1619982775521.png

    If you love our work, thank us by donating. Your donation can help us rent a cloud sever to build kernels and roms faster :)
    Link to PayPal: https://www.paypal.com/paypalme/chaturbaij
    3
    Hello!

    Here I am again, and I am happy to say, that it is working good so far!
    I was surprised, that the flashing went so simple, as I had expected to need all these Samsung specific shenanigans and workarounds again.. but it wasn't necessary at all (at least from an already installed TWRP and another booting (bad barely functional) GSI ROM on my A40 before.

    So here's what I did:
    1. I flashed OrangeFox recovery for the A40, as I have seen some A40 devs recommend this. Also the TWRP 3.4.0.0 wasn't working too nice for me, with frequent USB/MTP hickups and it often hung on reboot. Then reboot. OrangeFox fo the A40 is available: here.

    2. In OrangeFox I wiped all partitions shown in the dialog besides vendor and my external SD card. So these partitions where:
    "Dalvik / ART Cache, Cache, System, Data; Internal Storage"

    3. Copied all the needed files to the phone using USB/MTP.
    For me these Files where:
    a) Resurrection Remix 8.6.7 GSI Build from Robot Hanzo as told by Marcia (the arm64 "ab" -build)
    b) Eureka kernel as uploaded by Chatur in post #57.
    c) hkTweaks2.1.0
    d) Magisk-v21.4.zip

    4. Flashed the Resurrection Remix GSI to the system partition using OrangeFox

    5. fixed the system partition's size using OrangeFox: Menu->More->ManagePartitions->System->ResizeFS (no reboot needed)

    6. Flashed the remaining files (b c and d in said order) using OrangeFox

    7. wiped Cache and dalvik cache, then rebooted

    8. Booted the system and setup the basic configuration dialogs ( i did not use hKTweaks, yet, will do this later when I verified all relevant stuff as working).

    System is working fine so far.
    I will be testing through the next days. I hope this might finally become a configuration making that phone useable for me.
    (Double Tap 2 Wake, DoubleTapeStatusBar to Sleep, CursorKeys in Navbar, Correct seting for the rounded corners - everything is in there and working, yes, the touchscreen is working, too!)
    :)
    3
    thanks. you are very good. I want to donate but do not paypall in Turkey :(
    its fine.
    Just hit the thanks button on my thread;)
    3
    wow .... great job .... congratulations ... I have installed now .... fast and fluid device only that the maximum frequency of the big ones does not select 2880mhz .... only 2184 .... definitely not a kernel problem but some setting

    Hi,
    Yeah, max frequency is not selected automatically because newer Exynos's kernels are very complicated. Their is no fix to this issue in any kernel at this time. But max frequency can be used by setting min and max frequency to that value.
    Thx for your feedback
    3
    Eureka R8.0 update

    Changelog:

    → Upstream Linux Kernel Version from 4.4.277 to 4.4.288
    → Added ondemandplus CPU governor.
    → Added BFQ and ZEN v2 I/O schedulers.
    → Added a new backlight brightness controller. [Feature can be used when new EKM app is released] [Experimental]
    → "Samsung A10 1.2A input charging current" feature has been hardcoded in kernel.
    → Nuked CPU quiet and reverted back to Exynos Hotplug. It should fix issue of cores randomly turning off.
    → Fixed GPU frequency being limited to 1100 MHz after being throttled (v2.0).
    → Some optimizations for better FS performance for EXT4 file-system.
    → Fixed non-detection of some gamepad controllers (such as chinese ones).
    → Patched kernel for android 12 (S).
    → Some other minor optimizations.