I know it's an quite old thread but just in case someone is looking for a solution ...
as I just moved my Xperia X from Sailfish to Ubuntu touch - you just have to:
Flash the OEM binaries from: https://developer.sony.com/file/download/software-binaries-for-aosp-nougat-android-7-1-kernel-4-4-loire/
unzip, go to the dir and
fastboot flash oem SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_loire.img
run the UBports Installer - tick wipe user data to be on the safe side