This is a script to pull OsmAnd maps files in batch from OsmAnd's Local Indexes List. You can then copy these from the downloaded location into the directory on your mobile device(s). Allowing you to only download the maps once for multiple devices versus on each device every update. When I go on road trips, camping, hiking; I'll typically have a backup device in water resistant bag with OsmAnd for offline maps. This allows me to update both devices once.
I was able to vibe code, test, and deploy this in an afternoon with duckai using GPT-5 mini and VS Code for an editor.
This uses BeautifulSoup4 and regular expressions to grab relevant zip files, downloads them, and then extracts them to a files folder. Since this uses regular expressions you can create a batch by providing it northamerica, europe, canada, us_, us_california, etc. A seperate file osmAndBatch.py for crafting your own list of specific maps is included. Progress bars for dowloading and extraction are implemented with tqdm. Functions without tqdm are left commented out, but uncommenting these and updating the calls to point to them will allow you turn off the progress bar visualization .
This only pulls down the obf zip files and does not get the srtm files which give the topographical data. You will still need to manually download and manually run updates for these from within the app on each device.
To get going with this do the following in order. Notes for both linux and windows are shown. This was tested on a windows 11 machine with python 3.14 and an andorid phone.
-
Setup your virtual envrionment:
- Windows ->
python -m venv .venv - Linux ->
python -m venv .venvor possiblypython3 -m venv .venv
- Windows ->
-
Source the environment:
- Windows ->
.\\.venv\Scripts\activate- Note you may need set execution policy by running
Set-ExecutionPolicy Unrestricted -Scope Process
- Note you may need set execution policy by running
- Linux ->
source .venv/bin/activate
- Windows ->
-
Install python packages:
- Both ->
pip install -r requirements.txt
- Both ->
-
Run from command line and grab a small state to test:
- Windows ->
python .\osmAnd.py us_rhode - Linux ->
python osmAnd2.py us_rhode
- Windows ->
-
For an android phone you will need to paste the contents of the created files folder to
Android\data\net.osmand.plus\fileseither on the internal memory or sd card depending on which you use.