[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
New release is up !!

Changelog

Kernel V. 2022.04.20

Improved stability

Improved memory management

Improved multitasking

Fixed BT issues

Fixed MTP Android version

Fixed compatibility issues with emulators apps like Windows emulator

Optimized USB-OTG driver

USB: improved speed for USB-tethering

Added support for F2FS

A2N Kernel Control V. 4.6

Screen: added HDMI/DEX custom resolution changer (to fix low resolution / refresh rate)

Misc: fixed MTP driver version Android

Screen: moved input booster to CPU

Source update

Reduced startup time

Improved stability

Fixed bugs

Release Notes

1. make sure your build.pro has the following dalvik-heap config:

dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=256m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m

after that, flash latest A2N kernel and wipe dalvik-cache.

2. F2FS

Note: the following guide in NOT tested at all.

So it may not work at all, or you have to add or fix additional things by yourself.

In this guide we will convert /system & /data from ext4 to f2fs.

It's maybe also benificial to convert /preload as well if it's used from your ROM, e.g. like it's the case for the Samsung stock ROM !

Do NOT touch other partitions !!

to switch to F2FS, follow those steps:

(apps and settings will stay on place)

2.1: in twrp: backup /system and /data

2.2: unpack latest A2N kernel and grab the boot.img, then with AIK-Linux unpack the boot.img and edit the ramdisk:

fstab.samsungexynos8895

#/dev/block/platform/11120000.ufs/by-name/SYSTEM /system ext4 ro,errors=panic,noload wait
/dev/block/platform/11120000.ufs/by-name/USERDATA /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,encryptable=footer,quota

in

/dev/block/platform/11120000.ufs/by-name/SYSTEM /system f2fs ro,errors=panic,noload wait
/dev/block/platform/11120000.ufs/by-name/USERDATA /data f2fs noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,encryptable=footer,quota

init.a2n.rc

# load F2FS modules
#insmod /lib/modules/crc32.ko
#insmod /lib/modules/f2fs.ko

in

# load F2FS modules
insmod /lib/modules/crc32.ko
insmod /lib/modules/f2fs.ko

repack boot.img and recreate a a2n_kernel.zip with the same structure using only zip compression.

2.3: Now lets do the same for twrp.zip Download twrp version from my FTP server as it has F2FS support ready like the kernel and grab the recovery.img and unpack it using AIK-Linux like before. Edit the ramdisk:

fstab.samsungexynos8895

#/dev/block/platform/11120000.ufs/by-name/SYSTEM /system ext4 ro,errors=panic,noload wait
/dev/block/platform/11120000.ufs/by-name/USERDATA /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,encryptable=footer,quota

in

/dev/block/platform/11120000.ufs/by-name/SYSTEM /system f2fs ro,errors=panic,noload wait
/dev/block/platform/11120000.ufs/by-name/USERDATA /data f2fs noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,encryptable=footer,quota

etc/recovery.fstab

/system ext4 /dev/block/platform/11120000.ufs/by-name/SYSTEM flags=display="System"
/data ext4 /dev/block/platform/11120000.ufs/by-name/USERDATA flags=encryptable=footer;length=-20480

in

/system f2fs /dev/block/platform/11120000.ufs/by-name/SYSTEM flags=display="System"
/data f2fs /dev/block/platform/11120000.ufs/by-name/USERDATA flags=encryptable=footer;length=-20480

init.rc

# load F2FS modules
#insmod /lib/modules/crc32.ko
#insmod /lib/modules/f2fs.ko

in

# load F2FS modules
insmod /lib/modules/crc32.ko
insmod /lib/modules/f2fs.ko

repack recovery.img and recreate a twrp.zip with the same structure using only zip compression.

2.4: flash patched twrp.zip and reboot to twrp.

2.5: format /system and /data as F2FS

2.6: restore your /system and /data backup

2.7: flash patched a2n_kernel.zip

2.8: wipe dalvik-cache and reboot.

Check your work:

After Android is fully booted up, check if F2FS modules are loaded properly:

(use terminal emulator app or ADB)

su
lsmod

you should see f2fs & crc32 module.

Check if /system & /data is properly mounted as F2FS:

mount | grep f2fs

If your phone will stuck at boot logo, then your ROM doesn't support F2FS.