[Samsung Galaxy S20 FE Questions & Answers] Jalapenosaurus:
Obligatory first post on the forums here so hopefully this is the right place!

I have been lurking on the forums for the past month or so and have been working on building a custom kernel from source for the SM-G780F/DSC(Exynos) edition. I've built some kernels from source before so I have some experience there, but actually getting the kernel to flash and run on the device is a different story. I have built the kernel with the modifications that I wanted, fixed some flashing issues I was running into, finally got the boot.img to flash succefully to the device, rebooted the device and the phone just hangs at the Samsung logo. (See "Image from iOS.png").

Here is the steps that I did:

Unlock Bootloader on the device.USB Debugging on, OEM Unlocking enabled in dev settings/ OEM Lock: OFF(U) in DL mode.

Checked to make sure KG State is not Prenormal, it is in checking state.

Device is currently running stock G780FXXS7CUI5, so I download this version source from https://opensource.samsung.com/uploadSearch?searchValue=SM-G780F

Extract Kernel.tar.gz, update toolchain paths in the Makefile/build_kernel.sh, and I make some modifications to the defconfig file.

./build_kernel.sh

; Fix compiler errors/warnings as they appear. Rinse and repeat until the kernel is built.

Now that the kernel is built I pull the stock ROM that this device is currently running from Sammobile. https://www.sammobile.com/samsung/g.../SM-G780F/MID/download/G780FXXS7CUI5/1583411/

Extract the AP directory from the Sammobile ROM download.

Extract the boot.img.lz4 from the AP directory so I now have the uncompressed boot.img.

Copy over the the stock boot.img to my AIK directory. (AIK-Kinux-V3.8)

./unpackimg.sh boot.img

, cd into split_img, rm the stock boot.img-kernel

Move my custom kernel image to the AIK directory,

mv kernel_source/out/arch/arm64/boot/Image /AIK-Linux/split_img/boot.img-kernel

Run AIK repackimage.sh

Now I have a SM-G780G(Snapdragon edition) S20_FE with Magisk installed. So I copy over my image-new.img to this device and patch the image-new.img with Magisk

Move back the patched image to my linux enviroment. Rename my patched image boot.img.

Compress my boot img with

lz4 -B6 --content-size boot.img boot.img.lz4

.

Replace the stock boot.img.lz4 in my AP directory with my modded boot.img.lz4

Pull down a clean vbmeta.img from https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img

Compress this image as well

lz4 -B6 --content-size vbmeta.img vbmeta.img.lz4

Replace the stock vbmeta.img.lz4 in the AP directory with my clean vbmeta.img.lz4 in the

So the contents of the AP directory currently is

22556009 Apr 7 12:57 boot.img.lz4
1155 Sep 23 2021 dqmdbg.img.lz4
219753 Sep 23 2021 dtbo.img.lz4
4096 Sep 23 2021 meta-data
1148 Sep 23 2021 metadata.img.lz4
2773 Sep 23 2021 misc.bin.lz4
35115127 Sep 23 2021 recovery.img.lz4
5457239441 Sep 23 2021 super.img.lz4
822394050 Sep 23 2021 userdata.img.lz4
2375 Apr 7 12:57 vbmeta.img.lz4
2812 Sep 23 2021 vbmeta_samsung.img.lz4

tarball all these files with

tar -cvf Modded_AP.tar *

Spin up latest version of ODIN

Place Custom AP into AP slot, Stock BL into BL slot, Stock CP into CP slot, and Stock HOME_CSC into CSC slot

Start Flashing.

Flashing is successful.

Device reboots, and hangs at the Samsung Galaxy S20FE Screen with the warning "I am not running samsungs official software."

A couple of questions I am asking myself is the stock vbmeta_samsung.img.lz4 necessary, as well as some of the other stock files? Is patching my boot.img with Magisk running on a different

device giving me issues? Am i missing a step somewhere or is there still extra steps I need to take to get a modded kernel running on this device. Any help would be greatly appreciated or if I need to provide any more insight please let me know! Thanks again!