thank you i managed to get twrp working only on the official factory image. now i think the adb sideload is broken on twrp because on twrp menu, adb recognises device. but when you press adb sideload, adb stops recognising device. also when i flash a custom rom using twrp, for some reason twrp goes away and is replaced by the custom rom's recovery (resurrection remix), i think this replaces your custom kernel too. i flashed the custom kernel and twrp.img and magisk.zip after flashing the rom.zip, but still not working. when i tried installing the zip i got the error "size of image is larger than target device" so maybe thats what caused the problem. i also couldnt flash opengapps, it gave me error 70, which is due to insufficient space, even though i have 110gb free.