[OnePlus X General] tofublock:
Who can help me with this:

My phone was encrypted. Today I unlocked the bootloader and flashed TWRP, but what's really odd was that the bootloader unlock didn't format my /data. Everything was just as it was before, except my bootloader was definitely unlocked and I could boot into TWRP. Next I tried to make a backup in TWRP but couldn't, since TWRP couldn't mount anything with write permissions - which kind of made sense to me. The phone was encrypted after all.

Next, I tried a manual factory reset from system settings - nothing.

Then - and that's where I made my mistake I think - I locked the bootloader again.

I played around some more and found out that formatting /data works from TWRP. So what I have now is this:

Locked bootloader, TWRP and stock Oxygen

Now when I try to unlock the bootloader again I get this shell output from TWRP:

Updating partition details...
...done
Full SELinux support is present.
Processing AOSP recovery commands...
Unable to locate zip file '16'.
Installing '16'....
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
E:Failed to sysMapFile '16'
E:Error installing zip file '16'
Done processing script file
MTP Enabled

This leads me to believe, that this '16' file was stored somewhere on /data, contains the bootloader unlock routine and is now gone. Does that make sense?

Any ideas?

Edit:

Additional information from TWRP log

[...]
Full SELinux support is present.
I:Boot command: boot-recovery
I:Boot status: OKAY
I:Got arguments from boot message
Startup Commands: '--oemunlock_aboot' '--unlocked_offset=16'
[...]
I:Inserting 'install 16'
I:Copying file /cache/recovery/log to /cache/recovery/last_log
tw_get_context got selinux context: u:object_r:media_rw_data_file:s0
I:Got default contexts and file mode for storage files.
I:Attempt to load settings from settings file...
I:Loading settings from '/data/media/0/TWRP/.twrps'.
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/7874a477'
I:Copying file /etc/recovery.fstab to /cache/recovery/recovery.fstab
I:Version number saved to '/cache/recovery/.version'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'auto'
I:Unable to mount '/external_sd'
I:Actual block device: '', current file system: 'auto'
__bionic_open_tzdata: couldn't find any tzdata when looking for CST6CDT,M3.2.0,M11.1.0!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:TWFunc::Fixup_Time: Pre-fix date and time: 1970-02-22--16-36-20
I:TWFunc::Fixup_Time: Setting time offset from file /sys/class/rtc/rtc0/since_epoch
I:TWFunc::Fixup_Time: will attempt to use the ats files now.
I:TWFunc::Fixup_Time: Setting time offset from file /data/time/ats_2, offset 1445537498137
I:TWFunc::Fixup_Time: Date and time corrected: 2015-12-14--09-47-58
I:Switching packages (TWRP)
I:Skipping screen timeout: TW_NO_SCREEN_TIMEOUT is set
I:Set page: 'action_page'
I:operation_start: 'OpenRecoveryScript'
Processing AOSP recovery commands...
I:command is: 'install'
I:value is: '16'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'auto'
I:Unable to mount '/external_sd'
I:Actual block device: '', current file system: 'auto'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'auto'
I:Unable to mount '/external_sd'
I:Actual block device: '', current file system: 'auto'
I:Trying to find zip '16' on '/data/media/0'...
Unable to locate zip file '16'.
Installing '16'...
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
sysutil: Unable to open '16': No such file or directory
E:Failed to sysMapFile '16'
E:Error installing zip file '16'
Done processing script file
I:operation_end - status=1

Edit2: Reflash stock recovery from here via TWRP and start over?