[Android General] GalaxyA325G:
Many people install apps on the internal storage where those apps have large amounts of data that most people wish to store on the external sdcard, but on Android 11, Google changed the associated external sdcard storage access APIs available to app developers.

This change has caused problems for users of a variety of tools such as OsmAnd~, Total Commander, MapFactor Navigator, HereWeGo Maps, etc., where I just went through the process and want to document it so that others can follow the steps more easily than it took me to figure it out just now.

What I'll do below is document with detailed screenshots the steps I used to migrate the OsmAnd~ map data from non-rooted Android 12 internal storage (where map data is stored by default) to the external sdcard storage.

These are the basic steps as documented in the OsmAnd FAQ.

Go to Settings (on the start screen) --> OsmAnd Settings --> Data storage folder

Change the value to a path pointing to the external SD card, on many Android systems it may contain /storage/extSdCard or similar.

Please note that some versions of Android strictly limit your choice of which path will be write-accessible for apps.

You are then asked if the contents of the OsmAnd data folder should be moved from internal memory to the external SD card.

You may also perform this manually using a built-in file manager app on the device, or via connecting the device to a computer as external storage and performing the move from there.

Following _those_ directions, it seemed to work fine to move my OsmAnd~ 313.26MB of data storage from my internal sdcard to my external sdcard.

OLD: External storage 1

/storage/emulated/0/Android/data/net.osmand.plus/files

NEW: External storage 2

/storage/0000-0001/Android/data/net.osmand.plus/files

Here are the screenshots of that migration process:

First I updated OsmAnd~ to 4.1.11

Then I checked the OsmAnd~ Data storage folder settings

I then migrated the data using the OsmAnd~ Move to ext sdcard command

This moved the internal map data to the external sdcard

I doublechecked using the X-plore file manager

Which showed a path of /storage/0000-0001/Android/data/net.osmand.plus/files

Which were also mounted over Wi-Fi onto the Windows 10 PC as a drive letter

Showing that the files were successfully migrated to the external sdcard

And which Windows adb clearly shows over Wi-Fi using "shell" commands

The Windows drive letter which is the entire Android 12 sdcard, was mounted

over Wi-Fi using the native Windows 10 "NET USE" command, as follows:

C:\> net use Z: \\192.168.1.10@8080\DavWWWRoot /USER:foobar snafu

Where "foobar" is an arbitrary username set up for read/write in the WebDav server running on Android, and "snafu" is the arbitrary password for it.​

Note: The Android 12 phone doesn't have any login account whatsoever & the Windows 10 PC has a username that is different, & which has no password.​

The Windows adb commands I just now used for that screenshot were these:

1. This shows the Android phone is connected over Wi-Fi via tcp.

C:\> adb devices

adb-serialnumber._adb-tls-connect._tcp. device​

2. This shows Windows adb can read the internal Android storage over Wi-Fi.

C:\> adb shell ls /storage/emulated/0/Android/data/net.osmand.plus

cache​

files​

C:\> adb shell ls /storage/emulated/0/Android/data/net.osmand.plus/files

tiles​

tracks​

3. This shows Windows adb can read the external Android storage over Wi-Fi.

C:\> adb shell ls /storage/0000-0001/Android/data/net.osmand.plus/files

Us_california_san-francisco_northamerica.obf​

World_basemap_mini.obf​

backup​

favourites.gpx​

fonts​

ind.cache​

itinerary.gpx​

regions.ocbf​

rendering​

roads​

routing​

sounds​

tiles​

tracks​

travel​

voice​

In summary, the screenshots I created show the process graphically that I followed just now with the FOSS OsmAnd~ app to recover from the changes Google made in Android 11 and up to the storage model for apps saving data onto the external sdcard. As far as I know, the recovery process for similar apps should use similar steps.

Please let me know if you need more information about how this was done as I'm trying to help others by documenting these steps.

Note:

The phone is an unrooted Android 12 Samsung Galaxy A32-5G with both an internal storage card /storage/emulated/0 and an external storage card /storage/0000-0001 (where the external sdcard was formatted with that easy-to-remember 0000-0001 identifier years ago using a Windows PC).