How to pipe output of dd to a computer via adb shell? I've accidentally wiped my phone and lost all my photos. I'm going to try to run photorec on an image of my phone.

What I'd like to do is somehow something along these lines:

adb shell
dd if=/data of=/file/on/my/computer/not/on/phone


Is there any way to do this? I'm using a linux PC.

I saw this related question (Create a dd image of a Android 4.4.4 for forensics?) but it writes to the same device - my device is a nexus 6 so I don't have an sd card to write to (and doing so would likely over write the data I'm trying to recover)
This functionality has not been implemented in ADB yet.  However, there are workarounds that some users have come up with.  Check out this thread on XDA Developers for more information on how you can work around this limitation.