SD Card Mounted as Internal Storage

I accidentally mounted my SD card as internal storage and am now not able to unmount it. When I remove it from my phone, apps continue working normally (strangely enough) but I am unable to create any folders or access the file system. I’ve tried unmounting through the settings > storage menu but the unmount option does not appear. For now, the phone is working, but I am worried at some point it will break since internal storage mounting is not officially supported by Mudita. Any advice on where to go from here?

1 Like

Edit: Found a fix!

If you insert an unformatted SD card into the kompakt, it will present the option to format as an internal disk. DO NOT do this, Mudita does not support it even though the option is still present. However, if you did previously mount an SD card as internal storage, simply removing it will not work - you will no longer be able to access the device’s internal storage from the Files app and you will be warned that the SD card is missing on every boot.

Most googled solutions will tell you to go to the “storage” menu to remove / unmount an SD card, but Mudita has gutted it so that won’t work. In other words, they have NOT removed the ability to mount an SD card as internal storage but they HAVE removed the ability to unmount it. Not to worry, we can work around Mudita’s lackadaisical engineering with some adb commands.

BEFORE YOU DO ANYTHING - if your SD card is still working, backup its contents to your computer. We will restore them at the end.

When you set an SD card as internal storage, android “adopts” the card, meaning it mounts part of your phone’s file system on that card. Without the card, your phone won’t work normally. We are going to make android “forget” the card and use its own internal storage instead. Once you are able to get an adb shell on your device, do the following:

adb shell sm list-disks

This will return an output, something like:

disk:179,96

This is the SD card that you were previously using for internal storage. You can then run:

adb shell sm forget disk:179,96

This will make android “forget” the SD card. However, this will not fix the issue since there is still no mounted file system. You need to remount the internal storage, otherwise all of your files will continue to show as unavailable. Run the following to find the internal volume:

adb shell sm list-volumes

You should get something like the following:

private mounted null
emulated;0 unmounted null

Now we need to reformat and mount “emulated;0” which is your phone’s internal storage.

adb shell sm format “emulated;0”

And then:

adb shell sm mount “emulated;0”

And reboot.

And voila! You will now have working internal storage. Make sure the SD card is removed from your phone, and re-connect your phone to your computer. You should then be able to restore the files from the SD card or your backup.

2 Likes

@ArmchairSetup
As one would who just got a phone, the phone accepts a SD card out of the box, I have a SD card and kompakt phone, how do I format a SD card?

1 Like

You can either insert the SD card into your phone and format it there, or you can connect the SD card to your PC and format it as exFAT. I’d recommend formatting it from your PC.

2 Likes