This command transfers the favourites from OSMand to the PC:

$ adb pull storage/sdcard0/Android/data/net.osmand.plus/files/favourites.gpx

That much works as far as making a backup copy. But then I wanted to expand descriptions so that e.g. restaurants would have a detailed description of the food. The favourites.gpx file has MSDOS carriage returns, so I piped it through dos2unix and edited in emacs. Then I ran the file through unix2dos before pushing it back to the device while OSMand was not running:

$ adb push favourites.gpx storage/sdcard0/Android/data/net.osmand.plus/files/

Most of my edits were to simply add a descrption with the <desc> tag. Some of my changes involved color modifications to the icons by simply changing the hex inside the tags like this:

<wpt …
    <extensions>
      <osmand:color>#10c0f0</osmand:color>
    </extensions>
  </wpt>

None of my description changes had any affect. OSMand remembered the previous favourites. This means there is an update anomaly in the design of OSMand because there are multiple copies of the same data running around. Strangely, some of my color changes took effect and some did not. The inconsistency is disturbing.

Apart from altering favourites.gpx, there is a dodgy import feature. If I re-import a favourites.gpx file after updating it, would OSMand be smart enough to apply the changes without creating duplicate favourites? If so, what is used as the primary key? The coordinates?

Anyway, it’s dodgy as hell. I started to go through the import process. Tapped the “+” icon. It asked: “Complete action using: Aria2App or Documents”? Aria2App is some broken shit that I installed, so i chose “documents”. Then it gives a choice of these directories: Recent, Images, Videos, Audio, Downloads”. That’s it. None of this makes sense. This limited selection of file locations are not places where I would put a GPX file.

Theoretically, the GPX file could be staged in Videos just to do this import, but I struggle to trust it.

(edit) I think the primary key is the name of the favourite. In one case I altered the name of the waypoint and I ended up with two favourites for the same location. Apparently when the name of an updated favourite does not change, OSMand just tosses out the updated record and keeps the old. I also noticed that when using the app to create a new favourite with the same name as another, the app appends “(1)” forcefully.