TWRP recovery with modified kernel
I was unable to boot into recovery mode, when trying to root my Sony Xperia Z5 for the first time.
It worked after modifying my Android 7 Nougat kernel with this tool: https://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
After that I had to but also could enter recovery mode via "adb reboot recovery". Which then worked well for me.
Trying to install lineageos... .zip, the check for right device was wrong in my case.
Installing zip file '... .zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
E3004: This package is for device: E6633,E6653,sumire,sumire_dsds; this device is .
E:unknown command [log]
Updater process ended with ERROR: 7
Error installing zip file '....zip'
Updating partition details
It can be changed easily as desribed here:
https://forum.xda-developers.com/showthread.php?t=2522762
Worked well for me.