[Bug] Can't write to SD card (external storage)

Is there a recommended workaround to get full sd card access on android?

1 Like

As I understand it, you shouldn’t need a “workaround”. On Android you go to settings & look for “Apps”, find Obsidian, look for “Permissions” and make sure “Storage” is allowed.

Depending on what version of Android you’re running it may be in a slightly different place, but that is the gist of it.

Essentially you just grant Obsidian permission to access your SD card in Android’s settings.

I believe when you first open Obsidian on an Android device it will ask you if you want to grant it permission, but if it was somehow missed you would need to manually grant it permission as I described above.

Hello! I’m not sure if this helps, but here is some info. The neuracache app can read my obsidian vault. But the obsidian app can’t. Maybe this will help come up with some kind of solution.

I did that. Obsidian has all permissions, but I’m still having this problem.

I’m sorry. I just know how to grant permission to apps. If that doesn’t work I don’t know. I too have Obsidian installed on a mobile device. It has all permissions granted & still fails to create a vault on its external SD card.

I am not sure if I updated my Obsidian on my phone but just tried again tonight and now I can make a vault on the SD card.
This time If i try to make the vault in the root of the SD card it will not let me. I must first make a folder (or choose one) like for example “Vault” and then I can create my new vault within that.
This works for me. Much better than using up my phones storage.

As of mobile version 1.1.1

I’m still unable to create vaults on my SD card. I tried both in the root of the card as well as a sub folder of a self created folder.

I received the same error "Failed to create vault. Unable to create directory, unknown reason”

My goal is to use my notes on an external USB storage device that can be used on multiple devices. I also have an SD card installed on my device. My issue may not be exactly related since I am using USB and not SD but I think it is close enough that it would not make sense to open a new thread.

There is a related bug present on the current version available from the Play Store on my device (Galaxy Tab S7+) but it seems that there are two problems. 1) is that external USB storage cannot be used because the directory cannot be resolved 2) is that selecting the root of the USB to create a new vault will intially not throw any errors but actually has somehow switched to the SD card root rather than the USB which is not the intended result.

If I attempt to open an existing vault that I copied to a sub folder of the USB I will get the error that says path cannot be resolved. If I copy the vault to the root the same failed to resolve error will occur when choosing to open the vault folder as a vault. And of course creating the new vault at USB root switches to SD as mentioned.

I’m going to try a different file system on the USB (because android, I guess) but I don’t think it will make a diffence, just a shot in the dark.

My drive is too large to format for use with android other than exFat so I cannot try other filesystems at the moment.

Seems like, at least for the SD card access, this is related to the bug for the Google Photos app not being able to delete photos from the SD card. For some people this is still not resolved, and Google hasn’t given a definitive fix to this.

That’s the error I had before I upgraded.
Have you tried making the Vault in a folder say “Vault” in the root of your SD card. That’s what worked for me.

So my vault is SD card/Vault/My new Vault

Yes I tried that, and still get the same error:

Vault Name: TestVault
Vault Location: SD Card/Test/

Which makes the vault’s location: SD Card/Test/TestVault/

“Failed to create vault. Unable to create directory, unknown reason.”

For now, this is my only workaround if I want to use sd card. I just changed my sync to this md.obsidian folder and everything works well.

I’m having the same issue, SD card can’t be written to. Local storage works fine, and the workaround of putting vaults in the SD card under Android/data/md.obsidian/ also works, but any other directory in the SD card doesn’t work.

Android version: 9
Obsidian version: 1.2.0 (50)
Type of storage: Micro SD card
Permissions:

However, the file selector still says “allow write permission” at the top, despite having “Modify or delete SD card contents” permissions

Errors: Failed to create vault. Unable to create directory, unknown reason and Failed to save file "filename.md". FILE_NOTCREATED.


Creating a new vault in SD card, somewhere not in Android/data/md.obsidian/:

I get this message when choosing the folder

I get this error when tapping “Create”

Failed to create vault. Unable to create directory, unknown reason

Creating a new vault on the SD card inside Android/data/md.obsidian/:

I get this message when choosing the folder


Then creating & editing the vault works correctly


When editing a vault that was created on PC and copied to my SD card:

I can open the vault, but any changes can’t be saved, and I get this error:

Failed to save file "filename.md". FILE_NOTCREATED.
1 Like

Thank you, this works!

I’ve replaced my Samsung Galaxy Tab S2 / Android 7.0 with a Galaxy Tab S8+ / Android 12.0. I can confirm that Obsidian can now write to any location on the SD card that I choose - I just need to allow a new location when prompted. The whole saga of Android’s SD card security changes over versions has been unnecessarily complicated IMHO, and a nightmare for developers.

1 Like

This is unfortunately a bug with the permission system inside Android’s OS, which according to reports already been fixed in the latest Android 11 update (not sure when exactly it got fixed) and Android 12.

If you are unable to upgrade OS, and you are running into this bug, the current workaround is to either use the device’s own storage, or use the folder at SDCARD/Android/data/md.obsidian.

1 Like

I try this but this still doesn’t work.
Obsidian 1.2.0. Android 5.1.1

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.