osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.73k stars 1.03k forks source link

Intermittent Inability to Write to External (SD Card) Storage #3105

Open crbn60 opened 8 years ago

crbn60 commented 8 years ago

Since upgrading to Android 6.0.x, OSMAnd intermittently is unable to write to the SD card on startup.

This is currently occurring with OSMAnd+ 2.4.7 on a Samsung Galaxy Tab A SM-T350 running Android 6.0.1.

I use downloaded/offline maps and my own produced OBF files.

When the issue occurs, the app displays a Data storage folder chooser with this text:

Currently selected Data storage folder is readonly. The storage folder was temporarily switched to Internal memory. Please choose a valid storage directory.

Tapping on "Memory card" causes a message to appear: "Maps could not be created in the specified directory".

screenshot_20160921-130859

Restarting the device usually resolves the problem until the next occurrence.

vshcherb commented 8 years ago

Could you please double check that permission granted in Android settings. Did you see permission was asked when the tab was opening.

crbn60 commented 8 years ago

Since the issue is intermittent with no changes made to the settings, I believe them to be correct. But in case I'm wrong, here are all my settings for the application:

screenshot_20160927-081827 screenshot_20160927-081854 screenshot_20160927-081905

vshcherb commented 8 years ago

Is it possible to change it later in General Settings, via setting of Data Storage . That issue is very weird and it is unclear how to deal with it.

crbn60 commented 8 years ago

Are my current settings correct, from the screenshots?

On Wed, Sep 28, 2016 at 1:14 PM, vshcherb notifications@github.com wrote:

Is it possible to change it later in General Settings, via setting of Data Storage . That issue is very weird and it is unclear how to deal with it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/osmandapp/Osmand/issues/3105#issuecomment-250233481, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYAmiAo9awSBq_17Q257nlAwYSo5r9rks5quqBigaJpZM4KDEZx .

Adam Sherman Directeur des opérations, Sauvetage bénévole Outaouais Director of Operations, Ottawa Volunteer SAR CTO, Versature Corp. +1 613 797 6819

vshcherb commented 8 years ago

Yes the settings are correct.

crbn60 commented 8 years ago

I can confirm that at least one other user, with the same hardware, has the issue. With both of us, it started after the Android 6 upgrade.

On Fri, Oct 7, 2016 at 10:49 AM, vshcherb notifications@github.com wrote:

Yes the settings are correct.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/osmandapp/Osmand/issues/3105#issuecomment-252272683, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYAmoiBxpIrnMrEeTK9tnsrWjr3qXcJks5qxlvsgaJpZM4KDEZx .

Adam Sherman Directeur des opérations, Sauvetage bénévole Outaouais Director of Operations, Ottawa Volunteer SAR CTO, Versature Corp. +1 613 797 6819

crbn60 commented 8 years ago

Quite odd is that I just launched the app and got a different screen, which I think is the fresh install screen, (Sorry, didn't think to capture it.) This screen was prompting to find my location and download maps.

At the bottom, it was defaulting to using internal storage. But I tapped that, changed it to memory card, and the app continued to launch and find my data. No errors.

EdenWise commented 8 years ago

I would like help substantiate this bug. I am using and Amazon Kindle Fire that is using version 5.3.20 (I believe Amazon uses an older version of the Android OS and this is the corresponding version); I have seen Android 6 and this looks different. I have had this happen twice in about two weeks. I fixed was able to temporarily fix the bug by defining the other SD card location available in the settings and copying my files over there; upon starting it restored it to its previous state (one storage location as like .../Android/data/net.osmand/... and another was like .../Android/obb/net.osmand or something like that.

BTW I appreciate the effort to create and upkeep the application.

crbn60 commented 8 years ago

Since the latest OsmAnd update, the issue is a little different for me. Now, I get the initial/first run screen on occasion, I assume since it can't find its data. A restart of the tablet always corrects it.

The last time it happened, I was switching between a few GPS apps and it suddenly did that.

Thanks,

A.

On Fri, Nov 18, 2016 at 14:53 Todd Weed Partridge notifications@github.com wrote:

I would like help substantiate this bug. I am using and Amazon Kindle Fire that is using version 5.3.20 (I believe Amazon uses an older version of the Android OS and this is the corresponding version); I have seen Android 6 and this looks different. I have had this happen twice in about two weeks. I fixed was able to temporarily fix the bug by defining the other SD card location available in the settings and copying my files over there; upon starting it restored it to its previous state (one storage location as like .../Android/data/net.osmand/... and another was like .../Android/obb/net.osmand or something like that.

BTW I appreciate the effort to create and upkeep the application.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/osmandapp/Osmand/issues/3105#issuecomment-261626013, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYAmr6b39WQ6MqvRTBTmACllvQAQb5yks5q_gIugaJpZM4KDEZx .

dmpr0 commented 8 years ago

Hi, when OsmAnd can't find its data, do you can see and access your SD Card from other apps, like Camera or File Manager?

crbn60 commented 8 years ago

What would the valid test be?

  1. OsmAnd can't access card;
  2. Switch to File Manager, look at the card contents;

Right?

On Wed, Nov 23, 2016 at 9:06 AM, Dmitriy Prodchenko < notifications@github.com> wrote:

Hi, when OsmAnd can't find its data, do you can see and access your SD Card from other apps, like Camera or File Manager?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/osmandapp/Osmand/issues/3105#issuecomment-262520805, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYAmrZuUQX4qCZKzfgLnHuZSDXD9l8Nks5rBEhKgaJpZM4KDEZx .

Adam Sherman Directeur des opérations, Sauvetage bénévole Outaouais Director of Operations, Ottawa Volunteer SAR CTO, Versature Corp. +1 613 797 6819

dmpr0 commented 8 years ago

Yes, i have same trouble, when OsmAnd can't access maps, android say that my sd card is corrupted and don't show anything in file manager.

crbn60 commented 8 years ago

I just had it happen and I can both see the card in Android settings and in Total Commander.

sonora commented 6 years ago

Rather old issue, is this still observed or deprecated?

cryptomilk commented 5 years ago

OSMand still requests android.permission.WRITE_EXTERNAL_STORAGE which has been deprecated with Android 5.0. In order to put the maps to the external SDcard, OSMand would need to use the Intent ACTION_OPEN_DOCUMENT_TREE and/or ACTION_OPEN_DOCUMENT.

More details at: https://stackoverflow.com/questions/26744842/how-to-use-the-new-sd-card-access-api-presented-for-android-5-0-lollipop