Reply
Thread Tools
Posts: 702 | Thanked: 2,059 times | Joined on Feb 2011 @ UK
#1
This got a bit heated in the Jolla User Experience Thread and frankly I don't care about the politics of who broke what and why. I want to concentrate on finding a solution to file transfers over USB on a Mac to a Jolla using MTP.

Google's Android File Transfer program is built on an old version of libmtp so I dug about to see if I could find a later version.

I couldn't get the libmtp sources to compile from http://libmtp.sourceforge.net but using homebrew I got a later version installed.

1) Install Homebrew from http://brew.sh

2) brew install libmtp

Code:
==> Installing libmtp dependency: libusb
==> Downloading http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libusb/1.0.9
==> make install
/usr/local/Cellar/libusb/1.0.9: 11 files, 412K, built in 11 seconds
==> Installing libmtp dependency: libusb-compat
==> Downloading http://downloads.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-0.1.4/libusb-compat-0.1.4.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libusb-compat/0.1.4
==> make install
/usr/local/Cellar/libusb-compat/0.1.4: 12 files, 132K, built in 8 seconds
==> Installing libmtp dependency: libgpg-error
==> Downloading ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libgpg-error/1.10
==> make install
/usr/local/Cellar/libgpg-error/1.10: 15 files, 248K, built in 10 seconds
==> Installing libmtp dependency: libgcrypt
==> Downloading ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.bz2
######################################################################## 100.0%
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file cipher/rijndael.c
==> ./configure --prefix=/usr/local/Cellar/libgcrypt/1.5.0 --disable-asm --with-gpg-error-prefix=/usr/local
==> make CFLAGS= -std=gnu89 -fheinous-gnu-extensions
==> make check
==> make install
/usr/local/Cellar/libgcrypt/1.5.0: 14 files, 1.2M, built in 73 seconds
==> Installing libmtp
==> Downloading http://sourceforge.net/projects/libmtp/files/libmtp/1.1.4/libmtp-1.1.4.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libmtp/1.1.4
==> make install
/usr/local/Cellar/libmtp/1.1.4: 26 files, 1.1M, built in 17 seconds
Next I tried simple-mtpfs which runs MTP over a FUSE filesystem.

https://github.com/phatina/simple-mtpfs

Again, couldn't get it to compile on a Mac but looking through the comments there's been recent activity on getting it to work for the Mac.

Does anyone who knows there way around Mac development better than me have time to try and get these running?


Lastly, I also tried a commercial application called SyncMate which worked with my Nexus 7 but absolutely nothing from my Jolla.

http://www.sync-mac.com

I plugged my Nexus 7 in and it popped up in syncmate as an mtp device. The Jolla doesn't show anything in SyncMate's log.
 

The Following 5 Users Say Thank You to aegis For This Useful Post:
Miharin's Avatar
Posts: 72 | Thanked: 75 times | Joined on Nov 2013 @ Finland
#2
It was maybe a week ago when I was trying to compile that simple-mtpfs as well, and nobody from the forum could help me or they missed my posts, but I had one Linux friend who helped me a bit but I got stuck because apparently there isn't a version of FUSE that is high enough for Mac.
__________________
Jolla want list: disabling vibrate from Facebook messages
 
Posts: 14 | Thanked: 7 times | Joined on Nov 2009 @ Vantaa / Helsinki / Finland
#3
There are couple of packages in the repositories that, atleast in theory, sound promising:

Available usb-moded-acm-mode-android-0.76.3-1.3.1.armv7hl USB mode controller - android acm mode config
Available usb-moded-defaults-0.76.3-1.3.1.armv7hl USB mode controller - default configuration
Available usb-moded-defaults-android-0.76.3-1.3.1.armv7hl USB mode controller - default configuration
Available usb-moded-mass-storage-mode-0.76.3-1.3.1.armv7hl USB mode controller - mass-storage mode config
Available usb-moded-mtp-mode-0.76.3-1.3.1.armv7hl USB mode controller - mtp mode config
Available usb-moded-mtp-mode-android-0.76.3-1.3.1.armv7hl USB mode controller - android mtp mode config
Available usb-moded-settings-sailfish-0.3.14-10.26.1.jolla.noarch USB mode configuration for Sailfish

I dont have have time right now to take a look what these do or even if they work but i'll get back to the thread if i find something ..
 
