This object is in archive! 

Data lost after update to Locus Map 4.15.0/Locus Classic 3.66.0

HyPhan shared this problem 20 months ago
Solved

After the last update of Locus (Classic) yesterday, my offline vector maps were gone.

I know Android does tighten security rules constantly, but somehow I did not have problems until now. Locus was installed on that smartphone (S21) a bit less than two years ago. Maps were located in a public root directory "Locus" (and mapsVector within that).

After they were no longer found, I first tried to "import" it from there. But it did not work, now the map is only a very small file there, probably it got destroyed by trying to copy it from there to there (overwriting itself)..

Next I tried to re-download (openandromaps). After full DL it ended with error 12569.

So I changed the standard directory via settings to private App data folder (which I cannot look into with the Samsung file browser) - resulting in having to re-start Locus. Besides now I cannot switch back to an internal storage folder (it says device not supported). But trying to download again, again after the full amount of gigabytes it ended in error 12569.

Looking into the Locus data folder with Locus itself (browsing with "import", main folder going into mapsVector) I see a .zip.tmp there of the download-size, greyed out.

That last update somehow broke offline/download map handling totally :(

Best Answer
photo

Hi guys,

firstly really sorry! for this. After a whole day, I've finally found a reason why this happens. It does not make sense to me and I do not consider it a developer failure, but this does not excuse me.

---

Important info

No data is lost. If there still exists /sdcard/Locus directory (and it exists for sure), data is safe. You may back up this directory manually to be sure.

---

Why it worked before
If you were using the app (probably all of you) Locus Map 4.4 / Locus Classic 3.55 or older, you were even on Android 11+ able to put the app directory into the root of internal memory. Google anyway completely removed this option later so apps can't access the whole file system on A11+ (except in a few cases like file-browsers etc) anymore.

There exists an exception: if you do not uninstall the old app and just keep updating it, it still keeps the option to have access anywhere. So all new installs do not allow this. And this benefit (this hacky exception) was lost during the update.

---

Most reliable solution

Because soon or later, you will have to move with app data to the private directory, here are the steps that may help:

  1. change app directory to private over
    • Locus Map: Settings > Backup & Filesystem > File system manager > Set the main directory > Private folder in internal storage
    • Locus Classic: Settings > Miscellaneous > Default directories > Set the main directory > Private folder in internal storage

  2. this should be quick and after that restart is needed
  3. then move old data with (below). It is necessary to open the old "Locus" directory and choose "Use this folder"
    • Locus Map: Settings > Backup & Filesystem > App data transfer > Load app data > continue
    • Locus Classic: Settings > Miscellaneous > Default directories > Load app data > continue

  4. You may "Move" the whole directory or if you have enough space and want to be safe, simply "Copy" first and later delete the old Locus directory manually
  5. After restart, all data should be restored

---

Alternative solution 1.

Because I've found the issue, I'm just preparing a new version that will be available within a few hours. But as I wrote before, access to the full file system is lost, so it is necessary to

  1. Do a "Backup of settings" of the current version and save the generated file out of the app directory
  2. Uninstall current version
  3. Install the older version Locus Map 4.0 or Locus Classic 3.50, which still has access to the whole system, from our Google Drive
  4. Without starting it, simply update to the latest Locus Map 4.15.1 or Locus Classic 3.66.1. It will be available on Google Play a little later or after an hour again on our Google Drive here
  5. After this update, all should work as before with data in the internal memory

---

Alternative solution 2.

Using the so-called AFA version. Google does not allow us to publish Locus Map with special permission (that use for example file-browsers) called "All Files Access", so we create and distribute it for advanced users manually over our Google Drive. So even now, you may update to the latest app AFA version and continue the same as before.

After installation, it is only necessary to allow this feature in system settings > Apps > Special app access > All files access > Locus Map/Classic or directly in the app settings > Backup & filesystem > File system manager and "Grant permission" button at the top.

5225024a95237da907f528ec2521ef08

---

Feel free to ask if something is not clear. I'll gladly try to explain.

Replies (25)

photo
2

Same experience with LM 4.15.0 (Gold)
All downloaded maps are gone, the only usable map is LoMaps online. When trying to download maps from the Locus store, the download always runs to 50%, then stops with the message: Process failed. It doesn't depend on the size of the map - even an 8MB San Marino map will fail. Samsung Galaxy A52, A13.

photo
1

Hello guys,

I'm really sorry to you and a few others that suffer from this problem with the recent app version. Unfortunately, we are still unable to simulate, no matter what we do.

May someone of you find 15 minutes and try to download any map from Locus Store and OpenAndroMaps and after it fails, create a big log by this method? It should help a lot (most probably). Thank you very much!

photo
1

Same here, offline maps, points, and tracks are gone, no custom map sources as well. Can't download maps from online store.

Observed error: ActionDownloadStore, code: 12549

Locus version: 4.15.0

Android 13


Will create a bug report as described above.

UPD: sent bug report file to locus.map@asamm.com

photo
1

Hello Ivan,

thanks for the log! Inside I see that you have Pixel 4a with Locus app placed in the root of internal memory (/sdcard/Locus/). Anyway every access to app data end with error "open failed: EACCES (Permission denied)". This is correct limitation of the Android 11+, apps can no longer place it's own data to the root of the internal memory/SD card.

There was anyway exception. If you had installed app that was still capable to do it, then till you only update the app and not fully re-install (un-install & install), app should still be able to read data. So just for confirmation: you again only updated Locus Map or you did a full re-install?

So the problem is simple: app can no longer access own data. Best should be to migrate data to new internal location over app settings > Backup & filesystem > App data transfer > Load app data. Then open a Locus directory in the root and choose "Use this folder".

Question anyway remains, why it worked before the update. It looks like the exception I've mentioned before stopped to work...

photo
1

Hello!

Yes, that was an ordinary update. So no other changes in the app/system whatsoever.

What would be the correct sequence of actions to restore all my previous map sources, tracks, and points from the backup to the new folder?

photo
1

Seems that "Load app data" won't restore anything. Neither "Backup manager - Restore" does :(

photo
1

I'm just testing it and indeed, this happens with update to the latest app version. Still do not know why.

Exact steps to solve this problem

  1. change app directory to private over Settings > Backup & Filesystem > File system manager > Set the main directory > Private folder in internal storage
  2. this should be quick and after that restart is needed
  3. then move old data with Settings > Backup & Filesystem > App data transfer > Load app data > continue. It is necessary to open old "Locus" directory and choose "Use this folder"
  4. You may "Move" whole directory or if you have enough space and want to be save, simply "Copy" first and later delete old Locus directory manually
  5. After restart, all data should be restored

photo
1

I ended up doing uninstall/install and restoring from remote backups. So yeah, there are 2 types of people: those who do backups and whose who do not _yet_ :)

