This object is in archive! 

Fix for external SD-Card on Marshmallow

sleepless shared this idea 7 years ago


can you insert automatically the following line in the "packages.xml" (data->System) @ your package line?

<item name="android.permission.WRITE_MEDIA_STORAGE" granted="true" flags="0" />

Always i must do this manually after a update to get the write/read access back!!

Thank you

Replies (12)


Good day sleepless,

may you please forward me on web page, where may I read more about this permission and why should I insert it into Locus? I'm trying to find some, but cannot find and useful info.

Also where you insert these lines, directly into Locus manifest file after update?



i found this on xda-developers as the solution for external sd card fix on Android 6. On marshmallow the old ways from lollipop etc. doesn't work anymore. (they uses the fstab.void)

so here locus show me a message, that's something wrong on my way points etc and i should restart my phone.

this is only happens, because locus map can't write to the external storage, this external sd called a path like "eefd-ddsd".

To get the write acess to this sd card, i must insert this line in the package.xml. You found this in: /data/system/.

search for your line in this big file (search for the word "locus") and add this to the other lines.

after this and a restart i can use locus with all files (including vector maps) on this annoying Android 6...


Hi Sleepless, hi Menion,

@Sleepless : You're right for packages.xml

For information, if you know "Xposed framework", there's now an Xposed Module called "Marshmallow SD fix" that solve the Google MM nice little present and can automatically do the trick for you and for any app you want. I use it for a couple of weeks now, and i'm happy with.

Normally, with Lollipop and Marshmallow you have to be rooted AND and have a custom recovery (like CWM or TWRP) to install the Xposed framework. However, it is also possible to install it on rooted Lollipop and Marshmallow smartphones without custom recovery with the app Flashfire (at you own risk) :

@Menion : did you found the info you were looking for about "android.permission.WRITE_MEDIA_STORAGE" ?

Take an eye there maybe ? and

Hope it will help.




Hi Fifi,

that doesn't work.

I have previously installed framework on my devices since Android 4.4... so i know that buggy framework..

but this app don't do his job right... still i get this error message... look attachment... clear words @ error message

if I do this how i described, it's work fine...


Hmmmm ... just to try to understand why it is not working for you, let's compare what you have with what i have.

My device : Samsung S5 Mini (SM-G800F)

Modified /etc/permissions/platform.xml following that thread :

Xposed Version : 3.0 alpha4

Xposes modules installed and configured : HandleExternalStorage, XInternalSD, Marshmallow SD fix


Why is anything like that required?

I run locus without issue on my external SD...


@Jens :

And your device run Android Marshmallow ?

And your external SD Card is mounted as real External SD Card like the previous versions of android and not as an Adoptable SD Card (Marshmallow SD Card setup that mount an External SD Card as an Internal SD Card formatted as Ext4 and encrypted, that make it not readable by other devices like your computer for example) ?


@Fifi I run Android 6.0.1 and my SD card is formatted the same since Android 2.3 I believe, that is Fat32 I think.

I have the same naming scheme as mentioned above "/storage/4035-1df4/".

Locus has Permission to access the storage, but I don't remember if I had to toggle the switch or if it was requested.


Actually, the proper fix is for the Locus app to use the SD card Access API, as described here:

This way Locus can get permission to write in any specific directory on the external SD card without any extra hackery, special formatting, rooting the device and granting permissions, etc.

Quite a few apps already support this API, for an example check the FX explorer app, which even provides a menu entry and hints to the user on how to enable access. See here for the free version (not affiliated, just an example, etc. etc.):

The newest version of Locus (3.8.15) doesn't seem to support this (trying to choose SD card storage simply shows the directory as unavailable and prompts for alternative locations), so I had to resort to editing the package.xml and granting the permission as described above. This works, but requires root. Thanks to @sleepless for the hint, which saved me a lot of digging in the docs.

I also suspect that this particular permission can't be included by the dev, I only see it on system apps on my device, but then I don't really develop for Android and I don't know the platform all that well.

Hope this helps,


Hello guys,

let's move little bit with this problematic.

My view (as developer)

So from my point of view, there is nothing I can do for now, sorry.


Well, that's too bad, I didn't know the new API is so half-assed. Rooting and fixing the permissions file is the only way, then. Thanks for the explanation.


Hi, for rooted phones modification proposed by sleepless for me is so far the easiest way. It works on Marshmallow, as I have just checked. Thanks for hint.

Replies have been locked on this page!