Development [Kernel] [5.10.142] [AOSP/OneUI] Loki Kernel | Exynos2200 | S22 (Plus / Ultra)

Search This thread

Jeik

Senior Member
Jun 27, 2011
5,175
2,720
Dublin
Samsung Galaxy A72 4G
Xiaomi Poco F3
Loki Kernel for S22 (Exynos)


Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

Supported devices:
- SM-S901B (r0s)
- SM-S906B (g0s)
- SM-S908B (b0s)

Features:

- upstreamed to 5.10.142
- disabled Knox crap
- added a wakelock blocker (along with a default list - TLDR would be much better idle drain)
- fixed Wi-Fi hotspot on GSIs
- some other tweaks
- etc.

Instructions:

Flash the zip via TWRP / FKM.

Changelog/Downloads


Telegram Group


Kernel Source


Thanks to haridhayal for all the help.
Thanks to afaneh92 for the kernel source/base.
 
Last edited:
  • Love
Reactions: turb1te

sloeberiaan

Member
Jan 18, 2009
13
1
Loki Kernel for S22 (Exynos)


Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

This kernel has only been tested on GSIs. It might work on OneUI but try it at your own risk.​


Supported devices (for now):
- SM-S901B

Features:

- disabled Knox
- added a wakelock blocker
- minor tweaks
- etc.

Instructions:

Flash the kernel image via fastbootd:
Code:
fastboot flash boot Loki_Kernel_v1.0_r0s.img

Changelog/Downloads


Telegram Group


Kernel Source


Thanks to haridhayal for helping me and for his S21 kernel that was used as a reference.
Thanks to afaneh92 for the kernel source/base.

Hi There!

I would like to give this kernel a shot but would like to build it myself.

Could you give me a hand here since this is my first time, I do have programming experience, but none compiling Android kernels.

I see in your readme that you are using these dependencies:

/home/jgudec/Exynos2200/toolchain/
/home/jgudec/build-tools/
/home/jgudec/gas/

Could you please tell me for the toolchain, build-tools and gas where and what versions of those you got for building?

Thansk!
 

bamn

Senior Member
Jul 23, 2010
277
106
So as this is my first Samsung phone which seems less "mod" friendly then my previous devices;

I am rooted exynos base s22 on AVG6 as I'm not able to successfully flash newer firmwares.

Can I just flash this with FKM and live happily ever after?
Or are there some prerequisites or things to consider?

Appreciate the work! It's a shame to see the lack of custom development, so thank you!
 

Jeik

Senior Member
Jun 27, 2011
5,175
2,720
Dublin
Samsung Galaxy A72 4G
Xiaomi Poco F3
So as this is my first Samsung phone which seems less "mod" friendly then my previous devices;

I am rooted exynos base s22 on AVG6 as I'm not able to successfully flash newer firmwares.

Can I just flash this with FKM and live happily ever after?
Or are there some prerequisites or things to consider?

Appreciate the work! It's a shame to see the lack of custom development, so thank you!

I've updated the kernel source with changes from the AVG6 firmware, so you should be good to go.

If any issue arises, you can always go back to the stock kernel.

It is a shame (the development state), but hopefully that will change as more time passes.
 

bamn

Senior Member
Jul 23, 2010
277
106
Thanks for your fast reply.

Just to be sure, when flashing with FKM there is nothing wiped?
If for some reason I would want to go back to stock i need to go through Odin or is stock kernel available somewhere?

If I would find a way to update to AVH9 (or newer) normally the kernel should still be compatible right?
 

Jeik

Senior Member
Jun 27, 2011
5,175
2,720
Dublin
Samsung Galaxy A72 4G
Xiaomi Poco F3
Thanks for your fast reply.

Just to be sure, when flashing with FKM there is nothing wiped?
If for some reason I would want to go back to stock i need to go through Odin or is stock kernel available somewhere?

If I would find a way to update to AVH9 (or newer) normally the kernel should still be compatible right?

When you flash a kernel, there is no need to wipe the data of your device.

You can get the stock boot.img by downloading the firmware, opening up the AP file in 7-Zip Z-Standard and opening up boot.img.lz4 (you need to use 7-Zip Z-Standard, not the regular 7-Zip, to extract .lz4 files) and taking out the boot.img.
After that, just compress the boot.img into a .tar file and flash that file through the AP slot of Odin.

You can also patch that boot.img with Magisk Manager (on any rooted or non-rooted phone) if you want it to be rooted from the get-go.
 
  • Like
Reactions: bamn

bamn

Senior Member
Jul 23, 2010
277
106
When you flash a kernel, there is no need to wipe the data of your device.

You can get the stock boot.img by downloading the firmware, opening up the AP file in 7-Zip Z-Standard and opening up boot.img.lz4 (you need to use 7-Zip Z-Standard, not the regular 7-Zip, to extract .lz4 files) and taking out the boot.img.
After that, just compress the boot.img into a .tar file and flash that file through the AP slot of Odin.

You can also patch that boot.img with Magisk Manager (on any rooted or non-rooted phone) if you want it to be rooted from the get-go.
Thanks again!

Last question, couldn't I just flash the full (patched) AP file?
This would flash more than just the kernel, but that doesn't really matter right?
 

lowowly

Member
Nov 14, 2022
11
0
Hi There!

I would like to give this kernel a shot but would like to build it myself.

