This object is in archive! 

Secondary external storage is not selectable as root directory

Björn Kautler shared this problem 6 years ago
Solved

According to the links you provided in the docs, CyanogenMod and thus also LineageOS worked-around / fixed the problem with secondary external storage access.


I run LOS on my SGS7, but when going to the root directory selection screen, it tells me that my external AS is read-only and that this is true for all Android since 4.4.


But your linked resources not only say that CM / LOS fixed that issue, but that also others like Samsung hacked around the issue in their custom Android version.


It would be very nice if you would not generally block access to secondary external storage, but try to write to it before you state it will not work and refuse to use it as location.


Writing actually works, because I at least changed the vector and raster maps locations to the external SD card and after pressing the Locus download button on OpenAndroMaps, Locus started to download the map data thereto.

Replies (5)

photo
1

Hi,

thank you for report. I'll ask the main developer to check it when he'll back from vacation.

Thank you

Petr

photo
1

Good day Björn,

I'm using older CM13 on my device and there Locus tell me that SD card is read only as well. Check on read/write access is made in very simple way. Locus Map tries to write small file on card and if this happen without any problem, disk is really read-write. In our cases, card is really read-only for Locus Map.

Do you have any information that on latest CM/LineageOS, write to SD card should work without problems for all apps?

About vector maps and basic maps path: as we write in our manual http://docs.locusmap.eu/doku.php?id=manual:faq:use_sdcard_on_kitkat , vector maps, SRTM data and backups may be directly placed on SD card even with write access! thanks to new API from Google since Android 5. Unfortunately other data not, so that's why vector maps ( OpenAndroMaps ) was correctly downloaded directly to SD card for you.

photo
1

I don't know much about if this will be of help, and you probably already know it, but I've been trying to find a workaround for using the external SD card to store my maps (tens of GBs of them so internal storage is not an option) and stumbled upon these news about Android 7 and 8:


https://stackoverflow.com/questions/40068984/universal-way-to-write-to-external-sd-card-on-android


In Android 7.0, apps can use new APIs to request access to specific external storage directories, including directories on removable media such as SD cards...

For more information, see the Scoped Directory Access training.


Starting in Android O, the Storage Access Framework allows custom documents providers to create seekable file descriptors for files residing in a remote data source...

Permissions, prior to Android O, if an app requested a permission at runtime and the permission was granted, the system also incorrectly granted the app the rest of the permissions that belonged to the same permission group, and that were registered in the manifest.

For apps targeting Android O, this behavior has been corrected. The app is granted only the permissions it has explicitly requested. However, once the user grants a permission to the app, all subsequent requests for permissions in that permission group are automatically granted.

For example, READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE...

photo
1

Good day pxxi,

thank you for additional information. Not sure if this is related to current Locus Map system of work with Storage system.

Since Android 5, system of document providers is still same ( and has still same limitations ). Changes introduced later mainly improve simplicity of this system for more simply applications that just deal with photos etc, not not to more complex systems like Locus Map is. Anyway in your case ( need for maps on SD card ), existing solution described here , should works fine for you.

I'm anyway not sure how may I help to Björn with his problem. Last thing we wants is to block using of SD card, so there has to be a different problem. Created log after start of app should! help here maybe.

photo
1

Hi Björn,

I had the same problem. You can choose root directory on internal sd and mapsVector and maps on external sd. But if you do so, you cannot download maps from locus store, because ext sd is ro for locus.

data/media must be on internal. if you have GB of images and videos (POI attachments) you are out of luck. Locus will not support document provider access for media/ duno why.

I solved this with this. An interesting alternative is this xda-thread Hope this helps

photo
1

Hello,

support for media directory on SD card is already here: http://help.locusmap.eu/topic/supporting-datamedia-and-export-folders-on-external-sd , so suggest to vote. This idea is doable I believe.

Replies have been locked on this page!