photo
1

Hi Menion, have you got a solution which doesn't require the use of a private folder? I need to be able to access my maps from other apps (termux).

I've followed your formula and now have no way to use my custom maps and no way to revert to the previous, shared, custom maps forlder.

Is it the intention that users should no longer be able to use their custom online maps?

Thanks, Simon.

photo
1

Ok, I see now that I can use the android file browser to access the private folder, so that's something!

photo
1

This has now been completely resolved using the AFA version (see below).

Thank you Menion

photo
1

You are welcome!
AFA has the only major disadvantage because it is created (for now) just for a few happy users: we do not have an automatic updating system for it, so it needs to be updated manually. Because its internal ID is same as the version published on Google Play, it is recommended not to update Locus Map from Google Play.

photo
1

Hi, Ivan writes that in addition to the maps, the routes and points are gone... I have this left and I can save new routes and points

photo
1

I have the same problem: after update to v4.15.0 LocusMap cannot access to internal storage /sdcard/Locus/. All data lost. I changed the main directory to private folder in the internal storage and restore data from backup and manually move offline maps to Android/media/menion.android.locus/Locus/maps. Now everything works.

...Everything works BUT it is very slow - it takes around 5 seconds to load/switch an offline map! Before it was instant. What is wrong?

photo
1

I also meanwhile of course noticed that not only maps were gone, but all my tracks too. And yes just a normal app update.

It was possible to "load app data" from old directory to new one. The track created today (after switch to app-private dir yesterday) seems to be lost: overwritten by transfer. I had expected the tracks would be added not replace that one new one.

When exporting tracks or in this case transferring data from the old dir you can browse within Locus and then Locus/Android asks the user for access allowance. So Locus _can_ access (read & write) external directories. Why dont you just let Locus ask the user for access to that old Locus directory?

Still unclear why yesterday - after the switch to private Locus data dir - new map download failed. And it just happened again after DL of 2.6GB, at about 90%, error pA, code 12569. Looking into the private data folder (using CX Explorer which asks for access, while Samsung file browser shows nothing below Android/data), again there is the .zip.tmp left behind.

photo
1

Another try of map DL finally worked. It seems the network connection is not stable here. So this was only a follow-up-problem after the real problem forced me to re-download map, but not a problem of Locus. (of course a more readable error message like "connection lost / download aborted" or such would help avoiding misunderstandings)


