Error restoring profiles (OM 7.5.9GP, Android 6.0.1)

Started by Yaroslav, April 11, 2020, 06:41:13 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Yaroslav

Hello. For me it's important to transfer OruxMaps settings between devices, so I decided to test this feature.

As I understood from the documentation, profile settings are stored in a file like oruxmaps/preferences/om2_com.orux.oruxmapsDonate_preferences.xml. I had two profiles: "Default" and "expedition".  I saved the above-mentioned file in an external storage. Then I reinstalled OruxMaps deleting the "oruxmaps" folder for the total cleaning. I run the app for first time, seeing the welcoming screen, so a new clean "oruxmaps" folder was created. Then I moved the "om2_com.orux.oruxmapsDonate_preferences.xml" file to the "oruxmaps/preferences" folder. I completely closed the app. Then I opened it and went to Profiles->Restore/Refresh button. I expected that after pressing that button I would see my backup'ed "Default" and "expedition" profiles. Instead of that I receive a message: Error restoring profiles!

Any ideas?

OruxMaps version from Google Play: 7.5.9GP
Platform: Android 6.0.1 MMB29M on Xiaomi Redmi 3S
Other info: OruxMaps is installed in the internal storage

orux

Each profile is in its own file. You must copy all the om2_xxxxxxx.xml files to the new folder.

The one with the name om2_com.orux.oruxmapsDonate_preferences.xml is the one that is restored in the 'Default' profile. But note that on some phones/Android versions, that file is overwritten by Android itself. It is recommended to always use profiles with their own names, created by you

In your case, you must copy several files. If you use the 'Default' profile with different settings from the factory, you should create a new profile from the 'Default', if you see that you have problems with the settings saved in that profile.
Also check that the files have been copied correctly, in Android 6 and earlier some file managers created empty files, 0 kb when doing copy/paste.

orux

Yaroslav

#2
Thank you for the quick response. For some reason, despite I had the custom "expedition" profile created, I got just one XML file in that folder. Anyway, I can't reproduce that anymore. I created three custom profiles, and everything works as you described now.

Some questions

  • Profile settings are created in "oruxmaps/preferences/4.2" folder. What is 4.2 ?
  • I thought that if I move profile XML files away, I'll break them in the app. However, if I delete XML files from "oruxmaps/preferences/4.2" and restart OruxMaps, profiles are working well. Could you clarify a bit more about these XML?

Am I correct about the right workflow to securely transfer profile settings?

  • Set up a Default profile, which will share common settings
  • Create custom profiles from the Default one
  • DON'T TOUCH XML files in "preferences/4.2"
  • If, for some reason, there are no XML files in "preferences/4.2" but profiles work well in the app, create new profiles from them, so it will make necessary XML files again.
  • Copy the chosen XML files to another device to restore the profiles.

Suggestions

  • I noticed that when you tap on a profile to delete it in the app, you see a confirmation window: "Are you sure you want to delete? ..." It would be very helpful if you put the profile name in that window. Because on a small screen, people may unintentionally tap on a wrong profile, and they won't be able to understand that they'll be deleting a wrong profile.
  • I see that the documentation is a bit obsolete and not complete, I'd be glad to help with it (English and Russian).

orux

Quote from: Yaroslav on April 12, 2020, 09:28:45 AM
Thank you for the quick response. For some reason, despite I had the custom "expedition" profile created, I got just one XML file in that folder. Anyway, I can't reproduce that anymore. I created three custom profiles, and everything works as you described now.

Some questions

       
  • Profile settings are created in "oruxmaps/preferences/4.2" folder. What is 4.2 ?
  • I thought that if I move profile XML files away, I'll break them in the app. However, if I delete XML files from "oruxmaps/preferences/4.2" and restart OruxMaps, profiles are working well. Could you clarify a bit more about these XML?
Am I correct about the right workflow to securely transfer profile settings?

       
  • Set up a Default profile, which will share common settings
  • Create custom profiles from the Default one
  • DON'T TOUCH XML files in "preferences/4.2"
  • If, for some reason, there are no XML files in "preferences/4.2" but profiles work well in the app, create new profiles from them, so it will make necessary XML files again.
  • Copy the chosen XML files to another device to restore the profiles.
Suggestions

       
  • I noticed that when you tap on a profile to delete it in the app, you see a confirmation window: "Are you sure you want to delete? ..." It would be very helpful if you put the profile name in that window. Because on a small screen, people may unintentionally tap on a wrong profile, and they won't be able to understand that they'll be deleting a wrong profile.
  • I see that the documentation is a bit obsolete and not complete, I'd be glad to help with it (English and Russian).
Hello!

4.2 was the first OruxMaps version that supported profiles, it has no meaning.

The true profiles files are stored inside the app private storage, what you see in 4.2/ folder is a backup. The app has to copy those files from/to the internal storage.

Your workflow is correct. The files inside 4.2/ folder are created automatically from the app profiles, when you create/delete/modifies one of them. The app restores the xml profiles from 4.2/ folder when you click the 'sync' button in profiles screen.

I will add your suggestion about profile deletion.

If you want to help with translations, please, contact oruxuro@gmail.com



orux


Yaroslav

Thank you, now it's clear but one thing doesn't work as you described.

QuoteThe app restores the xml profiles from 4.2/ folder when you click the 'sync' button in profiles screen.

Actually, I tried it and noticed that if I remove the XML preferences from the folder, while profiles are working correctly, and then press the SYNC button, I get a message: "Profiles restored correctly". But those XML files do not get restored. The 4.2/ folder remains empty. However, if I change some settings in one profile (like interface color), then all the XML files for all profiles get immediately restored in the 4.2/ folder.

orux

Quote from: Yaroslav on April 18, 2020, 02:20:18 PM
Thank you, now it's clear but one thing doesn't work as you described.

QuoteThe app restores the xml profiles from 4.2/ folder when you click the 'sync' button in profiles screen.

Actually, I tried it and noticed that if I remove the XML preferences from the folder, while profiles are working correctly, and then press the SYNC button, I get a message: "Profiles restored correctly". But those XML files do not get restored. The 4.2/ folder remains empty. However, if I change some settings in one profile (like interface color), then all the XML files for all profiles get immediately restored in the 4.2/ folder.

Yes, the new version (you can test the beta) will do sync in both directions.


orux