Get photos off your Android phone with GPhoto2

Being an ardent Linux user, I researched how I could get photos off my Galaxy SII. This is not possible with MSD (mass storage device) mode which implies a FAT file system and also implies exclusive access to the file system (but your phone doesn’t stop running when you plug it in). You have to use the PTP (photo transfer protocol) or MTP (media transfer protocol). And you can script this access with Gphoto2.

To detect the device, start with: gphoto2 --auto-detect

To list all your folders and files: gphoto2 -L You will find this far too much to look through.

So, time for grep: gphoto2 -L | fgrep ' folder ' And this will list your folders. You are looking for things like ‘DCIM’ and ‘Camera’ likely.

You will also have multiple storage areas, like your USB storage, and your micro SD card. Sort that out with:
gphoto2 -L | grep folder | awk -F/ '{print $2}' | sort | uniq and I found I had these two storage devices:


Another good search of folders with DCIM gave me these folders:


Alternatively, you can find items in other folders, like all movies:
gphoto2 -L -f/store_00020002/ | egrep -ie 'mov|vid|wmv|mp4|mkv$'

And I hope you find this useful!

I absolutely loved this view. I got this with a 300mm lens, 1/250@f/5, Pentax K10D, and a monopod. This did not start out as an HDR image; I got a lot more contrast into the mountains using Gimp. And that is what I wanted. I’m learning that an Overlay layer works really well for a ND filter.


(Original size of this picture was 10500×1280. This is the first time I actually ran my workstation out of memory while using Gimp, even. I was using over 3.6G ram on this picture, and I should have had much more available but I’m running a development version of Gimp.)

I have never seen such amazing cloudscapes except in Skagit county. And luckily, even if they are not just quite as vivid as what I cook up, they offer me the inspiration of pre-visualisation.


Another note I must add is that Hugin is now easier than ever to use. I really appreciate Hugin and every time it becomes easier to use — and this time I added a 1.66 bracketed stack of exposures — it did wonderfully. I added essentially a 4-stop ND gradient (mutiply) on this sky to get the sky and ground about equal in Gimp.