I understand the "all file access" for apps is no longer possible for current Android versions at least via Play Store.

But again: Locus is able to access storage folders to write track exports or read old data dir for transfer. The user is asked to grant access to such folders. So could Locus not ask the user for access to any directory chosen on the storage (outside private app data) - and use this as data dir?

photo
2

Hi guys,

firstly really sorry! for this. After a whole day, I've finally found a reason why this happens. It does not make sense to me and I do not consider it a developer failure, but this does not excuse me.

---

Important info

No data is lost. If there still exists /sdcard/Locus directory (and it exists for sure), data is safe. You may back up this directory manually to be sure.

---

Why it worked before
If you were using the app (probably all of you) Locus Map 4.4 / Locus Classic 3.55 or older, you were even on Android 11+ able to put the app directory into the root of internal memory. Google anyway completely removed this option later so apps can't access the whole file system on A11+ (except in a few cases like file-browsers etc) anymore.

There exists an exception: if you do not uninstall the old app and just keep updating it, it still keeps the option to have access anywhere. So all new installs do not allow this. And this benefit (this hacky exception) was lost during the update.

---

Most reliable solution

Because soon or later, you will have to move with app data to the private directory, here are the steps that may help:

  1. change app directory to private over
    • Locus Map: Settings > Backup & Filesystem > File system manager > Set the main directory > Private folder in internal storage
    • Locus Classic: Settings > Miscellaneous > Default directories > Set the main directory > Private folder in internal storage

  2. this should be quick and after that restart is needed
  3. then move old data with (below). It is necessary to open the old "Locus" directory and choose "Use this folder"
    • Locus Map: Settings > Backup & Filesystem > App data transfer > Load app data > continue
    • Locus Classic: Settings > Miscellaneous > Default directories > Load app data > continue

  4. You may "Move" the whole directory or if you have enough space and want to be safe, simply "Copy" first and later delete the old Locus directory manually
  5. After restart, all data should be restored

---

Alternative solution 1.

Because I've found the issue, I'm just preparing a new version that will be available within a few hours. But as I wrote before, access to the full file system is lost, so it is necessary to

  1. Do a "Backup of settings" of the current version and save the generated file out of the app directory
  2. Uninstall current version
  3. Install the older version Locus Map 4.0 or Locus Classic 3.50, which still has access to the whole system, from our Google Drive
  4. Without starting it, simply update to the latest Locus Map 4.15.1 or Locus Classic 3.66.1. It will be available on Google Play a little later or after an hour again on our Google Drive here
  5. After this update, all should work as before with data in the internal memory

---

Alternative solution 2.

Using the so-called AFA version. Google does not allow us to publish Locus Map with special permission (that use for example file-browsers) called "All Files Access", so we create and distribute it for advanced users manually over our Google Drive. So even now, you may update to the latest app AFA version and continue the same as before.

After installation, it is only necessary to allow this feature in system settings > Apps > Special app access > All files access > Locus Map/Classic or directly in the app settings > Backup & filesystem > File system manager and "Grant permission" button at the top.

5225024a95237da907f528ec2521ef08

---

Feel free to ask if something is not clear. I'll gladly try to explain.

photo
1

Fantastic work.

The AFA version works a treat.

This must have been a busy day for you. Many thanks

photo
1

You made me worried there for a minute - I'm heading to the mountains today and wanted to check the route, imagine my panic when the maps, tracks and points were all gone!!!


Anyway, 'Most realiable solution' worked for me - thank you for your efforts in finding a speedy resolution - double thumbs up.

photo
1

I updated to latest 3.66.1 but the offline maps are still missing on my Redmi Note 9 (MIUI Global 13.0.3). Also the import function does not work. See attached screenshot.0fee820502afed0a0b68b262887f1a6d

photo
1

Hi

I also have the offline maps not showing.

I had them a week ago, and then I updated my OS yesterday.


I did not understand how to set a folder to private in the most reliable solution.

Could you explain that in more detail.


I'm using a Samsung S21.


I have Locus Maps classic pro 3.66


Are you going to release a version that solves the offline maps problem?

photo
1

I am using Locus V4 and want to install the AFA version. There are versions MapGooglePlay_4.15.1_1097_release.apk and MapGooglePlayAfa_4.15.0_1096_release.apk on your googledrive. Looks like the 15.1 AFA version is missing here

photo
1

Finally, I had success with the AFA-Version. But I could not install it directly from the Smartphone (I got a invalid package error, why?), I had to install it via USB using ADB).

