Update Cyanogenmod on Encrypted Phone with Clockworkmod

More a reminder for myself, but also for everyone else.

Some experienced that

adb sideload cm-filename.zip

works. Others don't. I don't. Here's what worked for me.

Boot phone into (CWM) recovery. As /sdcard is not mounable, mount a temporary folder. I have a Nexus 4 - only internal storage, which is located at /data.

adb shell
mount -t tmpfs none /data
mkdir /data/media
exit
adb push cm-filename.zip /data/media/update.zip

In CWM head to Install from zip and chose pushed update.zip.

There may be some warnings about ext4 detection, but I had no issues with them.