[General Questions and Answers] RyanFang:
I Think my Internal sdcard is corrupted!

Please Help! Reflashing android won't work. I think the partition is corrupted!

Device: Google Nexus 5

Original OS: Android 5.1.0_r1 (LMY47D)

Recovery: TWRP 2.8.6.0

One day I turned my phone off, and later i decided to go into recovery. I believe I went inside Advanced Options and clicked "Fix Permissions." Then I proceeded to reboot. I was busy at the time, so when I remembered about my phone, I saw that it was still booting. It had been at least 30 minutes so I knew it was in a bootloop. I decided to go back into recovery and reflash the system.img onto it. No luck. I realized I had to try flashing the entire Nexus image (using the flash-all.bat). The phone would still not turn on. I tried flashing different versions of android, and here are my findings:

Android 5.1.0_r3, 5.1.0_r1, 5.0.1: all cause my phone to not be able to boot up (stuck on the 4 color flying animation)

Android 4.4.4, CyanogenMod (cm-11-20141008-SNAPSHOT-M11-hammerhead.zip): Allow my phone to boot up.

However, after I found that I could boot onto Android 4.4.4 and CyanogenMod, I realized that I could not get access to the sdcard!

Here are my findings:

When I go to the phone's root folder, I see a FILE called "sdcard"

When I go to \storage, I see a FILE called sdcard0

When I open camera, the app crashes (possibly because it stores pictures on the sdcard).

I tried to delete these files when I had root access with CyanogenMod but the file manager said "can't delete file." When I am in recovery mode (TWRP) however, I can see the sdcard folder and the contents. Just through every system boot, the sdcard is inaccessible.

After I realized that the problem wasn't due to the data on my phone (after flashing many system images), I realized my data partition might be corrupted. Then I went to this site and followed the directions: http://xdaforums.com/google-nexus-5/general/howto-repairing-corrupted-data-partition-t2577447

The e2fsck command didn't do anything as cmd said "The superblock could not be read or does not describe a correct ext2 filesystem."

Afterwards, my friend told me to try mke2fs /dev/block/platform/msm_sdcc.1/by-name/userdata

I typed that in adb shell and something happened. I started processing blocks or something. Unfortunately now, I am unable to mount the data partition at all. I am also unable to flash the userdata.img onto my phone through fastboot.

UPDATE: When I open up twrp recovery and look in the log I see the following:

E: Could not mount /data and unable to find crypto footer.

E: Unable to mount '/data'

E: Unable to recreate /data/media folder.

Updating partition details...

E: Unable to mount '/data'

E: Unable to mount '/cache/

E: Unable to mount '/persist'

...done

E: Unalbe to mount storage.

E: Unable to mount /data/media during GUI Startup.

E: Unable to mount '/cache'

Full SELinux support is present.

E: Unable to mount '/cache'

E: Unable to Mount '/cache'

E: Unable to mount /data/media/TWRP .twrps when trying to read settings file.

E: Unable to mount '/data'

MTP Enabled

Anyone know how to fix this? Please help, I owe you so much if you can solve this! Reply to me if you're able to help, I'm also new to xda so I don't really know how messages work. Thanks!