mtppics: a script for copying pictures off of Android phones

Way back in the old days, Android phones could be mounted like any other FAT-32 device (think thumb drives) on a Linux computer. Life was good. Somewhere along the line, Google changed this so the phones are instead exposed at Media Transport Protocol (MTP) devices. In some ways, this is an improvement. For one, the “USB mass storage” option required exclusive access; you could access files on your phone from your computer or from your phone, but not both.

However, using KDE’s Dolphin file browser was often an exercise in futility. File transfers would almost always fail, and maybe if you disconnected and reconnected the phone, it would work better. Or maybe it wouldn’t. As it turns out, this appears to mostly be a Samsung problem and is WONTFIX’ed by KDE developers.

I initially worked around this problem by writing a quick script that mounted the phone to a known location using simple-mtpfs, a FUSE driver for MTP. This allowed the contents of the phone to appear as a normal filesystem; my wife and I could copy pictures off with Dolphin or any other tool we wanted.

This worked pretty well, until it didn’t. I’m not sure why, or when exactly, but at some point it had stopped working. It mounted okay, but using Dolphin to access the files still crashed the MTP stack. I normally use the terminal to do the file copy anyway, so it didn’t bother me, but my wife is much more GUI-oriented.

So a few nights ago, I sat down to come up with another option. The real goal was just to be able to copy pictures from the phone to our file server, not to browse around arbitrarily. This meant that I could go for an automated solution. Initially, I thought it would be best to use MTP directly, but that turned out not to be a good idea. The PyMTP library provides a good interface to MTP, but it turns out the files are exposed as a single set of objects, not a hierarchy.

So I could have continued with that route, but it would have resulted in me basically writing my own FUSE driver, so I decided that was not how I wanted to spend the rest of the evening (and many of the next evenings). In the interests of having something usable, I continued to use simple-mtpfs, but I put all of the heavy lifting into the script.

The result is mtppics, which will copy pictures from a directory on the phone to a local directory. With a little bit of trickery and the date command, you can handle a variety of date-based target directories. It’s still very much designed for how my wife and I have our pictures archived, but I’m open to making it more flexible. I’ve tried to make it fairly robust to failure (I even used a trap statement!), but there are probably opportunities for improvement there, too. Give it a try if it would be of use to you and let me know how to improve it (or submit a patch, if you’re into that sort of thing).

The first few weeks with the N900, part 2

This is part 2 of my review of the N900.  Part 1 includes “Unboxing”, “The screen”, “Connectivity”, “Web browsing”, and “The camera and other multimedia goodness.”  Part 2 includes “E-mail, calendar, contacts, and instant messaging”, “Other applications”, and “The phone.” Continue reading

The first few weeks with the N900, part 1

Three months to the day after I first wrote about the N900, Nokia’s newest smartphone ended up on my desk.  Since I’ve talked so much about it on Twitter (and since I had to lobby my wife aggressively to let me buy it), I think I owe the world my review.  I get the feeling that this review will end up focusing on a lot of the negatives, but don’t misunderstand me: I really like this phone.  The N900 is great phone with a lot of potential, but it is currently an early-adopter’s phone.  I’m generally not one to play the early adopter game, but this time around I couldn’t help myself. Continue reading

I may have found my next phone

I fully expect to be in the smartphone market in the not-so-distant future.  My BlackBerry 8700c has served most admirably these past few years, including untold drops onto various surfaces and a 9-hour nap in a snow bank.  Despite it’s faithfulness, it is not the phone it once was.  Aside from some cosmetic problems, it has a tendency to freeze up every so often, which requires me to remove the battery to shut it off.  Not to mention the lack of 3G capability.  That really hurts.

I’ve been eyeing the iPhone since it first came out, and the more I learned about the phone itself, the more I like it (especially the 3G S).  Unfortunately, the more I learn about the way Apple and AT&T rule the network, the more repulsed I am.  That, among other considerations, is a big reason why I still have yet to let the BlackBerry go.  Still, when I look at the features that I want out of a smartphone, the iPhone fares the best.  Until now.

There has been quite the buzz (or at least mild hum) on the Internets since did a preview of the Nokia N900.  Holy crap, this looks like my kind of phone.  From a hardware standpoint, it seems more like the G1, which is a solid-feeling phone.  What really sets it apart is the software side.  The phone runs Maemo, a Debian-derived Linux distro designed for mobiles and tablets.  My knowledge of Maemo is still pretty sketchy, but from the Slashdot discussion I’ve gathered that it is a full-featured Linux distro, capable of running just about anything you want.   Has freedom finally come to the cell phone market?

At the moment, it appears that most of the discussion on the Internet begins with the Mobile-review article, any other details are hard to find.  One site did suggest that it might be available in the US in September, and since Nokia World is scheduled for Sept 2-3, that’s not unreasonable.  The list price is supposed to be $780 (which compares well to the iPhone 3G S list price) and I expect the carrier (likely T-Mobile) will offer some nice subsidizing.

So for now I will wait and see what develops.  It looks like a great phone, the real deciding factors for me will be the release date, the price and the carrier.  For all the bad things that I’ve noted about AT&T, they’ve been my wireless carrier since back in the Cingular days and I’ve never had any problems.  Plus, they offer a discount because of my employer, which is always a nice incentive.  Will I end up switching carriers so that I can get the N900?  Will the price be such that I can just buy it and bring it onto my existing AT&T account?  Will I chicken out and just try to do everything on my Samsung Sync?  I guess we’ll find out soon.