But I also tried the other alternatives. That what you call the Most reliable solution seems to work, except that I could not access my maps and srtm-data. With Alternative Solution 1 it was exactly the same, no access to maps and srtm-data.

What I wonder and do not understand is the fact, that LocusMap would be able to transfer these data to private folder. So obviously LocusMap can read the data, but why not during normal operation ???

The folder for maps and srtm-data, never can be a private folder. It must be accessible by more than one app. Also I have to be able to copy data from my PC to this folder or to delete some data. A private folder I cannot access.

The AFA-Version is a good work-around for some time. But what will happen in future? I hope you will find a solution which covers all the needs of the users. I think its not only to me to have this problem.

photo
1

It would be nice to see a "grant folder access" solution in the Google play version.

Is this feasible (I think so...) and something you envisage doing?

What are the potential drawbacks?

In the meantime AFA is working well, but as you note will not auto update & gets my infosec friend creeped out...

I think ACTION_OPEN_DOCUMENT_TREE is where it's at.

https://developer.android.com/training/data-storage/shared/documents-files

The API30 restrictions on this are rather inoffensive and certainly don't seem to rule it out.

It also works with multiple activities:

https://stackoverflow.com/questions/75023097/save-action-open-document-tree-permissions-between-activities

photo
1

Hello!

I have the same problem like others. Offline maps cant be loaded. I tried this afa thing. I updated the app from google drive. But I have a problem. I can see that Locus app doesnt have a full acces to all files but I cant change it. There is no such button or anything in my settings. At least I cant find it. Can you help?

( I have Locus map classis 3.66.1 and a redmi 9t phone with android 12)

photo
1

Hi guys,

thanks for the additional questions. I'll try to answer all at once:

Slow app after the change

it still looks like there is some problem and the app in the background write and write errors into a log, which slows down a lot.

Solution: complicated, sorry. I personally suggest trying to backup manually the app directory and re-install the app.


"Use this folder" method for own data

(approach over "Open document API") This approach has two massive disadvantages. It is very slow, mainly when working with smaller files, but mainly, it does not allow random access to part of files over old java.io.File API, so it is not possible to connect to for example database files over this method (app raster maps, points & tracks database).


"All files access" on the Google Play

We tried to push the version with this feature enabled 1.5 years ago. But after long "discussion" with some devs from the Google team, we were forced to remove it because "Locus Map does not satisfy the needs for this permission". Unfortunately.


---

Suggest specific questions write as private ticket here on the help desk. We will gladly try to help immediately.

---

@Yuval Gronau

in the app inner settings > Backup & filesystem > File system manager click on the "Set the main directory" where will be an option to choose "Internal private directory.

@Kinga Kamocsár

also suggest opening the app inner settings > Backup & filesystem > File system manager and at the top should be blue box with "Grant permission" button.

photo
1

Android 11+ versions. A little bit of sunshine ?
Fortunately, not everything should be doom and gloom.
https://github.com/devemux86/cruiser/discussions/80#discussioncomment-5280908
Very useful if you do ever need to perform an app downgrade.
Backup the apk ! An easy fast job to do by the Cx File Explorer.



photo
1

Thanks Willy, this is anyway already implemented in the Locus Map for some time.

Just carefully: not all devices support this feature!

photo
1

I don't know if that is just in my case but the path described above (Settings > Backup & Filesystem > File system manager > Set the main directory > Private folder in internal storage) is not corrrect in (my) Locus Classic.

In my case it was: Settings > Miscellaneous > Default directories > Set the main directory etc....

The rest of the procedure seems to be identical.

I hope it helps someone not to waste time to search for the location in Locus Classic (or mabe there is something wrong with my app).

After all it did work.

photo
1

You are of course correct, thanks. Path for Locus Classic and Locus Map are not identical. I've updated this in the main post, thanks!

photo
3

You should really do something to make this easier for users. You're unnecessarily leaving the app in an unusable state. Users shouldn't need to fish into settings to get the app to work. If the app can't read or write to Internal Storage then it should either automatically change the path to a private folder or prompt the user before making the change. You're leaving it in a state that new maps can't even be installed without contacting you to resolve.

photo
1

A. Order and tidiness in Locus folder.

A10 phone. 64GB + 64GB ext sd.
Set the main directory:
> Private folder in the internal directory.
Set custom directories:
> App default EXCEPT for mapsVector.
In Private 'Android/media' folder on SD card.

Usefull:

By Cx File Explorer create shortcut > Select the mapsVector Folder > Add to Home Screen

