SDCards are not working with OSMand #1838

DangerDane opened this Issue Oct 26, 2015 · 52 comments


None yet

I am having issues with getting OSMAnd to use my SDCard for data storage. It worked on my android 4.4, but after my upgrade to my Z5 that is running 5.1.1 its not anymore. It defaults to:
/storage/emulated/0/Android/data/ which is the internal storage of the phone which i DON'T want to use since I already have a lot of mapdata on my SDCard from the S5.

However I get a an error that OSMAnd can't write maps files to the folder when I try to change it to:
/storage/(name of SDCard)/Android/data/ which was the folder that OSMAnd used to use.

I have been googling the issue and when Android 5 was released THAT was the intended behaviour, google however has since then readded SDcard security into the system so that individual apps can ask for permissions to have access to certain folders. It works by popping up a file manager and asking the user to select the root folder that you want to grant access to on the SD card, and any folder further down that particular branch is what OSMAnd would get access to.

OSMAnd however doesn't do this and it should, as the latter is the new intended behaviour and how its supposed to be so that people like me can use their actual SD card and not phone internal memory.

More on the issue can be found here: &

sonora commented Oct 26, 2015

Victor, I also still quite frequently see users having issues with changing their OsmAnd folder to an SD card. When trying to help I find one major issue which we should try to resolve: We should introduce an option where you can unconditionally specify a manual path! I have found that, while I know which paths must be used on what Android systems, on some systems OsmAnd modifies the path I specify as "manual" before applying t, like e.g. by adding an extra "/osmand" to the end of a manually specified path under Android <=4.2. wWhile this makes sense to prevent users from accidentally using their SD root folder, it prevents power users or supporters who know what they are doing from specifying some paths,


what does it mean unconditionally?

google however has since then readded SDcard security into the system so that individual apps can ask for permissions to have access to certain folders. It works by popping up a file manager and asking the user to select the root folder that you want to grant access to on the SD card

Sounds interesting, we will try to find that API.


It is quite annoying issue and unfortunately we don't have enough devices to find these issues and to fix them. The code was implemented according to Android Internals but it may be not working correctly?
Using manual path sounds like a real fallback approach.



Manual path fails for me as well. I get the same error as I posted above when I try to use manual.

tarator commented Oct 29, 2015

Same issue here. Sony Xperia M4 aqua. With OsmAnd 2.1.1+ and Android 5.0. I was able to move the app and map data on sdcard before (before Android update?). Now I can't select the SD-Card as storage. Please fix. This bug is really annoying. If you need some more information, don't hesitate to ask...


Isn't that a self-imposed Android 5.0 restriction?
If it is, then it's not Osmands fault.

No dia quinta-feira, 29 de outubro de 2015, Tarator Abentheuer <> escreveu:

Same issue here. Sony Xperia M4 aqua. With OsmAnd 2.1.1+ and Android 5.0.
I was able to move the app and map data on sdcard before (before Android
update?). Now I can't select the SD-Card as storage. Please fix. This bug
is really annoying. If you need some more information, don't hesitate to

Reply to this email directly or view it on GitHub
#1838 (comment).

Cumprimentos, Hugo Barrocas

tarator commented Oct 29, 2015

Other apps are also able to write to sd-card. So in my opinion it is - at least partly - Osmand's fault too. Even if the API of Android changes.

However... the app is unusable, if this feature doesn't work. Hence a waste of money...


Barrocas, Initially it was a Android 5 restriction that you couldn't write to SD Cards, which caused an outrage by a lot of android users who were unrooted and used SD Cards in their phones since those practically became useless over night.

"Recently" google readded an API that allows apps to again call and use SD cards. And on the first call they open up a file manager and asks you to select the root folder for the app to use. The folder you select and all under can then be accessed by that app. But NOT any folder above that folder in the tree.

Its explained in better detail in the 2 articles that I linked in the original post.

tarator commented Oct 29, 2015

I tried to reinstall the app, but I was never asked, for permissions to write on the SD-Card. Is this API-Call already implemented in Osmand?

