Back Story: Recently i have got a new phone (Android Pie), and i still have my old one (Android Oreo). I have been using an external SD card (64GB) for the past 3 years with my old phone, and now i want to use that SD with my new one.
Problem Statement: The problem is, i can't erase nor format the SD card for some reason. I have tried to format it from the old phone, it showed progress and said that format was successful, but when i went to the SD, everything was still there, as if a format didn't happen at all. I have also tried to format it from my mac (macOS 10.14.14) using disk Utility, SDHC "SD card formatter" the official application from their website (Quick format and Overwrite format), from terminal (as i usually do when something similar happens) using
diskutil eraseVolume free EMPTY /dev/$VOLUME$
and i have also tried to delete the files inside the SD card manually using
rm -rf /Volumes/$VOLUME$
But nothing seems to work, even after all of the things i have done above the original information stay no matter what.
Note: After each attempt to format the SD card has to unmount in order to complete the format process. I have noticed that when the SD card gets unmounted and then mounted again, only then the original information come back somehow, like some kind of magic. When i have done the manual format, i saw that the SD card was empty before unmounting, but after mounting it again, everything came back again. It's not a problem with reading and writing, i have the writing and reading permissions for the SD card, and i have checked that multiple times. I have posted this before on, Android enthusiasts, but it got on hold, because it was android independent.
EDIT1: As i have explained in the note, it's not a problem with reading and writing, i have these permissions, and able to read and write into the SD card with no problem what so ever. If i do so after i have formatted before unmounting, the information stays there, and gets overwritten by the old information when i unmount and remount. if i do so after formatting and unmounting, then mounting again, and the old information come back, i can add files to the old information that has returned. It doesn't make any sense...
EDIT2: So far it looks like the SD has reached it's end. I will try once more and see if anything new happens.