Posts: 9 | Thanked: 30 times | Joined on Dec 2013
#4
I tried the usb-moded-mass-storage-mode-0.76.3-1.3.1.armv7hl.
It added that option to the settings menu, and the corresponding usb-moded config file. However it didn't contain any mount point or the like.. So i messed around a bit and added the lines from my N9. Changed the homedir obviously for alt-mount.. and checked that the other parth that was referenced exists. But it didn't work anyway. So i am starting think it takes something more than configuration.. at least by a layman like myself.
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#5
For USB mass storage, the filesystem must be unmounted from the phone to make it accessible to the computer. You cannot unmount something that is not a partition of its own, or is in use, like the home directory.
Therefore, USB mass storage cannot work. It's a stupid solution of the past.
With luck, you could get your SD card exported, but that's it.
__________________
Tidings - RSS and Podcast aggregator for Jolla - https://github.com/pycage/tidings
Cargo Dock - file/cloud manager for Jolla - https://github.com/pycage/cargodock
 

The Following User Says Thank You to pycage For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#6
Originally Posted by pycage View Post
For USB mass storage, the filesystem must be unmounted from the phone to make it accessible to the computer. You cannot unmount something that is not a partition of its own, or is in use, like the home directory.
Therefore, USB mass storage cannot work. It's a stupid solution of the past.
With luck, you could get your SD card exported, but that's it.
And not only that, as it works on the block layer, it enforces what filesystem can be used on the volume exported by mass storage.

So for example if you format the volume with EXT4 (so that you can have 4GB+ files, symlinks & file permissions) and the computer you connect your device to does not understand EXT4, it will not work even if the mass storage procedure works fine.

In the end, this basically forces you to use FAT32 (<4GB files, no symlinks, no file permissions, issues with many small files) for the mass-storage exported volume, as that's basically the only filesystem supported on Linux, Windows and MacOS.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 
Posts: 14 | Thanked: 7 times | Joined on Nov 2009 @ Vantaa / Helsinki / Finland
#7
Originally Posted by pycage View Post
With luck, you could get your SD card exported, but that's it.
That would all i need. As currently none of of the libmtp based apps on osx do not seem to even recognize Sailfish at all (except dropbox but thats not really helpful)
 
Posts: 9 | Thanked: 30 times | Joined on Dec 2013
#8
Thanks for connecting the dots pycage!
@MartinK: So the N9 has FAT32? That's crazy!

Oh well, yet another reason to make the switch to Linux.
 
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#9
Originally Posted by attah View Post
Thanks for connecting the dots pycage!
@MartinK: So the N9 has FAT32? That's crazy!

Oh well, yet another reason to make the switch to Linux.
Yep, it has a few GB (2-4?) EXT formatted program partition and the rest is FAT32 formatted, so it can be exported by mass-storage.

So like this, if you install a lot of stuff or store a lot of data on the "program" partition, you will not be able to install more applications, even if the FAT32 partition is still half empty.

Works also the other way around - if you run out of space on the FAT32 partition, I think you would not be able to take more photos for example.

This is another advantage of unified filesystem - you can install apps, take photos, etc. until you run out of ALL available space.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 
Posts: 189 | Thanked: 143 times | Joined on Nov 2009
#10
Got MTP to work @OSX.

bash-3.2$ mtp-detect
libmtp version: 1.1.6

Listing raw device(s)
Device 0 (VID=2931 and PID=0a01) is a Jolla Sailfish.
Found 1 device(s):
Jolla: Sailfish (2931:0a01) @ bus 29, dev 7
Attempting to connect device(s)

PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): Operation timed out
outep: usb_get_endpoint_status(): Operation timed out
Error 2: PTP Layer error 02fe: get_all_metadata_fast(): could not get proplist of all objects.
Error 2: Error 02fe: PTP: Protocol error, data expected
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
USB low-level info:
bcdUSB: 512
bDeviceClass: 0
bDeviceSubClass: 0
bDeviceProtocol: 0
idVendor: 2931
idProduct: 0a01
IN endpoint maxpacket: 512 bytes
OUT endpoint maxpacket: 512 bytes
Raw device info:
Bus location: 29
Device number: 7
Device entry info:
Vendor: Jolla
Vendor id: 0x2931
Product: Sailfish
Vendor id: 0x0a01
Device flags: 0x00000000
Device info:
Manufacturer: Jolla
Model: armv7hl
Device version: xxxxxxxxxx
Serial number: xxxxxxxxxxxxxxxxx
Vendor extension ID: 0x00000006
Vendor extension description: microsoft.com:1.0; microsoft.com/WMPPD:11.0;
Detected object size: 64 bits
Extensions:
microsoft.com: 1.0
microsoft.com/WMPPD: 11.0
Supported operations:
1001: get device info
1002: Open session
1003: Close session
1004: Get storage IDs
1005: Get storage info
 

The Following User Says Thank You to MaemoUser For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:26.