Is there a way right now to fix the problem for me, or do I have to wait for an Osmand update?



The request doesn't come up on install. It should come up when you would want to use the storage on your phone though

tarator commented Oct 29, 2015

Now I tried the following:

  • switched off my phone, removed SD-Card and renamed the folder Android/data/ on it
  • switched on again (with SD-Card) installed Osmand+ and moved the app to the SD-Card (via the Androids-settings)
  • Then I started the app and -> Settings -> Global Settings (worked now)
  • Switched the app off again and moved my favourites.gpx -file back to the folder...
  • redownloading all maps right now

It seems to work now. All my settings are gone...
I was never asked for permissions to write on the SD-Card. I already had this problem approx. 1 month ago. I'm pretty sure, that I will have the same problem again the next time, when I try to update the maps...

This behaviour will not change, if nobody finds and fixes the root of this issue in the app.


DangerDane, i read your posts, but you mentioned that you already have
Android 5.1.1 , and he mentioned that he is running Android 5.0 , so there
may be a difference there.

Cumprimentos, Hugo Barrocas


Ah sorry about that Barrocas. I missed that. But yea I agree its most likely that.

sonora commented Oct 30, 2015

Victor, by "set a manual path unconditionally" I meant the following: We currently apply some sort of complex (SDK-dependent) logic, as the following example shows: I recently had a user who moved an SD card from an Android 4.4.2 device to an Android 4.0 device (not a frequent use case, I agree, but it proves my case as follows:) He wanted to get his existing OsmAnd maps (already present on the SD card) to work by MANUALLY setting the path in OsmAnd (now under Android 4.0) to where the maps are located on the card: /mnt/storage/extSdCard/Android/data/ This proved impossible, because OsmAnd under Android 4.0 insists on (silently) adding "/osmand" to the end of the path. So what I am saying is: If someone specifies the path MANALLY, we should not modify what they specify(!), because the manual specification is the last resort and should strictly be what the user types. I think I have other examples of people with exotic devices (like the DOOGEE Voyager DG310) who also claim that when they specify the path manually OsmAnd somehow applies some manipulation and they simply cannot get OsmAnd to accept exactly the path string they type even if they know what they are doing. Some users are in despair because our "manual" mechanism sometimes overwrites what they have researched should be correct for their particular devices, and this greatly complicates support.

@vshcherb vshcherb self-assigned this Nov 7, 2015

I need to come to this topic again, because certainly quite large percent of users experience it and we have issues to reproduce it even with devices on external card, I don't think we have such phones (described here) at all.

We heard loud and clear that developers wanted richer access beyond these directories, so in Lollipop we added the new ACTION_OPEN_DOCUMENT_TREE intent.
ACTION_OPEN_DOCUMENT_TREE - this is not supported yet.

@vshcherb vshcherb assigned crimean and unassigned vshcherb Nov 25, 2015
sonora commented Nov 25, 2015

Victor, Can you pinpoint and state here which users have issues still?
Android 4.0/4.1, 4.4, or 5.x? Or all of them? Upon first installation,
app upgrade, or some device upgrade?

The issues I used to see

  • when upgrading a device from 4.0/1 to 4.4 seems to have disappeared.
  • the remaining issues I see s with people trying to move SD card from 4.0
    to 4.4 devices, a rare use case, we should say. They would benefit from
    manually being able to provide a path which is not modified afterr being
    specified (currently we seem to add 'osmand' under certain conditions,
    which is correct under 4.0/1, but not for the 4.4 path).

For all other issues I would need more detail to try t reproduce.

On Wed, Nov 25, 2015 at 1:27 PM, vshcherb wrote:

I think I've found the article here most descriptive

Reply to this email directly or view it on GitHub
#1838 (comment).


The situation is not completely clear, but we definitely don't support 1 API yet which was introduced in Android 5.0/5.1 called - ACTION_OPEN_DOCUMENT_TREE intent. It allows to select any folder user would like to write.

What is not clear: is standard sdcard path accessible to write <Android/data/> on Android 5+ without any dialogs. For manual selection it is <Android/data/> , for suggested it is standard external path.


