I have tried clean all command in Diskpart and it took an hour to be completed but at the end nothing has changed. I think the SD card is locked and when I try to format or re-partition the disk, either it will show a successful result or it will return "Windows was unable to complete the format" error. I have tried to format it in Linux (this answer) and Android as well but no luck. Is there a way to reuse my SD card as a portable storage?

UPDATE: GParted details when I delete the partition

GParted 0.30.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2

Delete /dev/mmcblk0p2 (unknown, 59.46 GiB) from /dev/mmcblk0  00:00:08    ( SUCCESS )

calibrate /dev/mmcblk0p2  00:00:00    ( SUCCESS )

path: /dev/mmcblk0p2 (partition)
start: 34816
end: 124735454
size: 124700639 (59.46 GiB)
delete partition  00:00:08    ( SUCCESS )
libparted messages    ( INFO )

Input/output error during write on /dev/mmcblk0

Delete /dev/mmcblk0p1 (unknown, 16.00 MiB) from /dev/mmcblk0  00:00:01    ( SUCCESS )

calibrate /dev/mmcblk0p1  00:00:00    ( SUCCESS )

path: /dev/mmcblk0p1 (partition)
start: 2048
end: 34815
size: 32768 (16.00 MiB)
delete partition  00:00:01    ( SUCCESS )

GParted details when I try to format:

GParted 0.30.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2

Format /dev/mmcblk0p1 as fat16  00:00:01    ( ERROR )

calibrate /dev/mmcblk0p1  00:00:00    ( SUCCESS )

path: /dev/mmcblk0p1 (partition)
start: 2048
end: 34815
size: 32768 (16.00 MiB)
clear old file system signatures in /dev/mmcblk0p1  00:00:00    ( SUCCESS )

write 512.00 KiB of zeros at byte offset 0  00:00:00    ( SUCCESS )
write 512.00 KiB of zeros at byte offset 16252928  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 16711680  00:00:00    ( SUCCESS )
write 8.00 KiB of zeros at byte offset 16769024  00:00:00    ( SUCCESS )
flush operating system cache of /dev/mmcblk0  00:00:00    ( SUCCESS )
set partition type on /dev/mmcblk0p1  00:00:01    ( SUCCESS )

new partition type: fat16
create new fat16 file system  00:00:00    ( ERROR )

mkfs.fat -F16 -v -I '/dev/mmcblk0p1'    ( EXECUTING )

Failed to execute child process “mkfs.fat” (Input/output error)    ( ERROR )

Format /dev/mmcblk0p2 as fat32

Results for zeroing:

sudo dd if=/dev/zero of=/dev/mmcblk0 bs=8192

dd: error writing `dev/mmcblk0`: No space left on device

7795969+0 records in
7795968+0 records out
63864569856 bytes (64 GB, 59 CAB) copied, 3824.26 s, 16.7 MB/s 

Results for amd64-stdtool status:

[+] Found RCA for /dev/mmcblk0: E624.
[+] Card CSD: 400E005A7B590001DED48F700R808006.
[+] Write protection state: Off.
  • @alecxs I have updated my question. – R. Toward Feb 15 '20 at 21:29
  • You forgot to describe the actual problem, only that nothing has changed. Usually if you repartition and reformat the card you can simply use it. – Robert Feb 15 '20 at 21:41
  • 1
    @KirandeepMaan It's not corrupted. Android locks SD cards when they are formatted as internal storage. – R. Toward Feb 16 '20 at 7:27
  • 1
    @alecxs I have not created the 16MB partition and it cannot be changed. it's ridiculous that Android is doing this to SD cards without providing any solution to recovering the SD Card. I tried this on a second SD card and the same problem occurred. So this case is not a hardware problem. – R. Toward Feb 18 '20 at 8:36
  • 1
    just linked for reference more or less relevant problems 1, 2, 3 partitioning 4, 5, 6 – alecxs Feb 18 '20 at 9:44

You may go to Settings > Storage. Then go to the more button at the top right corner. There should be an option "Format as portable". Would that work?

  • 1
    Thx for your answer. however, the question is about I/O errors on (new) MicroSD cards (even after zero-ing whole mmcblk0) – alecxs Feb 19 '20 at 11:17
  • 1
    @alecxs most probably the card is dead. You can try using mmc-utils to get low level details e.g. Life Time Estimation and pre-EOL information. But mostly SD cards and USB thumb drives have dumb FTLs. Also many IOCTLs and CMDs don't pass through USB interface and card readers. So the symptoms determine that the card is dead. – Irfan Latif Feb 21 '20 at 11:57
  • @IrfanLatif it's not my question, but he tried this on a second SD card and the same problem occurred. there are similar unanswered questions - it sounds naiv/stupid but maybe it's true that android lock sd cards in some however way? on the other hand i aggree the best way is to get low level details and base answer on solid facts instead of speculation – alecxs Feb 21 '20 at 13:19
  • i feel remembered the first day i ever heard about selinux – alecxs Feb 21 '20 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.