Writing to external SD card fails partial

Started by Andi, August 24, 2017, 10:30:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andi

Hi,



while working with external SD cards, I am experiencing some issues when Orux writes files to the SD. Reading from SD seems to be fine from various folders.



The following is working as expected and files are written to SD in the configured folders:



- Offline maps download

- Auto GPX/KML file creation after finishing a track

- Manual export track as GPX/KML/KMZ/...

- Manual export track statistic

- Auto DEM files download



However, this is not working:



- Create new folder on SD with the integrated folder browser (Error: Cannot create folder "test")

- Photo Wpt. (Error using external storage, image saved in '/storage/emulated/0/oruxmaps/pictures/[filename]'

- Custom Wpt. Text file not created/updated on SD. Custom Wpt. is discarded after closing the Wpt. Type Manager



Orux is installed as default on internal storage (app, databases, cache files, ...). The folders, which are configurable within Orux, where created on SD with a file manager. External SD read/write permissions are allowed for the app. The SD card is mounted as external storage and formatted with Android (to FAT32, I think).



[SDCARD] = BCB8-1CE5



'/storage/[SDCARD]/oruxmaps/'

   customwpts

   dem

   mapfiles

   tracklogs

   ...



On '/storage/[SDCARD]/Android/data/com.orux.oruxmaps/files' the app seems to have full write permissions for all operations. So, I wonder if this is expected Android/App behavior or not, because some write operations from the App are successful outside of this folder.



Tested with:



- Orux 7.0.17

- Orux 7.1.2

- Sony Xperia Z3 Compact, Stock Android 6.0.1

- Sony Xperia SP, LineageOS Android 7.1.2

orux

#1
Quote from: "Andi"Hi,



while working with external SD cards, I am experiencing some issues when Orux writes files to the SD. Reading from SD seems to be fine from various folders.



The following is working as expected and files are written to SD in the configured folders:



- Offline maps download

- Auto GPX/KML file creation after finishing a track

- Manual export track as GPX/KML/KMZ/...

- Manual export track statistic

- Auto DEM files download



However, this is not working:



- Create new folder on SD with the integrated folder browser (Error: Cannot create folder "test")

- Photo Wpt. (Error using external storage, image saved in '/storage/emulated/0/oruxmaps/pictures/[filename]'

- Custom Wpt. Text file not created/updated on SD. Custom Wpt. is discarded after closing the Wpt. Type Manager



Orux is installed as default on internal storage (app, databases, cache files, ...). The folders, which are configurable within Orux, where created on SD with a file manager. External SD read/write permissions are allowed for the app. The SD card is mounted as external storage and formatted with Android (to FAT32, I think).



[SDCARD] = BCB8-1CE5



'/storage/[SDCARD]/oruxmaps/'

   customwpts

   dem

   mapfiles

   tracklogs

   ...



On '/storage/[SDCARD]/Android/data/com.orux.oruxmaps/files' the app seems to have full write permissions for all operations. So, I wonder if this is expected Android/App behavior or not, because some write operations from the App are successful outside of this folder.



Tested with:



- Orux 7.0.17

- Orux 7.1.2

- Sony Xperia Z3 Compact, Stock Android 6.0.1

- Sony Xperia SP, LineageOS Android 7.1.2


There are changes after 7.1.4 update, but:



1.-some configuration files (small files) and databases must be in internal storage, because SAF filesystem doesn't work with those files.

2.-there are problems with photo waypoints, because SAF is not working fine. The app can not share an external path with the camera.





orux

Joska

#2
Hello Orux



I observed a similar behavior after updating to V 7.14. First, I'd loaded this version diretly from your webside, the permission rights worked well, but after an update from playstore (same version???) it failed. The dialog for permission selection reappaired in a loop, I only could interrupt it. Storage to sd-card seems to succed however.



Best Regards, Joska

Holton181

#3
Is the permission dialogue you talking about something about giving permission to write SD card and kml/kmz in overlay directory?

Then it's the same loop (i gett errors the first couple of tries) as I got the last couple of updates for donation version.

I'm on Xperia Z3.

motorang

#4
Hi

as far as I am aware this is Android standard behaviour since Android 4.4.

One would need to root the device to get over that, granting the app superuser rights.



As long as I stick to '/storage/[SDCARD]/Android/data/com.orux.oruxmaps/files' all works for me, while I am only using that external SD card for map files and route/track files.



The path is different for the donate version, this has a different name (com.orux.oruxmaps.Donate).



Andy

Holton181

#5
Yes I know, the permission granting isn't the problem for me, it's the loop (+errors) as if my selection doesn't get recognized. I have tried many folders, internal memory and SD card, with the same behavior and strange is the dialogue actually asks specifically for write permission of klm/kmz files in the default overlay directory on the internal memory, not SD card (sorry for confusion, I wrote CD card in my last post).

I've got similar dialogues but without this loop behavior for other apps.

Holton181

#6
Almost half a year later...



Waiting for my wife to successfully take our 2.5 year old to bed for the second time tonight, so we can continue celebrate New Years Eve, played around with oruxmaps and finally found the solution to my problem (not the OPs).



I simply had forgotten to change the path for my overlays after something (can't remember what) had changed the name of the SD card. Had already changed every other paths affected by this long time ago.



Figured I'd post it here if it could help someone else.



Happy New Year!