SD card corrupted after "cmd attrib..." what to do ?

meije

Reputable
Feb 17, 2014
13
0
4,510
Hello,

I first had an issue about writing on my SD card (impossible to create files or delete some) so I looked for a solution and found this :

Only solution that worked for me is :

CMD -> Attrib -h -r -s /s /d G:/*.* (use your drive letter instead of G)
Unfortunately that didn't work out quite well, my computer still detect my card (I can explore the files etc.) but my phone doesn't.

I actually don't really care about losing my data so I tried to format the card (quick format and full format, tried to format it from the recovery of my phone too), but it never complete :/
I also tried to "scan and fix errors" with windows but it didn't help.

What should I do, is there any way to "undo" this command?

Thanks
 
no no undo command.

I would go to the Disk Management or use diskpart and delete all partitions on the SD Card. Then toss it in your phone and format it. Phones need to format in fat32 or exFat to work properly. Some work fine with NTFS but you will be better off with Fat.
 

meije

Reputable
Feb 17, 2014
13
0
4,510
Disk Management > Format show me an error message saying
an unexpected error occured. Check the system event log for more information about the error. close disk management console, then restart disk management or restart the computer
Not sure how to use diskpart since it open a command console :/

Apparently my phone still detect the SD card since it says "mounting sd card" when I put it in, but it then fails to mount it.
 

meije

Reputable
Feb 17, 2014
13
0
4,510
I looked up how to use Diskpart and could use the command "clean" successfuly, however, the command "clean all" says
"Diskpart has encountered an error: access is denied. see the System Event Log for more information."
 
Ok Open CMD and start DiskPart
then type this

List Disk

select Disk # (Where # is the number of the SD Card. You will know it because it will be the same size as the SD Card as listed

list partition

select partition # (# is the partition number listed. Should only have 1)

Delete partition override

And see if that delete it. Be careful NOT to select a hard drive! This will delete the partition!

If it gives an error post back what it says.
 

meije

Reputable
Feb 17, 2014
13
0
4,510
This worked successfully. So the next step is to format the sd card via my phone right?



 

meije

Reputable
Feb 17, 2014
13
0
4,510
Same as before it "detect" the SD (saying "preparing SD card") but fail to mount it (nothing happen basically)
Even if I go into setting > storage and click "mount SD card" the same thing happen.
 
Ok then do this. Put it back into the PC and open up diskpart again

List disk

Select Disk #

Clean

Create partition primary

Select Partition 1

Format FS=FAT32

Assign n (n = Avaliable drive letter not being used)

Exit

it should pop up in Computer now. Confirm its formatted as Fat32 then toss it back into Phone.

If it still does work try using a different SD card to see if its not an issue with the phone.

 

meije

Reputable
Feb 17, 2014
13
0
4,510
create partition primary give me an error

rhom5y.jpg
 
Ok it says nothing is free. Weird. Go ahead and do the delete and format again.

List Disk

select Disk # (Where # is the number of the SD Card. You will know it because it will be the same size as the SD Card as listed

list partition

select partition # (# is the partition number listed. Should only have 1)

Delete partition override

List partition

There should be no partitions listed. If they are start again and select the partition number and repeat.

Then lets to the format again but lets take out the clean command

List disk

Select Disk #

Create partition primary

Select Partition 1

Format FS=FAT32

Assign n (n = Avaliable drive letter not being used)

Exit

See if that works
 

meije

Reputable
Feb 17, 2014
13
0
4,510
2usz7f8.jpg

weirdly even after a successful "delete partition override" it still show a partition

I repeated
list partition > select partition 1 > delete partition override
about 10 time without real success

also the computer seems to show different information about the storage used on the device
deah4i.jpg

not sure if this is relevant though
 

meije

Reputable
Feb 17, 2014
13
0
4,510
format fs=ntfs quick

0 percent completed

diskpart has encountered an error: the parameter is incorrect.
See the system event log for more information.

I cannot copy files to the card
39bmd.jpg


I cannot delete files as well (the option doesn't show up if I right click and "delete key" has no effect)
However I can copy files from the card to my computer
 
Hmmm this has got me! Sounds like it might some how be set to read only or it may have been encrypted but usually even if its encrypted you can still delete the partition but not 100% sure. What brand of SD card is it? And i'm assuming its a Micro SDXC?
 

meije

Reputable
Feb 17, 2014
13
0
4,510
Yes I used the card on a daily basis with my phone.

I'm using an USB adapter. I also have a SD card adapter but I read usb adapter is more reliable.