Decrypt /data partition under Cyanogenmod Recovery

Here is a trick I found to allow mounting an encrypted /data partition under Cyanogenmod Recovery. I’m not sure if you can run this on other recoveries due to lack of availability of vdc.

After booting into recovery, open an adb shell using adb shell and run the following:

setprop ro.crypto.state encrypted
vdc cryptfs checkpw 'your password'
mount /dev/block/dm-0 /data

It’s inconvenient but it works. I found this solution in an issue thread on github repo for TWRP. Hope this helps some of you out there.