rev 7.3.4 : problems with access right to SD Card

Started by LaurentG, August 17, 2018, 03:18:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LaurentG

Hi Orux,



I just installed rev 7.3.4

First time I used it (I think I remember I was browsing a mapsforge map) I got a warning about access rights to mapfiles and mapstyles directories on SD Card, where they reside (and dem and cursors as well), explaining app didn't have write access to these directories, and recomending to give access to the root of SD Card.

On next screen that opened, I tried then to do so, selecting directly on SD Card itself, but it was unsuccesful (I got an error message, in french, stating that access right demand was unsuccesful).

Then I tried again, same issue.

The third time, I tried to give access not at the top level, but selecting /oruxmaps directory : same result (ie. same error message)



I then closed app (and forced it to stop), then restarted it.

And I didn't got any warning this time. Everything seems to be OK (I'm able to browse maps of various formats, able also to select and apply various mapsforge themes in case of mapsforge maps). The only "anomalies" I can see being that,

1) when browsing Online maps, the OruxMapsCacheImage.db is managed in /oruxmaps/mapfiles ON THE PHONE and not on the SD Card (but this was already the case with previous versions of OruxMaps, even before getting warning mentioned above),

2) and that when browsing an (offline) mapsforge maps, app creates a .mf_cache directory (with several level of subdirectories and finally xxx.tile files), also in /oruxmaps/mapfiles ON THE PHONE and not on the SD Card. About this .mf_cache directory, I never remarked it before, then I cannot say where it was previously stored. You can take note that each time I switch to a non-mapforge map, this cache directory immediately disappear.



Nevertheless, I "suspect" that either it didn't exist in previous versions of app, or it was managed succesfully on the SD Card, and because app was not able any more to manage it on the SD card, it's the cause of the warning I got. And since app didn't succeed, it eventually "decided" to manage this cache on the phone, which could explain I do not have any more the warning ??? But all of this is only "supposition" : actually, I don't know.... but I guess (hope ?) that YOU know, isn't it ?



3) The last "anomaly" relative to SD card access right : As mentioned above, my dem directory is also defined as /oruxmaps/dem on the SD card. I did this parameterization in a previous version  of OruxMaps (7.2.5 ?), and that when I did it, I created the dem subdirectory from within app itself. And I'm 100% sure that at this time, I was able to download .hgt files thanks to the app (eg. displaying 3D map on a place I didn't have yet .hgt files)

But since I installed the 7.3.4 rev (which is maybe seen as a NEW app by Android, and not as a "simple" update, since not managed via GooglePlay ?), I am NO MORE able to download .hgt files : I systematically get an error message for each .hgt file app tries to download... and they are not actually downloaded (neither in dem directory on SD card, nor nowhere else...)



Clearly, there is an issue somewhere with app's access rights on SD card.



As far as I know, their management are a little bit "tricky" in recent Android versions (I'm under Nougat, 7.0), but it would be VERY GREAT if you were able to find a solution.

Because it is more and more complex and not fluent (even if it remains "manageable"...)  to store map files and .hgt files on SD Card, while it's mandatory, for "disk space" reason.



Thanks in advance for what you'll be able to do, and if you need I run some test, don't hesitate to ask !

Regards



Laurent



PS : I have verified : "Authorisation" provided to the app are OK.

LaurentG

#1
Good news : Problem partially solved.



I did the following : go to application parameters, and cleanse all data

Of course, afterwards, I had to re-parameterize all options of OruxMaps.

But when I selected Mapsfile on SD Card, I got again the pop-up to provide OruxMaps with access to SD Card, and this time, bingo, it worked when I gave access to the SD Card itself (at its top level).



As a result, I am again able to download .hgt files id the dem directory on SD Card



On the other hand, the two other points mentioned in my original post are still there :

- the fact that when browsing Online maps, the OruxMapsCacheImage.db is managed in /oruxmaps/mapfiles ON THE PHONE and not on the SD Card

- and that when browsing an (offline) mapsforge maps, the .mf_cache directory is also in /oruxmaps/mapfiles ON THE PHONE and not on the SD Card

Are these two points "as designed" ?



But at least, no more error message, and able again to download .hgt files.



The only remaining painful point is the need to re-parameterize everything after such a cleansing of data. Is there a solution to backup current parameterization, cleanse data, then re-apply this backup ?

orux

#2
Quote from: LaurentG post_id=14060 time=1534535326 user_id=7848
Good news : Problem partially solved.



I did the following : go to application parameters, and cleanse all data

Of course, afterwards, I had to re-parameterize all options of OruxMaps.

But when I selected Mapsfile on SD Card, I got again the pop-up to provide OruxMaps with access to SD Card, and this time, bingo, it worked when I gave access to the SD Card itself (at its top level).



As a result, I am again able to download .hgt files id the dem directory on SD Card



On the other hand, the two other points mentioned in my original post are still there :

- the fact that when browsing Online maps, the OruxMapsCacheImage.db is managed in /oruxmaps/mapfiles ON THE PHONE and not on the SD Card

- and that when browsing an (offline) mapsforge maps, the .mf_cache directory is also in /oruxmaps/mapfiles ON THE PHONE and not on the SD Card

Are these two points "as designed" ?



But at least, no more error message, and able again to download .hgt files.



The only remaining painful point is the need to re-parameterize everything after such a cleansing of data. Is there a solution to backup current parameterization, cleanse data, then re-apply this backup ?




Hello!



Databases must be in internal storage, can't be saved in sdcard, because of new android file system access.



I will check with the images caches. They should be in a fast file system. But with modern SD maybe they also can be stored in the external storage.



You can create a new profile, with a name from current settings. Then you can load it any time, or in other device, if you copy the oruxmaps/preferences/ folder there.







orux

LaurentG

#3
Hi Orux,



thank you for your answers ! (and many many "thank you" for your tool !!!!)  ]



Just one supplementary question : Why is it possible to save and reload a "named profile", and at the opposite, not possible to save and reload the "default" preferences (om2_com.orux.oruxmaps_preferences.xml) ? This could avoid problem to people not using "profiles"... which was my case up to now, since I didn't have need for several profiles; Now I have one, rather than rely only on default, only to be able to save it and restore it a day....



BTW, why do not have these files "clear" rather than encrypted ? It would be a lot easier to manage....



And last, since I'm using a profile, I have detected that every time I do a modification on any parameter, current profile is automatically updated, without having to "save" it explicitely.

As a result, if we need to be able to restore a set of parameters as it was before some modifications, we need to think, before doing modifications, to create a new profile, do the modifications, then restore the "original" profile. It's not a very usual way of doing things. It would be more "classic" to have profiles updated only when explicitely requested.