Changes to SD card do not persist after unmounting

sd card

I have a couple of 128GB Samsung EVO+ micro SD cards. I have two different means of connecting these to my mid-2012 MacBook Pro running MacOS 10.13 High Sierra: a micro-to-fullsize SD adaptor, which I insert into the MBP's card reader slot, and a Lexar microSD-to-USB adaptor, which I insert into a USB slot.

I can read from both cards without issue (save that the OS only seems to notice a card in the card reader slot about a quarter of the time). The exfat volumes on the cards mount and files on them can be accessed. Disk Utility shows "Writable: Yes" in the Info window for the mounted volume. mount shows that the volume is mounted properly, with no read-only flag indicated.

Yet, if I make changes to the volume, for example by entering

cd /Volumes/S7;
mkdir tmp;
echo 'testing' >> tmp/test;

these changes appear to have been made successfully, but upon remounting the volume, neither the file nor the directory it was created in are anywhere to be found.

I have similar problems when using fdisk to change the partition type (my actual goal right now) so I can use the SD card (and its contents) in my Android phone: changes to the MBR partition table appear to be written successfully, but then are not apparent when the partition table is displayed immediately afterwards.

Other USB volumes (for example, an external hard drive) work correctly. I haven't tried using any other SD cards yet.

These problems occur with both SD cards, whether connected via the fullsize adaptor or the USB adaptor.

I upgraded from 10.10 relatively recently and suspect that these problems have started since the upgrade. Are there any similar known issues with using SD cards under High Sierra or other MacOS versions?

Best Answer

This crops up a lot.
Super User has a boiler-plate QA on it - What can I do if my USB flash drive is write-protected or read-only? - but you are likely seeing the result of the firmware going into write-protect mode.

The added confusion that it appears to accept data is a known side-effect. As they're readable, first get all your data off, then test with the Fight Flash Fraud app F3X & also check formatting in another computer; but be prepared to have to trash them.

If the firmware lock has triggered, they're done for.

Related Question