Installing mapillary_tools on an Android device

I couldn’t find ANY guide for installing mapillary_tools on an Android device. So I took several hours of trial and error to figure it out myself! You can install mapillary_tools on an Android device without rooting it. Here was my process:

Start by downloading Termux, a good command line program for Android.

Then, install mapillary_tools according to Linux custom installation instructions on the mapillary_tools readme (mapillary_tools/README.md at main · mapillary/mapillary_tools · GitHub). However, because Python 2 is no longer supported, the “pip” command seen in the readme will not work.

Use the command…

pkg install python2

…to install the necessary version of Python. Then follow instructions as-is, but replace instances of “pip install” with “python2 -m pip install”

Not sure, but I imagine these exact same steps may be needed on any version of Linux, now that Python 2 isn’t supported.

Finally, on Termux, you must run the command “termux-setup-storage” to access the device’s internal storage.

As a non-programmer with a fleeting familiarity with Linux command line, this took me a while to figure out. I hope this helps someone!

2 Likes

Update: So far, mapillary_tools has worked very well on my phone! Much faster and better than the website upload. I’m impressed enough that I’m getting an inexpensive 360° camera!

I don’t have a Windows or Apple device, so this is the best alternative I can find for uploading wide-angle images on an Android.

mapillary_tools has been updated. I haven’t found a method to get versions of mapillary_tools 0.6.0 and up installed on Android / Termux.

If someone finds a way to install the latest mapillary_tools on an Android without rooting, please reply here or message me.

Older versions of mapillary_tools just freeze up when I try to use them.

Well, I found out how to install mapillary_tools on Android!

Again.

On Termux, instructions to do an install from scratch look like this:

pkg install python git build-essential libgeos openssl libjpeg-turbo

and

pip install --upgrade pip wheel

to install required libraries and programs.

pip install --upgrade git+https://github.com/mapillary/mapillary_tools

to install mapillary_tools. And

termux-setup-storage

to access shared internal storage.

Also, on devices running Android 11, mapillary_tools will run slowly if it must access shared internal storage. Thus, I suggest moving images to Termux’s native directory before running mapillary_tools. For example, if you store your imagery in the folder “Internal storage/DCIM/Trip1” you’d use a command like

mv -v storage/dcim/Trip1 Trip1

to move folder Trip1 and it’s contents to Termux.

I’ve already used mapillary_tools in Termux to upload thousands of images recently, and it’s worked very well for me.

3 Likes