[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: 14 77.8%
  • Improves gaming experience only

    Votes: 0 0.0%
  • Improves performance only

    Votes: 4 22.2%

  • Total voters
    18
Search This thread

Chatur27

Senior Member
Jul 30, 2020
229
246
Moka
Better tell this Chatur.
I was searching for a donation button, but he likes the like button more. :giggle:
I do not say no to donation xD. It helps me to rent a VM server to build roms (Yeah, i build roms too lol but mostly for A10)
I didn't want to add the donation button on the post because i developed this kernel to improve the phone's performance, not for money :giggle:
 

Chatur27

Senior Member
Jul 30, 2020
229
246
Moka
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!)
:)
Kernels have been fixed in thread as from now. The non-working kernels have been replaced. Ty
 

Elmarigo

Senior Member
Jun 13, 2014
208
77
Can you tell me what's the reason for this phone to freeze when it's being charged offline? Where would this need to be fixed? In the ROM or the kernel?
Or even another component? Thank you!
 
  • Like
Reactions: Chatur27

Elmarigo

Senior Member
Jun 13, 2014
208
77
Thank you.
What I forgot to ask:
How is it separated in case of an GSI ROM? Charging probably doesn't work same for all Treble phones.
So, doesn't there need to be some seperate "whatever-special-low-level" part of the Rom independent from the GSI part?

I just asked RoborHanzo who compiles the RR-GSI build, but as such he probably doesn't know specifics about the Galaxy A40, so I am trying try to understand where I would have to look for a fix. I remember that I once (with another GSI ROM and the ROM's standard kernel) flashed some special thingy through TWRP for making MTP work in the recovery.. maybe it got to do with that?
 
Last edited:

alexnonim

Member
May 2, 2021
12
3
Hello I recently update to Android 11, but I want to use this kernel and it is only compatible for Android 10 Q. What steps I will need to do for use it?
 
  • Like
Reactions: Chatur27

Chatur27

Senior Member
Jul 30, 2020
229
246
Moka
Will commits made to the GitHub be included in any update for Android 11? If so I can maybe take a look there and see if I can see what is causing the incompatibility issues...
R kernel sources have too many changes. I ported only gpu and sdcardfs to Q kernel. But it's not enough.
I have to make Eureka on whole new R sources
 
  • Like
Reactions: alexnonim

Elmarigo

Senior Member
Jun 13, 2014
208
77
Hello! Why are the download links dead? :(
The Android 10 build is completely gone from github.
Edit: I found Kernel 5.0 on Telegram. But after flashing the touchscreen doesn't work anymore in RR.
 
Last edited:

Elmarigo

Senior Member
Jun 13, 2014
208
77
In case it wouldn't work: do you know how I could fix the phone
without having to revert to full stock by an complete Odin-flash?
 

Elmarigo

Senior Member
Jun 13, 2014
208
77
I have done so, and you are right, the touchscreen is working, thank you!
Sadly this didn't solve my problem, but introduced another one:
I was using the physwizz kernel before, and like with physwizz, also with Eureka, I cannot write to the SD card when it's formatted as ext/f2fs/exFAT. Only FAT32 is working for both, reading and writing, but this isn't sufficient because of file size limitations :(
And with Eureka now, also MTP isn't working anymore..
Edit: Flashed back to Physwizz. MTP is working again, but I still only can use FAT32 for the SD Card ..

Don't you have these issues, too?
 
Last edited:

alexnonim

Member
May 2, 2021
12
3
I have done so, and you are right, the touchscreen is working, thank you!
Sadly this didn't solve my problem, but introduced another one:
I was using the physwizz kernel before, and like with physwizz, also with Eureka, I cannot write to the SD card when it's formatted as ext/f2fs/exFAT. Only FAT32 is working for both, reading and writing, but this isn't sufficient because of file size limitations :(
And with Eureka now, also MTP isn't working anymore..
Edit: Flashed back to Physwizz. MTP is working again, but I still only can use FAT32 for the SD Card ..

Don't you have these issues, too?
No MTP, work well for me I don't have any bugs right now... Eureka is a better kernel, more improvements, better performance... Do a backup of SD, format it and recover it. You will finish sooner!
 

Elmarigo

Senior Member
Jun 13, 2014
208
77
I formatted the SD card about 20 times with all the different filesystems. But it will onyl work right with FAT32.ll the others don't work at all or are just read-only.
There has to be a reason why MTP only is working for me with the physwizz kernel, but not with Eureka.
Which OS are you using? I have ResurrectionRemix GSI by RobotHanzo.
 

alexnonim

Member
May 2, 2021
12
3
I formatted the SD card about 20 times with all the different filesystems. But it will onyl work right with FAT32.ll the others don't work at all or are just read-only.
There has to be a reason why MTP only is working for me with the physwizz kernel, but not with Eureka.
Which OS are you using? I have ResurrectionRemix GSI by RobotHanzo.
Right now I'm testing ALT+F4 Rom and it's working well, maybe the rom?
 

Elmarigo

Senior Member
Jun 13, 2014
208
77
If I only I knew wheter a problem resulted from AOSP, from RR, from the GSI implentation, from the kernel.. or whatever :) It's always so spread out.
But at this moment I could fix the SD-card Problem:

In the RR-GSI-thread @eremitein told me to set SELinux to permissive (setenforce 0) and I can write the sd card even with f2fs now, with both kernels :) So this was a Rom thing ( I gues SELinux in general is..)

So, only the MTP problem remains, which is said to be fixed by using a custom device kernel in the ROMs's thread, hmhmhm..
But at least I can now use my phone!
 
  • Like
Reactions: alexnonim

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