Page 1 of 1

Android 12, folders, backup and migration

Posted: Mon Nov 07, 2022 12:31 pm
by edwardoo
Hello,

I just changed Android phone (Samsung S20FE Android 12 -> S21 Ultra Android 12) and would like to retrieve all landmarks, settings, custom on-demand maps, and "favorite maps & sets". (offline map files out-of-scope).

The current status is that AlpineQuest is re-installed by the Android setup Wizard, but starts fresh.

Some things I can reset manually (settings), some things I already store in public folders (offline maps), but some things I cannot retrieve at all:
  • placemarks (29 exported landmarks, 226 imported landmarks, 45 "Recent searches" waypoints, 51 recorded tracks, 17 tracks, 43 routes, 2 sets of waypoints)
  • custom on-demand maps ;
  • "favorite maps & sets" definitions with multiple layers & opacity are also time-consuming to re-create.
I know most of these can be exported/imported, even in bulk, but putting the app in the exact same would be way too complicated.

The main issue I have is that the data folder /Android/data/psyberia.alpinequest.full is not readable -- not by the built-in file explorer (/Android/data appears empty), not even by adb anymore for most files.

So most of what is described eg in Data storage and access or in the synchronization FAQ is not feasible (copy, sync with external cloud app, ...).

May I request a solution for this, some ideas:

1. store by default most data in /Android/media/psyberia.alpinequest.full -- as this one seems to be public.

I guess this could be done as part of the current "Storage location" chooser. I see currently only the option to store "pictures, audio files and exported files" in the media folder.
Also, currently changing the Storage location does not copy files over. This would be needed.
(by the way, if changing Storage location copies files, it provides a simple workaround for users who still have the /alpinequest storage option from AlpineQuest <= 2.2.9)
migration apps like Samsung SmartSwitch can copy over the */Android/media folders* quite quickly (using WiFi Direct or similar), so this seems the best/simplest solution, covering even users with big offline maps, but maybe I'm missing something?

2. provide a global backup/restore tool. any implementation works, eg it's enough to just save/load a zip to/from the media folder.

some apps have cloud backup but I think it's not needed here, and probably tricky as users can have lots of data (eg Whatsapp uploads to Google Drive ; Signal, Google Authenticator, ... use QR-code to have initiate transfer securely)

3. support built-in Android phone setup wizard backup/restore process (apparently limited to 25MB of data, but could store at least settings, maybe "favorite maps & sets" definitions, even landmarks for most users)

some discussion of (2) and (3): Exploring how to provide your own backup-restore mechanism in your Android app & Android doc: Data backup overview

To sum up, I would say put as much stuff in the public /media/ folder, and if some data needs to remain in the private /data/ folder, use (2) or (3) to still allow users to migrate it.

Thanks!
Regards,
Edward

Re: Android 12, folders, backup and migration

Posted: Mon Nov 07, 2022 3:00 pm
by edwardoo
Related:

Re: Android 12, folders, backup and migration

Posted: Mon Nov 07, 2022 8:17 pm
by edwardoo
Update: I was finally able to transfer the data successfully thanks to the workaround in your link Managing files in the "Android/data" folder on Android 11 (without root or USB) -- namely, using the special Files app that can access /data for some hackish reason.

Still I maintain that the ideas above would ease users lives a lot :-)

In addition I would suggest more prominent documentation of this workaround in the Data storage and access doc. After all it already has troubleshooting info for every other android version :D

Also another nice hack, thanks to the info on that same documentation, I was able to sideload an old AlpineQuest apk version (2.2.4) to get access to the deprecated public /alpinequest folder setting and... it still works after upgrade to latest! :twisted:

Re: Android 12, folders, backup and migration

Posted: Mon Nov 07, 2022 8:28 pm
by Psyberia-Support
Hi Edward,

Yes, absolutely, a backup/restore tool is planned for long, and would make things much easier for users, especially since the new Android 11 file restrictions.

Here are some precisions to your previous message:
The main issue I have is that the data folder /Android/data/psyberia.alpinequest.full is not readable
It actually is, but only file managers and sync apps are able to request access to those folders. And it's not straightforward: you need to use a file manager updated for the new Android file restriction, then browse the Android data folder, click on "Request folder access" (exact actions depend on the file manager you use), it will open a new system app where you'll be able to grant your file manager access to this folder... I have successfully tested this with "Cx File Explorer" on Android 11.
store by default most data in /Android/media/psyberia.alpinequest.full -- as this one seems to be public.
The application must first request the "Read user media files" permission to the user before accessing this folder, so it cannot be used as a storage folder unfortunately.

Re: Android 12, folders, backup and migration

Posted: Tue Nov 08, 2022 6:47 pm
by edwardoo
My mistake was thinking that Samsung's built-in My Files would have the support you mention, but despite several complaints on the Samsung forum it's not the case.

Thanks for the reply.