Unlock encrypted Android from ADB I have the following problem: Somehow, this evening the touchscreen of my Sony Xperia Z broke. I have two thin cracks in the display and everything on the right side of the crack does not react.
I have backup phones but I wanted to get back at least my photos. My device is encrypted with a passphrase, but I cannot type. My idea was, to unlock it from adb, so I can backup my data.
I run SlimKat (SlimRom) with TeamWin Recovery.

When I enter recovery mode, I can see my phone:

$ adb devices
List of devices attached 
CB5A1PN2WU  recovery


But no commands work:

$ adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -


How can I get my data? Can I remotely control my keyboard? Sadly, everything is saved on the internal flash memory.
The Xperia Z supports USB-on-the-go, so with a USB-OTG adaptor and a USB keyboard you should be able to enter the encryption passphrase to boot the device.