May be Android 5.0 is an issue, but what's described here doesn't sounds like right approach #1838 (comment).

sonora commented Nov 25, 2015

From all I read, the new ACTION_OPEN_DOCUMENT_TREE intent was added in Android 5.0 to allow access to more than just the app-specific directories on secondary storage devices. Hence I assume access to the OsmAnd-owned folders should still be possible without that intent. But I have yet to find a device to test it on.

2 comments regarding #1838 (comment) above:

  • Moving the app to SD card (via the Android settings) should not be required, we are talking about the data files here, not the app itself (works without moving the app to SD on all Android versions I know.).
  • The complete path (at least under Android 4.4) is Android/data/ I have seen people before who had issues because they forgot the trailing "files".

In new UI it should be added by default (when you select external storage path), so here is my confusion as well, unfortunately I saw that comment on Google Play, so I can't really say what happened there.

About comment on Google Play, it was about pure installation on Android 5, so this is not about moving maps, I think it is about ability to download external sdcard, but anyway we need to update our FAQ (cause it could be confusing) and may be include that information into, cause it is very important and quite confusing.

@crimean crimean was unassigned by vshcherb Dec 13, 2015
@vshcherb vshcherb added the Observed label Dec 13, 2015
schraubi commented Jan 8, 2016

@vshcherb (commented on 25 Nov 2015)
Don't know if this helps, but on my "ZTE Blade L3" running Android 5.0.2 the Folder "/Android/*" don't exists on the External SD. Any other Path on the external SD entered in Osmand manually is Read-only. In the Setting "Data storage folder" Osmand shows me the following:

Internal Memory: /storage/emulated/0/osmand
External storage 1: /storage/emulated/0/Android/data/
Multiuser storage: /storage/emulated/0/Android/obb/
Internal Application memory: /data/data/

All of these Paths are only internal Memory!

Like i said before the Folder "Android/*" don't exists on the external SD. If i create an Folder on the external SD and enter it in "Manually specified" Osmand says, that Map Data cannot be created, because the app has no Write-Permission.

An other App on this Phone ("ES File Explorer") seems to use the new Permission "ACTION_OPEN_DOCUMENT_TREE". This App asked only one Time for the Root-Folder/Mountpoint of the external SD-Card (i entered /storage/sdcard1) and after this the App was able to read, write, delete and overwrite Files on the whole external SD-Card.

By the Way, are there any Plans to support this new Lollipop-Feature in the near Future?

fangly commented Jan 17, 2016

I seem to have the same problem on a Sony Xperia Z3c running Android 5.1.1. Although my file manager can create folders and files on the SD card (which is exFAT-formatted), OsmAnd cannot write to a pre-created folder such as /storage/sdcard1/osmand ... Any fix or workaround would be welcome!


Please try the folder /storage/sdcard1/Android/data/ If it helps, please let us know.

fangly commented Jan 17, 2016

Thanks vscherb! I selected "External storage 2", i.e. /storage/sdcard1/Android/data/ and it seems to be working; OsmAnd is currently copying the files across to the new location.


Hm... Thank you too for feedback, didn't expect that how it is implemented, but at least we can use this topic as a reference for future problems and of course think how to simplify it.

votava commented Mar 15, 2016

I would like to make few comments on this issue since I have been battling with it for past several hours and finally found the solution, that works at least for my particular case.

I have Acer Z330 phone with Android 5.5.1.
My external sd-card is mounted on /storage/sdcard1/ It actually took me while to find this out, as mounting the external card is not standard in Android and there are several possibilities. I found out by browsing the directory tree using the Terminal Emulator for Android (very helpful if you know few basic unix commands).

Still, specifying the /storage/sdcard1/Android/data/ path in the OsmAnd settings did not work, giving the "can not write to the specified directory" error. I even tried to completely erase and format the card, which made no difference.

Finally using the file manager I first manually created the /Android/data/ directory on my external sd-card. Only then the OsmAnd could write to that location when it was specified in the settings.


It was still not working for me even when I manually created the folder /Android/data/