Could you give me a hand here since this is my first time, I do have programming experience, but none compiling Android kernels.

I see in your readme that you are using these dependencies:

/home/jgudec/Exynos2200/toolchain/
/home/jgudec/build-tools/
/home/jgudec/gas/

Could you please tell me for the toolchain, build-tools and gas where and what versions of those you got for building?

Thansk!
Did you get a proper manual @sloeberiaan ?

I also wanna build my own kernel for S22 and flash it with TRWP/FKM, but I cant find proper "newbie" friendly documentation so far.

I tried LineageOS self building setup, thats works great with S10 ... but unfortunately not with S22 of course :)

So my intention is to add some features to the kernel to run docker. As mentioned in https://gist.github.com/FreddieOliveira/efe850df7ff3951cb62d74bd770dce27

Cheers!
 

sloeberiaan

Member
Jan 18, 2009
13
1
Did you get a proper manual @sloeberiaan ?

I also wanna build my own kernel for S22 and flash it with TRWP/FKM, but I cant find proper "newbie" friendly documentation so far.

I tried LineageOS self building setup, thats works great with S10 ... but unfortunately not with S22 of course :)

So my intention is to add some features to the kernel to run docker. As mentioned in https://gist.github.com/FreddieOliveira/efe850df7ff3951cb62d74bd770dce27

Cheers!
Hi

I am afraid I never did find one, also could not spend anymore time on it :(

Did you ever manage to figure it out yourself?

Regards
 

lowowly

Member
Nov 14, 2022
11
0
Hi

I am afraid I never did find one, also could not spend anymore time on it :(

Did you ever manage to figure it out yourself?

Regards

No, not really. Couldn't find a manual. I found more like a solution inside the "build_menu" bash script from afaneh92 located inside the kernel config.

Just download/git clone the kernel source

The bash script "build_menu" will automatically install build-tools, gas and clang. Then you are good to go to compile your own kernel with the commands inside the build_menu. Steps are build kernel -> create flashable zip -> flash with TWRP or FKM. To adjust features you have to rewrite the defconfigs or adjust the build_menu script.

At the moment I stuck in bootloop after flashing my own kernel with additional features. Have a look at this post.
 
Last edited:

insestito

Senior Member
Jul 29, 2009
1,077
181
Xiaomi 12T Pro
Not really find a manual more like a solution inside the "build_menu" bash script located inside the kernel config.

Just download/git clone the kernel source

The running bash build_menu, it will automatically install build-tools, gas, clang. The you are good to go to compile your own kernel with the commands inside the build_menu. Its more like build kernel -> create flashable zip -> flash with TWRP or FKM. To adjust features you have the rewrite the defconfigs or adjust the build_menu script.

At the moment I stuck in bootloop after flashing my own kernel with additional features. Have a look at this post, I explain my problem.
Good morning, i git cloned the source, then i make "build_menu", but i have this error.
How can i fix it?
 

Attachments

  • Screenshot_2023-01-30_09_19_52.png
    Screenshot_2023-01-30_09_19_52.png
    777.6 KB · Views: 38

lowowly

Member
Nov 14, 2022
11
0
Good morning, i git cloned the source, then i make "build_menu", but i have this error.
How can i fix it?
First time you started the build_menu script, did it automatically download the necessary tools (gas, clang, build-tools)? The location should be in the parent directory (../Downloads). Are there any folders with naming clang-r416183b, gas or build-tools?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    New builds up.

    Changes:
    - Upstreamed to 5.10.138
    - Added builds for One UI along ones for AOSP
    - Other tweaks regarding performance and battery life (at least I hope so)
    - Added more wakelocks to the blocking list
    1
    Loki Kernel for S22 (Exynos)


    Code:
    /*
    * Your warranty is now void.
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.
    */

    Supported devices:
    - SM-S901B (r0s)
    - SM-S906B (g0s)
    - SM-S908B (b0s)

    Features:

    - upstreamed to 5.10.142
    - disabled Knox crap
    - added a wakelock blocker (along with a default list - TLDR would be much better idle drain)
    - fixed Wi-Fi hotspot on GSIs
    - some other tweaks
    - etc.

    Instructions:

    Flash the zip via TWRP / FKM.

    Changelog/Downloads


    Telegram Group


    Kernel Source


    Thanks to haridhayal for all the help.
    Thanks to afaneh92 for the kernel source/base.
    1
    Thanks for your fast reply.

    Just to be sure, when flashing with FKM there is nothing wiped?
    If for some reason I would want to go back to stock i need to go through Odin or is stock kernel available somewhere?

    If I would find a way to update to AVH9 (or newer) normally the kernel should still be compatible right?

    When you flash a kernel, there is no need to wipe the data of your device.

    You can get the stock boot.img by downloading the firmware, opening up the AP file in 7-Zip Z-Standard and opening up boot.img.lz4 (you need to use 7-Zip Z-Standard, not the regular 7-Zip, to extract .lz4 files) and taking out the boot.img.
    After that, just compress the boot.img into a .tar file and flash that file through the AP slot of Odin.

    You can also patch that boot.img with Magisk Manager (on any rooted or non-rooted phone) if you want it to be rooted from the get-go.
    1
    Thanks again!

    Last question, couldn't I just flash the full (patched) AP file?
    This would flash more than just the kernel, but that doesn't really matter right?

    Of course, you can flash the whole AP package, I just am not sure if it will then wipe your data.