Samsung Galaxy S3 with Fedora

The new Android phones no longer work as USB mass storage devices, and instead use MTP. Not that I really know what this is, or its advantages over the previous system.

Fortunately a very helpful blog post at http://tacticalvim.wordpress.com/2012/12/08/mounting-nexus-4-via-mtp-in-fedora-17/ guided me most of the way (the nexus 4 and galaxy S3 are very similar)
I had to make a couple of changes as the device ids were different, but it’s essentially the same instructions so have a look there first

Firstly install simple-mtpfs:

sudo yum -y install fuse fuse-libs libmtp simple-mtpfs

Check it’s worked with:

ls -l /dev/libmtp*

Which should return a link between libmtp and somewhere in bus/usb. Then create /etc/udev/rules.d/99-galaxyS3.rules, with the following content:

ACTION!="add", GOTO="galaxyS3_rules_end"
ENV{MAJOR}!="?*", GOTO="galaxyS3_rules_end"
SUBSYSTEM=="usb", GOTO="galaxyS3_usb_rules"
GOTO="galaxyS3_rules_end"

LABEL="galaxyS3_usb_rules"

# Galaxy SIII I-9300
ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

LABEL="galaxyS3_rules_end"

Get the correct idVendor (VID) and idProduct (PID) by running simple-mtpfs -l

You can then set commands to mount and unmount by adding the following to your /.bashrc, where ~/mnt/galaxyS3 is the directory your phone’s storage will be mounted to:

alias S3mount="simple-mtpfs ~/mnt/galaxyS3"
alias S3umount="fusermount -u ~/mnt/galaxyS3"

The commands on the right of course can be used to mount and unmount

You’ll need to reboot to get it to work. I had to unplug and plug the phone too. troyengel reports on his tacticalvim blog that he had to run the S3mount command 2-3 times to get it to work

If you’re having trouble I’d recommend looking at the simple-mtpfs documentation

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s