However, I deinstalled the app (first deactivated the device adminstrator settings) and reinstalled the app. Then I was able to chose the predefined option "Multiuser storage 2" with the folder /storage/sdcard1/Android/obb/

The map files are now on the sdcard and everything works as it should.

Sony Xperia Z3 Compact; Android 5.5.1; osmand+ 2.2.4


I manually created the folder /storage/sdcard1/Android/data/
Without the osmand folder it does not work. The copy fails with I/O error.
After creation the manual setting works, the files are copied and found afterwards.

Cubot X16; Android 5.1; osmand+ 2.2.4;

tarator commented Apr 25, 2016 edited

+1 Problem still here... Now it also happened after dd the sdcard to a bigger one, resize the partition and restarting the phone. Come on guys! You could even try to log something and ask us for sending you the log-file! Being ignored feels like meh...

StShadow commented May 9, 2016

Well, looks like with OsmAnd+ 2.3.5, Sony Z3C and Android 5.1.1 it starts to work again - path has been defined as /storage/sdcard1/Android/data/ .


After three days of struggling I succeeded in using my external SD card in my Medion S7852. I used a lot of information from various websites, reason I like to share my experience and solution.
As I noticed that it makes a difference on which hardware, software and version you use I will mention my configuration first.
Tablet: Medion S7852 with Android 4.4.2
App: Osmand Plus, version 2.3.5 (28-4-2016)

It was not possible to use my SD card (32 GB) for storing my maps, as Osmand could not write to it.
After many hopeless attempts, I did the following:
Root my tablet with help of this website:
Open the file "platform.xlm" in the tablet,location /etc/permissions/ and add the line
to the WRITE-EXTERNAL-STORAGE group in this file.
In Osmand Plus I used in Settings, General Settings, Storage Location the following:

I received the message if I wanted to copy my maps to the new location.
I did and I can now store my maps on the SD card !

All in all it is a very complicated procedure but I hope this can help some of you,

tarator commented May 11, 2016

With the latest version osmand can't write to the Sd-card after each reboot of the phone.

Guys, seriously, could you please stop to ignore this bug? This really can get dangerous, when you're on a hike and rely on this app. The app is really good bit this annoying bug makes it UNUSABLE!

You could at least try to ask us for some information and tell us how to provide them. It's OK for me to spend some hours for this.

I'm really angry, that you simply ignore this!


I'm not sure what could be done in application itself. Android has changing permissions of writing to sdcard each release and every vendor has different setup.
In OsmAnd there are 4 (!) predefined locations by Android API if none of these locations points to SDCard then it is a bad situation and you need to find path via file explorer. Even if you found path, it doesn't mean OsmAnd has access to write to it.

In Android 6 you need to be sure that you gave permission to write to sdcard to the application.

OsmAnd provides full flexibility to specify directory to get map files, though there is no magic how it works and no magic could be done because it is controlled by the OS. If you have any idea or solution, please share it. There is no action planned behind this issue, though it is open to help troubleshooting and collect feedback.

gitdiz commented Jun 6, 2016

