Linux-Based Photographic Workflow on Android with Termux

Dmitri Popov
Oct 14, 2016 · 3 min read

The title is a bit of a mouthful, but the basic idea is pretty simple; Instead of schlepping around a Linux machine, you can transform an Android device into a lightweight Linux-based platform for organizing, processing, and backing up photos and RAW files when you are on the move. The key ingredient of this solution is the Termux, a small open source app that combines a terminal emulator and a lightweight Linux environment. The app comes with its own software repository that has all the tools you need to set up a simplified photographic workflow. The Linux Photography book explains exactly how to can go about it, but here are a few pointers to get started.

First of all, make sure that your Android device supports USB OTG functionality, so you can move photos and RAW files from a storage card to the Android device. Many camera models nowadays support transfer via Wi-Fi or Bluetooth. But going this route means installing proprietary apps on your device, which defeats the purpose of setting up a photographic workflow based on open source Linux tools. Besides that, transferring large files via a wireless link can be excruciatingly slow. And these companion apps usually can’t handle RAW files. In short, USB OTG provides the most efficient and fast way to move files from your camera to the Android device.

To transfer files via USB, you also need a USB OTG cable and a card reader. Both can be bought cheaply from Amazon or eBay, or any decent electronics store.

To offload photos and RAW files from the storage card to the Android device, install rsync in Termux. Transferring files then is a matter of running the appropriate rsync command. You can also use the Bash shell import script described in the book for more advanced importing operations (you might need to tweak the script to make it work in Termux, though). rsync can also be used to back up the transferred photos and RAW files to a remote Linux machine.

In case you want to organize and rename your photos, jhead can help you with that. Among other things, this tool makes it possible to rename imported files using EXIF metadata. For more advanced operations involving photographic metadata, you might want to use ExifTool. It’s not available in Termux repository, but you can easily compile and install it from source.

If you need to convert RAW files to the JPEG format, Termux repository provides tools for that, too. Install the dcraw, netpbm and imagemagick packages in Termux, and you can use a few simple commands to convert one or multiple RAW files to whatever format you need, including JPEG.

Want to apply color adjustments like color presets and effects to the imported photos? Create Hald CLUT presets as described in the book, and use the imagemagick in Termux to apply presets to one or more photos.

Finally, if you would like to generate static gallery directly on your Android device, Expose is your best friend. This Bash shell script can produce rather impressive photo galleries with a minimum of effort.


I write about Linux and Open Source for a living. I’m an amateur photographer, and I use Linux as my photography platform. I’m the author of the Linux Photography book on setting up an automated and streamlined photographic workflow on Linux.

Dmitri Popov
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade