[Vibrant General] doiiido:
09/01/2012:

this tutorial may work for those who are having encryption issues on ics or jb roms (the error is related to mmcblk0p2(data))

well, after some months of work, here´s an tutorial about how to fix the mostly common sdcard issues.

1º Of all :***Be sure of what you´re doing,or else you can corrupt the partition table of you sdcard/brick your phone,and I´ll not be responsible of it***

2º-Do Not send me PMs, post here so everyone that have the same problem can now how to fix it.

3º-If you are an starter, you can post here your questions,but be sure that you haven´t found answers on Google or other threads.

and 4º-Read ALL topic before start and try one solution than the other,they´re in order of difficulty and risk of get an "permanent" brick.

0 - Always backup your EFS folder, maybe its not related to this thread but it´s also very important to remember.

I -If you have a folder called "voodoo" in your sdcard, you may have voodoo enabled on your ROM, so be sure of disabling it before trying a new rom or a stock rom.

if you´re on another rom already and having problems in mounting partitions, try to flash you last rom or a kernel that supports voodoo and it´s compatible with your new rom.

II-If you´re getting problems in mounting DBDATA,Download a full rom that contains DBDATA to flash with odin(or only flash dbdata,but you´ll have to do a full wipe later). To see if it haves dbdata.rfs by opening your .tar file in 7zip or others.

III-If you´re getting Can´t mount data (dev/block/mmcblkl0p2) File exists, try to flash an kernel with voodoo suport,if it still the same, format data in the menu of your recovery.

IV-If you´re getting can´t mount sdcard (/dev/block/mmcblk0p1)File exists, try to access it via ADB and send pull file command to recover your files(must have root),if you could do that, so try to format it via recovery.If not work,Download gparted, burn it on cd (it´s an CD with a tool of linux) and go to ADB shell to run this command:

su

echo /dev/block/mmcblk0 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file

now

reboot your PC in gparted and format mmcblk0p1(it´s the first partition) in FAT32.

Done

V-If you´re getting cant mount sdcard (/dev/block/mmcblk0p1) with (invalid argument) You can try the fix IV and see if it works,if not, proceed to VI.

VI-If you´re getting cant mount data(dev/block/mmcblk0p2) or can´t mount sdcard (/dev/block/mmcblk0p1) with (invalid argument) or (no such file or directory) you may have to do this:

***search on google for 'fdisk' commands first***

You MUST*¹ remake your partition table manually,so the phone have the /data partition back to boot.

*¹

In some cases you can use gparted to do this, without doing it manually,

you shoud only mount mmcblk0 before.

you can run this command line on adb shell to mount it:

echo /dev/block/mmcblk0 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file

You Will have to format it and it MUST have the partitions as said below.

YOU SDCARD MUST HAVE THE FOLLOWING PARTITION TO BOOT ON AND RECOGNIZE INTERNAL SDCARD:

/dev/block/mmcblk0p1

AND

/dev/block/mmcblk0p2

Start:

Open ADB,comnect your phone and proceed.

run adb shell

su

fdisk /dev/block/mmcblk0

p (you should see your partition table,POST HERE BEFORE CONTINUING)

YOU ARE NOW ABOUT TO REMAKE YOUR PARTITIONS:

partition 1 will correspond to mmcblk0p1(SDcard) and partition 2 will correspond to mmcblk0p2 (DATA)

**DO ONLY AS I SAY HERE, UNLESS YOU MAY GOT I/O ERROR ON YOUR SDCARD AND ITS ALL OVER. I say because it happened to me and i had to dissolder the internal sdcard an use only the external.**

**********IF YOU DONT HAVE ANY IDEA OF LINUX COMANDS: DO NOT PROCEED !!!!!!!!!*************

tap on adb:

n (will create a new partition)

1 (partition number)

press enter on keyboard so it selects the first block

get a calculator and estimate the size of the partition 1.IT MUST HAVE around 2GB left.

write the block number you got in calculator(BE SURE OF WHAT YOU TAPE HERE)

t

b (partition 1 is done and formatted as fat 32)

Now again:

n

2

enter on keyboard

enter again so it select the last block

(DO NOT TYPE COMMAND "T" FOR PARTITION 2, IT BY DEFAULT SET TO LINUX EXT FORMAT)

p (you will see you new partition table)

****IT MUST HAVE 2 partitions, partition 1 is in fat 32 format and partition 2 is in linux format(AND MUST HAVE AROUND 2GB)****

w (IT WILL WRITE YOU NEW PARTITION TABLE ON YOU SDCARD,SO BE SURE IT's ALL CORRECT)

Done,

now tap:

q

fdisk /dev/block/mmcblk0

p (you should see your new partition table, if ok reboot your phone, flash an stock rom for vibrant (I sugest an T959UVJFD ROM only to correctly format your partitions),root it,backup it,and enjoy,You can put a custom rom if you want so.)

If You have an error That does not appear here and you think it may me related to you sdcard just ask. In one or two days I or others developers may post here a possible solution.

Thanks For Google and some XDA users who indirectly helped me doing this.

You can try Paragon Hard Disk Manager in place of gparted

but remember: mmcblk0p1 is FAT32 and mmcblk0p2 in EXT2 (in truth it´s not EXT2, its in rfs, but the stock rom T959UVJFD is the only that I have absolute sure that will do the conversion).

Sorry for my bad english, it´s not my native language.