I also want to report this behaviour of problems with accessing the sd card and maps after rebooting.
In the settings, file location for maps is (sorry, I report the german errors):
externer speicher 2 (external memory 2)
after reboot: "Der momentan gewählte Speicherort ist schreibgeschützt. Es wurde vorübergehend zum internen Speicher gewechselt. .."
(Current Storage is write protected. Temporay change to internal memory.)
When setting the path manually:
"Karten können im angegebenen Verzeichnis nicht erstelt werden"
(Cannot save maps in selected folder).
Copying of data to selected folder throws I/O error.
App and Maps are on SD Card. So, I guess the sdcard is completely locked for this app.
Now the "trick": After Plugging the phone to pc (usb debugging mode and unlock phone) and
unplugging/unmounting it, OSMand can access the sdcard, write protection is off.
But when you are on a trip or travelling its difficult to plug into a pc after reboot.
Any workarounds/solutions for this? Maybe this is a Sony behaviour only? It happend now several times that I was lost without maps after reboot in the country (on earlier versions (osmand and android) it worked. Anyway, OSMand is a really great tool! What else data can I provide to solve this problem?
Thank you dirk
Android 5.1.1 Sony Xperia ZR (C5503) Osmand 2.3.5

tarator commented Jun 7, 2016 edited

@gitdiz This sounds pretty much like the problem I have! Maybe this is really Sony related?

I use this workaround while I'm travelling in the meantime:

  • turn off the OsmAnd application
  • rename the folder on your sd-card (e.g. Android/data/net.osmand.plus_bak3)
  • start OsmAnd and let it generate the new folders (which should be Android/data/ in my example)
  • copy your map-data-files manually, from your renamed folder Android/data/net.osmand.plus_bak3into the new folder Android/data/ with a filemanager on your device (don't copy the folders, only the files!)

This worked the last few times, though it's pretty annoying.
Hope this also works for you!

gitdiz commented Jun 7, 2016

Hi, thanks for the comment! I tried again, by removing app, reinstall app (after backing up all maps, favorites (some GB)). After app removal, the folders are clean, nothing is left on sdcard (no folder storage/sdcard1/Android/ Then: reinstall osmand. Intitial folder is on internal memory. App works, and I can select sdcard as storage for maps. Download worldbase map to see, if it works and if map is really on SD card. OK.
Then: reboot phone. App still can be started, worldmap works. Then: in android settings:Memory:move Osmand to sdcard. Osmand works with World base Map. Then: reboot phone. Starting App: Cannot access sdcard, same problem. Then: In Android settings: move app from SDcard to internal (ca 70 MB). Then reboot. App works, setting for maps storage is still /storage/sdcard/Android/ Then: copying back maps from backup to sdcard. Start App, all maps are accessible. Fine. Then: reboot to check. App still works, maps accessible on SDcard. Then: test: move also App to SDcard. Works. Then: reboot. Works not, old problem: cannot access sdcard. Then: move App back to internal memory. Still works not. Then: reboot (App in internal, maps on sdcard). Works. So, my solution so far: leave the App in internal and maps on sdcard. The annoying thing is, that Android always asks to put stuff on SDcard (>75% internal memory used). When I give permission, of course OSMand-App goes back to sdcard and cannot access the OSMand maps. Strange, but moving app back to internal, and rebooting seems to work. Seems, app and maps cannot be on SDcard at the same time. Good luck! d.

tarator commented Jun 8, 2016

@gitdiz THanks. Leaving the app on the internal memory and only storing the maps on the sd-card seems to work right now!

nozi13 commented Jun 11, 2016

@tarator Hi. Unfortunately I can not agree.
I tried all the sugested Options but it still doesn't work.
I can not store the maps on the sdcard.
I use a teclast device with android Version 5.1.1
Desperately looking for help.

wijnman commented Jun 12, 2016


I had the same problem on a new XPERIA M4 AQUA. I inserted a new SD card into the phone and tried al possibilities mentioned above.
Now it is working. This is what I did.

  1. wiped out the complete SD card using the phone's functionaity "wipe SD card".
  2. removed the osmand application and re-installed it.
  3. left the application into memory and stored also the world maps into memory, meaning not moving them to the SD card.
  4. selected the default external SD card storage link in the osmand application. Just selected ok when it asked to copy also the settings to the SD card. I did not use the copy button.
  5. downloaded the world maps
  6. did a reboot of the phone -> worked
  7. downloaded a small map, again did a reboot of the phone -> worked
    downloaded serveral maps and did a complete shutdown -> worked.
    The application is running on internal storage while the cards are stored on the SD-card. In the default area that osmand proposed.
tarator commented Jun 15, 2016

@nozi13 Yes, you're right... I'm stuck again...

nozi13 commented Jun 17, 2016

On my device OSMand+ does not allowe storing the maps on the SD Card.

I got help from OSMand:
Please move "osmand" folder to sd card manually using your file manager. Then set the directory in app's Settings - General - Data storage folder. Then relaunch the application. You might need to go to phone's Settings - Apps - OsmAnd or Settings - Security to give the administrator rights to the app.

I can not give OsmAnd+ more administrator rights. The only rights are locking the Screen.
That doesn`t help me.

Maybe rooting the device could be a solution, but I have no clue how to do that.

tarator commented Jun 17, 2016 edited

@nozi13 Yes, same here this stuff doesn't help. They don't even try to understand the problem...


The advice from OSMand works. On Android 5.0.2 you go to Settings/General/Security and then open 'Device administrators'. There will be an entry for OsmAnd+ check the box to assign the rights to OsmAnd. Now the directory on your SD card can be used to store the maps.
On Android 4.4.2 you can find the same setting under Settings/More/Security, then 'Device administrators'.

tarator commented Jun 30, 2016 edited

@Pippin555 nope... this doesn't help. Same issue after restart of the phone...
I'm really looking forward when I can dump my Android phone. Bugs like this make them pretty much useless...


in the mean time I gound out I still need to do one more step: When I tried to copy a file to the SD card I got the message the card is read only. But because I used Total Commander to do it, it offered me the possibility to make the SD card read/write. It told me to click on a dialog to 'Select Tabs'. what magic it does, is not clear to me, but the file was copied and OsmAnd+ now has access to ghe SD card and fully functional.

wibrM4 commented Jul 13, 2016

Hello as I am using a sony M4 Aqua with only 8Mb internal storage, I have to store as much as possible on the Sd card. Also this device advices me, when 85% of the internal storage is used, to moving it to the Sd card. doing that OSMANd is moved. Then troubles began. Thsi made me think and in combination with all comments above I figured out the following:

  • when installing OSMAMD+ it all goes well and maps can be installed on the SD card and OSMAND+ can be moved to the SD card. This will work as long as the device is NOT rebooted
  • when it is rebooted the notification about the SD card starts.
  • when moving back the OSMAND+ to the internal memory it is the same nice app I used to know
  • now I can move OSMAND+ again to the SD card and it will continuing to do the job until the device is rebooted, then i have to move it back to the internal memory
  • (make sure you set the security again, as the box is unchecked after rebooting - shouldn't be, but sometimes is - don't now why)
    So this work aorund is working for me, although not very convenient.
    It seems the the OSMAND+, when on the SD card after rebooting has lost something that is sored in the memory .
sonora commented Jul 13, 2016

From my experience the best solution is to not move OsmAnd to the SD card, but rather inside OsmAnd's "General settings" simply point the "Data storage folder" to the SD card, as that is where the big data is stored it is (the maps, not the app itself).

wibrM4 commented Jul 14, 2016

Thanks for the reaction. That is also my experience. But as my Sony M4 Aqua always "remembers" me, in a very annoying way, that its memory crosses the 85% storage and then I accept the action.
After this the problem occurs after a reboot. So that is why I have to move the app back to the internal memory before use, or even reinstall it (after a reboot).
Maybe if OSMAND+ is not a applications that can be installed on the SD card some issues do not occur any more.
I realize that it is not a user friendly solution for some audience of OSMAND+, but on the other it is for me (=Sony M4 Aqua users).

tarator commented Jul 21, 2016

I'm really wondering why this works in other applications. OsmAnd is not the only application which stores data on SD-Card, but the app itself on the internal memory...
Not regarding to this bug but anyway: since a few weeks navigation speech doesn't work anymore. Does anybody else encounter this problem on a Sony M4 Aqua?

wibrM4 commented Jul 22, 2016 edited


My speech does work correctly.
As I also have a Sony M4 Aqua, it must be a setting somewhere.

2016-07-21 16:52 GMT+02:00 Tarator Abentheuer

I'm really wondering why this works in other applications. OsmAnd is not
the only application which stores data on SD-Card, but the app itself on
the internal memory...
Not regarding to this bug but anyway: since a few weeks navigation speech
doesn't work anymore. Does anybody else encounter this problem on a Sony M4

You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1838 (comment),
or mute the thread

sonora commented Nov 24, 2016

No further action planned.

@sonora sonora closed this Nov 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment