I recently purchased an S4. I wanted to mount it on my Fedora 19 machine so that I browse and transfer files from Dolphin.
For those not aware, USB Mass Storage mode has been removed as a connection option on several new Android devices. It has been replaced my a new protocol called MTP which has many advantages over USM, including concurrent access by both the device and the client and transcending the FAT32 limitations inherent in USM.
It turns out that Linux (Fedora at least) supports MTP and accessing an Android device via MTP from Linux (Fedora) is straightforward and efficient.
Here are the steps to do so.
1) Download and install phoneutil.apk for your device. I have an S4, so the file is here.
http://downloadandroidrom.com/file/a.../phoneutil.apk
2) Dial *#7284# to start the application. Select PDA mode, not modem. Set the USB mode to MTP.
Note. Phones may be set to MTP mode from the "factory". I had to do this because I was debugging things on my phone and had the mode set to ADB.
3) Check that at least 1 MTP client is installed on your Linux box.
$ yum list \*mtp\*
Loaded plugins: langpacks, refresh-packagekit
Installed Packages
gvfs-mtp.x86_64 1.16.3-2.fc19 @Updates
kio_mtp.x86_64 0.75-2.20130323gitcc6b195.fc19 installed
libmtp.x86_64 1.1.6-0.fc19 installed
simple-mtpfs.x86_64 0.1-6.fc19 @fedora
If you don't have one, install one.
4) Connect the phone to the machine with a USB cable. Dmesg should show something like this.
[73006.912779] usb 2-1.1: USB disconnect, device number 9
[73190.694369] usb 2-1.1: new high-speed USB device number 10 using ehci-pci
[73190.782053] usb 2-1.1: New USB device found, idVendor=04e8, idProduct=6860
[73190.782059] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[73190.782063] usb 2-1.1: Product: SAMSUNG_Android
[73190.782065] usb 2-1.1: Manufacturer: SAMSUNG
[73190.782067] usb 2-1.1: SerialNumber: xxxxxxx
If you have a client that responds to the USB plug in event, you may get a pop up on your desktop. I run KDE and in Fedora 19 (and 18 IIRC), kio-mtp intercepts and the notifier asks me if I want to use Digikam or Dolphin to open the device.
If such a process automatically connects your phone to the machine, then proceed to use it. Note, that although I can open my phone in Dolphin via kio-mtp, the process is not a robust one. It will display the S4 file structure correctly but anything other than simple open or move operation throw errors.
5) Luckily most linux distributions now ship with a tool called simple mtpfs.
Install it.
#yum install simple-mtpfs.
Check for attached mtp devices.
$ simple-mtpfs -l
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
1: SamsungGalaxy models (MTP)
Read the simple-mtpfs help
$simple-mtpfs -h
Mount the device
$simple-mtpfs ./S4
Use the new mountpoint.
$cd S4
$ ls
Alarms Android data Documents INDI Music Notifications Pictures Podcasts samsungapps SMemo
AllsharePlayLog Application DCIM Download Movies Nearby obb Playlists Ringtones ShareShot
FWIW, I did not have to enable USB debugging in developer options to use MTP.
It turns out that file operations in Dolphin work much, much better by opening the simple-mtpfs mounted directory (in this case S4) than relying on kio-mtp. I get no errors on any operations working with the mounted directory in a shell or with Dolphin.
Hope this helps.


Reply With Quote