Very confusing: I still find several empty Locus > mapsVector remnants.
Isn't it better for Locus to clean up these unnecessary empty Folder remnants immediately ?


B. Vectormaps and multi app usage. A11 ++

Question: Can you share vector maps between apps ?

Test by A12 phone. (No ext sd)
All apps are google play versions !

- Locus map downloader:
Places the maps in: (Choice menu)
Locus Private: Android > media > Locus > mapsVector.
In accessible, select Android > media

- Cruiser app downloader:
Places the maps in:
Cruiser Private: Android > data > gr.talent.cruiser > files > maps

Tested:

- Cruiser > settings > Application > Advanced > Menu: select Advanced.

Continue in this way without copy maps !

In the Cruiser maps menu select Open maps > Go to:
Locus Private > Android > media > Locus > mapsVector.

Advantage:
So allows apps to share their vector maps freely.
This saves GB's of rather useless map downloads.
And also with A11+ so is very useful for multi app users.

App devs could so tackle one of the major disadvantages arising from A11 and + ?
Maps:
- In Android media.
- Import without copy.

Translated with http://www.DeepL.com/Translator (free version)

photo
1

I was recording a track for a few days when this issue occured. I got the message "Unfinished track record pending" but the track was already gone on the map. I immediately backuped the entire Locus folder from the internal storage. Also noticed that "/locus/cache/track_rec" was empty. Older tracks were still around but gpx export didnt work though.


I installed the AFA version and copied back the entire backup. The track didnt show up. So I guess this track is lost or is there any other way to retrieve it?

Old tracks however are still around and gpx export works again.


The latest automatic backup is too old, unfortunately.

Using Locus Maps on Galaxy S20.


Thanks


Using Locus Maps

photo
1

Hello Pete,

you looking correctly into the "track_rec" directory. Here really should sit up to three files with current track recording in progress. Anyway, even this issue should not delete these files. Suggest double checking the Locus directory in the root of internal memory and also in internal/data/Android/menion.android.locus/files/Locus directory. Anyway if in both cases, there will be no files, then I'm sorry, but yes, this recording is lost...

photo
1

Same problem with a Galaxy A42 5G and Locus Classic...

"Most reliable solution" used with success !

Thanks Menion

photo
1

Hi Menion,

I understand the new storage policy and would also like to move my locus files to Android/data. maps/, data/srtm/, and many other data can be stored in Android/media. Very good! Unfortunately you can't store data/media/ in Android/media.

Why is that?

My data/media/ has grown over the years to 4GB.
So I can't make an automatic incremental backups with foldersync from data/media to my home server. Therefore I have to use the Afa version. Too bad actually.

Another point
The Afa version should be signed with a different certificate, otherwise it will be accidentally replaced by the play stores of the non-Afa version during (automatic) updates.

photo
1

Hello

data/media is currently problematic directory, agree. We will be doing something with it during the next months for sure.

Apps are almost identical (except this one permission) so an identical certificate is what helps us work with them on our servers also identically. You may disable automatic updates on Google Play.

photo
1

Hi,

I noticed a problem that I missed previously.

I am using an app called "Awaryjniejszy GPX" to download cache locations form Opencaching. I worked perfectly untill now (I haven't used it for a while). It is a plugin to Locus Classic

Whenever I want to download GPX it shows notification: "Cannot create a directory for the target file.

Unable to create directory for downloaded images" (translation).

The directory which is set in the app is: /storage/emulated/0/Locus/mapItems

When I try to change it to "/storage/emulated/0/Android/data/menion. android.locus.pro/files/Locus/mapItems" it seems that it has no permission to write in this folder.

Is there any solution to that problem or the app/plugin is useless from now on?

Additionally a file manager from Samsung displays message that directory Android/data/ may be dispayed only on computer (Due to Android limitations, the contents of this directory can only be displayed on a computer).

photo
1

I had the problem described in the opening. I am not an expert and have a hard time with all the descriptions. Anyway, the "Most reliable solution" worked on my Android. That's great. I wanted to be sure and opted for the copy variant. Now I want to delete the old directory in Locus Map 4, but which one is it - where do I find it? I'm afraid I'm doing something wrong. Could you please describe this in detail? Many thanks in advance.

photo
1

I have the same problem.

Impossible to add some GPX file.


In the Settings > Backup & Filesystem > File system manager > Set the main directory,

I cant select "Storage Interne" -> Ce repertoire n'est plus prise en charge


Help me please !

photo
1

Hello Friman,

sorry for the trouble. You are probably writing about the problem described here (where you already participate). I'm looking at it.

Replies have been locked on this page!