[Samsung Galaxy Nexus] 7175:
Edit- yeah, adb and fastboot link here

Here's a little start up guide for adb backup restore, fastboot wiping for the cleanest fresh start, unlocking, and flashing from bootloader to get your sdcard data and filesystem data installed. Thought I'd mention the whole process, hope it helps.

***Download the "adb and fastboot" zip and the adb USB drivers to your PC that're around here somewhere. The Nexus Help guide in my sig probably has it. Extract the contents, should be a "adb" folder with adb.exe and fastboot.exe. Install the adb USB divers downloaded separately.

I would recommend doing a "adb pull /sdcard C:\backup\" to back up all of your 'sdcard' data (symlinked to /data/media or /data/media/0) to C:\backup\ or wherever. You can do this through adb from a computer connected to your phone by running that adb line in a command prompt (opened from the adb folder to avoid changing directories or typing them out). ADB can be run when your phone is booted to a ROM and USB adb is enabled OR you can do it from TWRP recovery. In cmd prompt, you can check if adb and drivers are working by running "adb devices" and checking that an ID number is displayed. If you encounter any errors, it's usually from a poorly named file. You can rename it from command with "adb shell mv oldname newname". If that doesn't do it, I would do fdisk command to check for bad sectors in which case you really need thorough format, fastboot style...

***DL twrp or cwm recovery .img into your adb folder on PC and rename to recovery.img before attempting this. Also have a ROM.zip DLed to flash***

For a good ol' fashioned fastboot cleansing, reboot your phone to the bootloader (fastboot) still connected to the computer. Open a command prompt from the folder containing fastboot.exe and execute "fastboot -w", cache and userdata erasure and reformat of sdcard. This will fix an otherwise f***ed data partition and unbrick your phone if you have that problem. CWM and TWRP can't perform an on-site cleansing like this, gotta do it in fastboot for off-site remote detonation. After this do "fastboot flash recovery recovery.img" to get back recovery. Enter "fastboot oem unlock" just in case to make sure bootloader's unlocked. Now boot into recovery, still connected to PC..

Transfer all your backed-up sdcard data back to /sdcard by executing "adb push C:\backup\ /sdcard". Restore twrp/cwm backup or install ROM to get your system OS back. Done.

If sdcard files are acting weird and crashing gallery or refusing to be deleted, open up android terminal emulator and run (**edit-see below) "busybox chmod -R 777 /data/media" and "busybox chown -R 1023:1023 /data/media" to set all sdcard file permissions to standard sdcard permissions. This is pretty common when transferring files to android from Windows. Mac should be ok, not sure though.

** (only use chmod 777 command if you tried chown 1023:1023 command first anf are still having access problems. A lot of files on sdcard use different read, write, execute rwx permissions. Chown 1023:1023 is safe though and the correct user:group permission fix for any file you want access to in /mnt/shell/emulated/0 aka /storage/emulated/0 aka /sdcard or /sdcard0.)