Can't save maps to sd card anymore #2684
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#2684
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I used to save my maps to sd card, but it seems this is not possible anymore.
It says "read-only" but I can successfully write to the sdcard from other Android apps.
Note that I'm running Android 11 (Lineage OS) on Samsung Galaxy S5.
And my OrganicMaps app version is 2022.05.31-10-FDroid (recently updated from Fdroid)
Did it work for you earlier on Android 10? Or did it work on Android 11?
It worked on Android 11.
(I still have organicmaps files in the SD card organicmaps data location)
So the only difference is that the older OM version worked, and the newer one stopped, right? Did you do any system updates?
@pastk can you please investigate this case? Maybe there is an issue in our write-check code.
I don't know in which OM update this issue appeared in the beginning as FDroid updates are automatic and I rarely use OM, but I remember a few weeks ago that all my downloaded maps had disappeared (need to be downloaded again). I didn't pay attention at that time that it was a SD card issue, so the new downloads of maps went to the internal storage.
And yes, I probably did few LineageOS system updates via OTA in the meantime (but other apps like AntennaPod or the camera, which are also configured to use SD card storage still work fine).
Hi @bbinet could you please send us logs to help debug an issue?
Tick "Enable logging" in OM settings, then go into "Save maps to" setting, then go to "Help" and tap "Report a bug" (you can send the logs via email, or save them as a file (if your file manager offers this option) and attach here - but please be aware the logs can contain private info like your location, or if you're in OM telegram group then send them directly to me @pastk ).
Hello @pastk , since you are on this issue and I'm having the same problem as @bbinet on a ::
The issue is the problem not being able to save the Downloaded maps to the SD card as it is shown as "read only" and hence not selectable.
My App storage settings (Android System) under Settings > Apps > Organic Maps > Storage > the option Storage used is already set to "External Storage" (done that by "Change" from Internal Storage to SD
And in the App under Settings > Save maps to > no possibility of selecting anything else other than the pre selected option of "Internal Storage" exactly as the opening image posted at the beginning.
as requested sending the logs.zip file for analysis, .HTH
logs.zip
Looking at the storage.log file , any reason that the path is set to "Currently configured storage: /storage/emulated/0/Android/data/app.organicmaps/files/" instead of "OSM" as it was in the past ?
Although the Maps are working as they are present on the Internal storage, would like to store them to the SD as space constraints to Internal storage is high.
Hi @aniston thanks for the report and the logs!
So it looks like you use SD card as an adopted/extended storage (as you've moved OM to SD in sys settings)? @bbinet do you use your SD card as adopted storage as well?
Did SD card work in OM for you before?
Does the issue persist if you move OM to internal storage in system settings?
Do you mind installing and getting logs from this beta build?
(I'e added more verbose logging and changed the way SD writability is checked)
Thanks!
@pastk , thanks for looking into this, about your questions ::
Thanks for now.
Hi @pastk , I'm back with my notes and Logfile logsBeta.zip report from OM beta build ::
so still cannot change to SD card for Downloaded Maps.
@aniston thanks!
As far as I can see from the release logs you attached in organicmaps/organicmaps#2684 (comment) you had 3 storage options visible already?
Anyway,
here is a new beta.
OrganicMaps-22060901-fdroid-beta_2.apk
Please uninstall the previous one first.
I assume your SD card will show up as writable now. In this case please try to switch to it via the "Save maps to" and then try to download some smaller map for a test.
And send in new logs please.
@pastk thanks for the Beta_2, I decided to start clean and removed both OM and OM_beta_1, put in a fresh new SD card at which point Android asked me to format it without other choices (except cancel).
So with the new OM Beta_2 installed at startup it asked me to download the base Worldmap and it completes its download but is not able to save it (no error message) just that the file is not there and background world map is blank.
This is verified as every time OM beta_2 starts up i'm asked to download the base Worldmao and the Download maps menu list is empty.
Under Settings the Save maps to now has the option SD card , and is selected (option to select Internal storage is also available) but apparently Maps are getting downloaded but not saved anywhere in the SD card nowhere for that matter with this option selected.
Reading around on the internet i came across some other older Apps that are facing the similar problem of saving to SD card under Android 11, could this be Android 11 specific ?
as usual hier ist the log file logsBeta2.zip
@pastk , Thanks again for your time.
@aniston and @bbinet your cases look consistent so far, so might be specific to Samsung devices (or last Samsung updates?).
@aniston I'll have a look at the links you posted shortly, meanwhile could you test one more beta please?
OrganicMaps-22060901-fdroid-beta-3.apk
@aniston ah, and if you have access to
Android/data/app.organicmaps.beta/files/
on your SD card could you please check if there are any files or subfolders there since beta2 test?@pastk on the SD card in /Android/data there are no files at all, so I guess we cannot write there.
Now the Beta_3 acts and works exactly like the Beta_2 , so::
That said I would not mind to save the files even in the root folder of the SD card (or atleast a way to specify a folder there).
If that could work as a carry-on method it should look good.
This is as expected. Since A11 apps have read-write to their app-specific directories only, so OM is expected to have access to
Android/data/app.organicmaps.beta/files/
either on SD (which it doesn't for some reason) or on internal storage (which it does as e.g. log files are saved there by default).And its expected that other apps (and hence a user) don't have access to this directory.
(you might be able to have a read-only access to it via some file managers that hold a special "all files premission", e.g. try Total Commander)
And this is not expected actually :)
Nope, the app can't have access to root folders (or any other non-app-specific folders) anymore..
In the link you posted one user had success using SD card for maps storage with OSMAnd - do you mind to try to see if it works? Maybe they've found a workaround for this issue.
Can you please check what does the system info show for OM storage size?
Uninstall previous betas please and check storage sizes
Thanks!
@aniston
As you have deleted a release version of OM anyway, could you please test a March release too? This is to ensure its not a regression with recent changes in OM's storage code.
Thanks in advance!
@pastk , sorry I could not get back earlier !
have to retire for the night , will catch up in 10 hours time .
you're right, "emulated" is backed by internal storage actually, its peculiarities of Android's storage naming...
Ok this means that maps are saved to the card actually, but could not be read / not visible to the app.. Very strange :)
Its about how I expected it to be, but anyway, just to confirm, could you please enable the logs, restart the app and then send the logs?
Thanks a lot for your help in debugging this!
@pastk that test is with Internal storage! not the SD card.
Are you sure? According to you beta3 logs OM chooses SD card as maps storage by default (please check in "Save maps to" settings).
(it doesn't matter what Android settings tell you, its important what is chosen in OM settings)
Hi @pastk , started again clean with Beta_3 to check.
2022-06-11 11:22:50.720 main: W/com.mapswithme.maps.settings.StoragePathManager: canWrite == false: /storage/54AE-180C/Android/data/app.organicmaps.beta/files/ - external, 31858393088 available of 31906070528 bytes, removable, state=mounted, uuid=54AE-180C, label='SD card'
Attaching the Beta_3 logsBeta3_20220611.zip as this time App was closed and opened atleast 3 times, maybe you can find something more in the logs.
HTH.
EDIT: took SD out of phone and read it on a PC.
@aniston
thanks a lot for the details!
Here is one more :)
beta4
Please test as usual and restart the app before sending logs.
Also this time could you do 2 tests please?
1st with OM installed into Internal (default).
2nd with OM moved to External in android app settings.
In both cases please ensure SD card is selected in OM settings.
@pastk results from beta4 testing (ensured SD card is selected in OM settings)
attached Log files from beta4 logsBeta4.zip
@aniston @bbinet could you please tell detailed version of Android you're running?
It should be somewhere in android settings "About" or "System -> About". For a Samsung phone it should be some OneUI version. Also the latest update version/date or security patch level (if you can find this info).
Please ensure you have the latest updates installed.
Hallo @pastk im outside now, but here are my screenshots of the Android. Yes I have the latest security updates as an update check results with no more updates.
According to this reference May 2022 is the last.
Android Security Bulletins
@aniston thanks!
We have one more idea to test (requesting run-time storage permissions), I hope to have a new beta ready tomorrow.
In the meantime could you please check on your phone if there are any SD-card related settings that could possibly affect its usage by apps? E.g. there is a Samsung-specific "Knox" security system, which might have some security settings/policies related to SD cards.
@aniston
Here is beta5.
The difference is that when you enter "Save maps to" settings android will ask for storage access - grant it.
Then try to download a small map, restart the app, enter "Save maps to" again (it shall not ask second time) and send logs as usual.
Hope it helps!
Hi @pastk , this is the earliest I can report from beta5 !
anyways log file is here logsBeta5.zip
my observations are as such::
@aniston thanks for your testing again!
Here is one more attempt: beta6.
It requests a different permission (write_external_storage, b5 was read_external_storage) and also I've expanded a file read test.
Please send the logs in, thanks!
@aniston could you please check if there are any updates for you smartphone?
@bbinet says the latest update has fixed the issue for him! Bruno. what is the new security patch level you have now?
To re-cap / wrap up:
Technical details:
Android/data/app.organicmaps/files/
returned by the android system callContext.getExternalFilesDir(null)
File.canRead()/canWrite()
returnfalse
File.exists()
works alsoFile.list()/fileList()
returnnull
(both for the main dir and subdirs), which means the app can't get list of dir's contentsHi @aniston,
if you have opportunity please test the following build N10.
https://drive.google.com/file/d/1Q4aip5SNmCRblOO4yUxrr_8YwAxLwh78/view?usp=sharing
We have one more idea to try to delete and re-create the dir returned by the system
Android/data/app.organicmaps.debug/files/
with a hope that it'll fix the access issue.Please do a fresh install (uninstall a previous debug version first if you had it), then install, turn on logs, go to "Save maps to" menu and send the logs in, thanks!
Also a related idea you can try for yourself is to delete and re-create this dir manually (via a filemanager if you have access rights or via a computer perhaps).
@bbinet @aniston did you try to do
ls -la
for Android/data/app.organicmaps.debug/files directory viaadb shell
? What were the permissions and owner?Also, did you try to remount the SD-card?
@biodranik I'm not so practical with adb shell, so took time out and figured how to use it.
ls -als /sdcard/Android/data/app.organicmaps.debug/files
gives meThanks! And what is displayed for
ls -als /sdcard/Android/data/app.organicmaps.debug
?@pastk , regarding Debug V10, I uninstalled the last Beta v5 and verified that the app folder exists no more
sdcard/Android/data/app.organicmaps.debug
, after that installed the V10 called Debugsadly this time round is the option to save to SD Card not available as you can see here.

Thanks for the logs - the idea didn't work out, unfortunately.
As for the
ls
info:/sdcard
is misleading in Android, its internal memory actually (emulated storage), hence there are map files there - its working fine in your device.Please add
ls -als
output for/storage/54AE-180C/Android/data/app.organicmaps.debug
(its your SD card) andfiles
dir there.@biodranik , I noticed that the path starting with
/sdcard/
is misleading as that is not the real SD card path !/storage/54AE-180C/
is the correct SD card path and effectively is empty :( ie: no files are getting stored there forAndroid/data/app.organicmaps.debug
@pastk
oops , seen this after posting above, its exactly ditto to what you said there ;)
@pastk , just wondering how you manage to read so quickly the GitHub Issue messages ?
Its a coincidence - I just happened to be at the computer checking github :)
You may want to install the Github app to have notifications on your smartphone.
I'm having the same problem with a Moto e30 using Android 11. Until this is fixed, Organic Maps is unusable for me, and I shall have to go back to Maps.me )-:
@Bradnik Am I correctly understanding that MapsMe properly saves maps to your device's SD card? Can you please enable logs in OM settings, restart OM, open settings/SD card dialog there, and then share logs with us via "?" -> Report a bug?
Actually it doesn't. It seemed to save OK (didn't say read-only), but a few days later the maps had disappeared.
On 24 September 2022 23:00:05 BST, Alexander Borsuk @.> wrote:
@. Am I correctly understanding that MapsMe properly saves maps to your device's SD card?
@Bradnik You still have the same issue with Organic Maps (OM), right? Can you please enable logs in OM settings, restart OM, open settings/SD card dialog there, and then share logs with us via "?" -> Report a bug?