Step 1: dd the contents into an image ddrescue is probably a better option than plain dd.
step 2: put the sdcard to one side. > step 3: loopback mount a copy of the image (not the original) > step 4: try recovering the filesystem on the loopback, if it fails ... try > something else on another image copy Yep, once you've got the image mounted loopback, you can run testdisk/photorec depending on how bad it is.