Possible to re-run save file conversion?

A place to submit bugs to the Andor's Trail Development Team.
Post Reply
Einsame Hirte
Posts: 27
Joined: Sun Jan 24, 2021 8:22 pm
android_version: 13 - Android 13

Possible to re-run save file conversion?

Post by Einsame Hirte »

I'm trying to troubleshoot a problem I'm running into trying convert a savegame directory from 0.7.13.2 to 0.8.1 on an emulated Android 11 device. Is there a way to force it to "forget" that the conversion has already been done? Even after clearing data, caches, and uninstalling and reinstalling 0.8.1 (and rebooting in between), and deleting and re-pushing the old /sdcard/andors-trail folder to the (emulated) device, it won't attempt to convert it again - it worked once, the first time I tried it, but when I uninstalled (and deleted the app data) it deleted the converted saves but still won't re-import the original ones, so it shows no saved games. Where could it be storing the "already converted" state information?

The original problem I'm trying to solve relates to an incomplete conversion on my real device, a Pixel 5 running Android 13, but I want to re-run the conversion to make sure it's not something I messed up when I updated. I'm using the virtual machine to make sure it's not something to do with the paranoid Android 13 permissions.

Thanks!
[edits made for clarity after re-reading]
Einsame Hirte
Posts: 27
Joined: Sun Jan 24, 2021 8:22 pm
android_version: 13 - Android 13

Re: Possible to re-run save file conversion?

Post by Einsame Hirte »

Okay, I figured out the problem, I think. I'll describe it here in case anyone else stumbles across this thread with an similar issue. It appears that for the conversion to work, the 0.8.1 version of the app must be UPDATED from the 0.7.13.2 (or previous) version - the previous version should NOT be uninstalled prior to installing 0.8.1.

I believe this is because when it is updated, it inherits the previous versions' permission to access the /sdcard directory, which allows it to copy the files from there to the new location in the app data directory. The 0.8.1 version does not ask for this permission itself, so on a clean install it silently ignores the previous save files. The first time, when it worked for me, I'd done an update without thinking about it, then did an uninstall and reinstall, which removed the permissions.

So, to to import old Andor's Trail save files from /sdcard/andors-trail on newer versions of Android (11 and 13 tested), this worked for me:
  1. Uninstall any version of Andor's Trail. If prompted, do NOT preserve existing app data when asked (don't check the box) Yes, any saved games from new versions of AT will be lost, but it won't touch the files under /sdcard/andors-trail (the ones you're trying to import). You can't merge two sets of files using this method.
  2. If not already present, use adb or a file manager tool place the preserved andors-trail directory under /sdcard (this is your main storage directory, with directories like Downloads, Documents, DCIM, and Android in it).
  3. Install Andor's Trail 0.7.13.2.
  4. Launch this version of Andor's Trail. When asked for permission to access media files, grant it, then close the app.
  5. Without uninstalling the old version, install the desired version (0.8.1 as of now). This will update the app but preserve the permission granted to the previous version.
  6. Launch Andor's Trail again. A "Data Migration" popup should appear. Click OK, and you're done! Your save files should be available under the "Load" button.
  7. To avoid confusion, you may wish to remove the /sdcard/andors-trail directory (after backing it up somewhere). This will no longer be updated by the game with new save files, and seems to be ignored by the game after being converted once.
The new game save files are under /sdcard/Android/data/com.gpl.rpg.AndorsTrail/files/andors-trail, which is no longer accessible by Android file manager tools under Android 13+. You can, however, access them in debugging mode using adb (this is not the same as root access).

I use the following command to back up my saves:

Code: Select all

adb pull /sdcard/Android/data/com.gpl.rpg.AndorsTrail/files/andors-trail
A good guide to setting up adb is at https://www.xda-developers.com/install- ... cos-linux/. Note that while you could also use adb to push the files directly to the new savegame folder and avoid the above steps, the permissions need to be set correctly using adb shell, or strange problems may result (e.g., not being able to save new games or worldmap files.) This is probably best avoided.

Devs, please correct anything I'm wrong about. So far it's solved my problem, but I may have made some bad assumptions; if so, I'll correct them in an edit. Is this the entire issue with the Play Store? Apps are not even allowed to ASK for permission to access /sdcard? Would it be 'legal' to request at least read-only access to the old directory, so that old files could be imported without this version-change trick?
User avatar
Nut
Posts: 1094
Joined: Mon Oct 27, 2014 12:14 pm
android_version: 8.0
Location: Glade

Re: Possible to re-run save file conversion?

Post by Nut »

I am not sure about the permissions, it got a bit tricky lately.
But I may spoil a bit: We are working on an export/import function for the next release
Nut
_____
Moppl *, Conina Lvl 46, Lara: Lvl 49, Anwyn: Lvl 52, Nut: Lvl 61
Lam al Adie
Posts: 74
Joined: Mon Jan 18, 2021 4:14 pm
android_version: 11 - Android 11
Location: gargoylecave

Re: Possible to re-run save file conversion?

Post by Lam al Adie »

Nut wrote: Fri Sep 30, 2022 9:56 am I am not sure about the permissions, it got a bit tricky lately.
But I may spoil a bit: We are working on an export/import function for the next release
Yes!!! I was silently hoping for something like that. Especially considering directory-issues with the newest android versions.
Thanks a lot.
Lam 'al Adie (pd)
Lvl:68 XP: 5728519 AP: 12/3 HP: 204 AC: 228 AD: 43-55 BC: 164 DR: 7
Skills: WA: 1 Do: 4 CS: 2 IF: 4 Ev: 2 Reg: 1 WP:1S: 1 AP:S: 1 FS:WS: 2 S:WS: 1
ROLS: 1 GoLF: 1
Post Reply