If you have bootloader unlocked, maybe flash recovery using fastboot and leave kernel without recovery integrated?
Nope no luck. I tried many combinations to get things working including all suggested. I even flashed both the working recovery and working (older kernel by androplus). Then went into recovery and flashed the PoC created stock kernel from there. Upon reboot recovery stopped working. No led during boot, no reaction to pressing vol key but phone itself booted to system.As said above why not just flash recovery to fotakernel (fastboot flash recovery twrp.img) and leave it out from kernel? To get into TWRP press power+vol untill phone turns on. That will work fine and you won't have to rely on kernel and recovery image is compatible every time there is an update to either one. Just exclude fotakernel in flashtool when updating and recovery won't be overwritten, or you will have to fastboot flash recovery again.
As another example you don't even need to flash recovery, it can also be booted with 'fastboot boot twrp.img' by now getting into recovery and get root should be the least of your problem.
Sorry for sidetracking the thread.
So whatever makes this revovery work is some special sauce androplus has baked into his kernel and obviously the PoC version is missing this. Just dunno what that something is. Here's the thread: https://xdaforums.com/x-compact/development/advanced-stock-kernel-twrp-xperia-x-t3464685
And notes:
So i assume PoC is doing almost the same exept DRM fix wich is unnessesary and SELinux Permissive wich would only work for Marshmallow if i read munjeni's answer correctly. I assume PoC also loads recovery from FOTAKernel if i choose to include it?Advanced stock kernel
-For 34.1.A.1.198
-ric, dm-verity disabled
-DRM patch from tobias.waldvogel
-SELinux Permissive
-Load recovery from recovery (FOTAKernel) partition