As written in the title, I have a Galaxy S5 (SM-G900F) with CyanogenMod 12.1 installed ("klte").
Everything worked semifine (apart from occasional reboots), and after a while I decided to encrypt the device.
Encryption seemed to have worked fine - on every boot, I had to enter my pattern.
A few days and reboots later, I changed my unlock pattern. So far, everything worked fine - the display could only be unlocked with the new pattern.
Then, I rebooted the device and it never finished the boot process; I have waited >15 minutes.
One strange thing is: Before I changed the pattern, TWRP always offered me a 3x3 pattern on startup (my pattern is 6x6). Now, it doesn't, and it can access both internal and external memory.
I have reinstalled CM12.1 via TWRP, but that did not help; nor did factory reset: The first boot after FR showed the message "Apps are being optimized", then "Android is starting / Apps are starting".
Then, with this message showing, nothing happened. I pulled out the battery, and now everything is like before: endless boot.
Is there a way to repair the device?