There are two players in the modern smartphone arena as I see it. Apple and Samsung. I’d like to say Apple IOS and Google Android but it’s really only the very top end Android handsets that can honesty compete with the bespoke slickness of Apple’s IOS for one very good reason – the consistent hardware platform underneath IOS makes it easier for Apple to “get it right”.
I don’t buy into Apple’s walled garden because I choose to operate my devices one layer down from the top Application layer whenever possible. By that I mean that I use the command line in preference to an over simplified or over complicated and wholly unnecessary graphical user interfaces, and not for some kind of geek badge of honour but purely for speed of results. In fact the only gui I can’t live without is a decent file manager such as KDE’s Dolphin. I say can’t live without. I could live without it actually. Hmm.
Anyway, the reason for this post is to provide an answer to the one annoying feature of Samsungs Android phones when connecting them to a PC running Linux via the USB cable. I don’t expect it of Apple, but I do expect it of Samsung and that is automatic mounting of the internal storage devices using standard protocols. Android is Linux, Linux is Linux. When I plug in my Note 3, I absolutely do not expect to be given a choice of presenting the storage via Microsofts MTP protocol or as a camera whereby only jpg files show up. Grrrr. That really grips my, well you can see why right? Just mount the damn thing like a USB storage device for goodness sake! Microsoft protocols have absolutely no place here.
The open source community has already come to the rescue with the requisite packages to mount an MTP device into the Linux filesystem – mtpfs and mtp-tools. It’s a little bit back to front but it gets the job done without having to mess about with the phone’s functionality.
1. Install mtp filesystem support and tools using the commands numbered 39 through 43 in my history shown below…
2. Connect the phone via the usb cable and run mtp-detect
3. Write a udev rule to handle mounting of the phone’s specific MTP device automatically when connected via USB in future.
4. Relax and enjoy automatic mounting of the phones MTP device as if it were mounting the internal storage as a regular USB storage device!
Use the VID and PID (Vendor and Product ID) to construct the udev rule /etc/udev/rules.d/51-android.rules as shown below, then restart udev.