[Xperia Z3 Compact General] russel5:
Thread updated, again. Added working version with decryption at least on LineageOS 14.1

Thanks [MENTION=6979267]nailyk[/MENTION]

I:Is encrypted, do decrypt page first
I:Switching packages (TWRP)
I:Set page: 'decrypt'
I:Set page: 'trydecrypt'
I:operation_start: 'Decrypt'
crypt_ftr->fs_size = 24719295
Using scrypt with keymaster for cryptfs KDF
keymaster module name is Keymaster QCOM HAL
keymaster version is 3
Found keymaster0 module, using keymaster0 API.
E:Decrypt took too long, killing process
I:Child process killed successfully
TW_CRYPTO_USE_SYSTEM_VOLD := true
Checking existence of vendor and firmware partitions...
I:Is_Mounted: Unable to find partition for path '/vendor'
I:Is_Mounted: Unable to find partition for path '/firmware'
Attempting to use system's vold for decryption...
List of additional services for vold_decrypt:
qseecomd: Enabled as sys_qseecomd -> /system/bin/qseecomd
Setting up folders and permissions...
Symlinking vendor folder...
Symlinking firmware folder...
Symlinking firmware files...
10 file(s) symlinked.
Starting services...
Start service sys_qseecomd: running.
Start service sys_vold: running.
About to run vdc...
Retrying connection to vold (Reason: Error connecting to cryptd: Connection refused)
Connected to vold (213 245 pinret=0)
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram0' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram1' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram2' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram3' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram4' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram5' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram6' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram7' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram8' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram9' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/loop0' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/loop1' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/loop2' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/loop3' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/loop4' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/loop5' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/loop6' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/loop7' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram10' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram11' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram12' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram13' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram14' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/ram15' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/zram0' - add
I:Found no matching fstab entry for uevent device '/devices/msm_sdcc.1/mmc_host/mmc1/mmc1:0001/block/mmcblk0/mmcblk0rpmb' - add
I:Found no matching fstab entry for uevent device '/devices/msm_sdcc.1/mmc_host/mmc1/mmc1:0001/block/mmcblk0' - add
vdc cryptfs result (passwd): 200 246 0 (ret=0)
Stopping services...
I:Found no matching fstab entry for uevent device '/devices/msm_sdcc.1/mmc_host/mmc1/mmc1:0001/block/mmcblk0/mmcblk0rpmb' - add
Stop service sys_vold: stopped.
Stop service sys_qseecomd: stopped.
Finished.
[COLOR="Red"]Data successfully decrypted, new block device: '/dev/block/dm-0'[/COLOR]