• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[KERNEL][CUSTOM] Eureka kernel for all variants of Galaxy A40 for Q & R based vendor ROMs

How is your experience with Eureka kernel?

  • Improves performance and gaming experience

    Votes: 6 85.7%
  • Improves gaming experience only

    Votes: 0 0.0%
  • Improves performance only

    Votes: 1 14.3%

  • Total voters
Search This thread


Senior Member
Jul 30, 2020
Eureka R7.5 update


→ 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.


Feb 21, 2020
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.

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!

    Due to Samsung heavy changes in R vendor (Oneui 3), 2 kernels had to be made. One kernel is named Q/R and the one is called R. Q/R kernels can only be used on Q vendor based roms, that is, ONEUI 2.x, Q/R GSIs, Q/R Eureka Roms. R kernels can only be used on R based vendor, that is, ONEUi 3.x for the time being

    Each of the 2 above mentioned kernels has 2 versions. One version has enforcing selinux and the other one has permissive selinux. So, please download the correct version.

    * 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 lz4.
    * 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
    * 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.277
    * Built with Proton Clang 13 toolchain with LTO. Reason: Better performance

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

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

    * 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.

    Best kernel manager for Samsung A series devices is HkTweaks:
    LINK: https://github.com/corsicanu/hKtweaks/releases/

    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

    Download links for A40 (Download accordingly):
    All releases of Eureka for Q based vendor ROMs
    All releases of Eureka for R based vendor ROMs
    Customize Eureka with different frequencies (Flash in recovery)

    Source code for my kernel:
    Kernel source on GitHub


    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

    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 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!)
    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

    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
    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;)
    Huge thank you for this great job
    Works nickel on my firm stock
    I don't play, I wouldn't vote.

    Thank you for your feedback :laugh: