Hi all,
Are there any known tricks for auto-mounting an MTP device? I think
this stuff is used on some newer Android phone so I'm hoping someone
has a nice solution.
My wife decided to buy the new Kindle Fire HD based on our good
experience with the original Kindle Fire. The new device is very nice
- faster, nicer screen, better networking, etc. - but no longer
presents itself as a USB Mass Storage device like my older Kindle
Fire. Rather it uses Media Transfer Protocol. (MTP) I've managed to
get it mounted using a package from the poly-c overlay called jmtpfs.
Info is located here:
I've copied some movies over and they play fine on the new device
but it's all by-hand manual mounting, etc. When the device is plugged
in I get this sort of info in dmesg:
[15720.370654] usb 2-2: new high-speed USB device number 4 using ehci_hcd
[15720.490935] usb 2-2: New USB device found, idVendor=1949, idProduct=0007
[15720.490940] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[15720.490944] usb 2-2: Product: Kindle
[15720.490947] usb 2-2: Manufacturer: Amazon
[15720.490949] usb 2-2: SerialNumber: REMOVED
and based on one post I read for Ubuntu (or maybe Arch - I don't
remember) I've created this udev rule:
Anyway, it's all usable but a bit clumsy. Is there a sensible way I
can have the device recognized and mounted via rules in fstab? (Or any
other fixed file?)
Thanks,
Mark
09-18-2012, 07:54 PM
Neil Bothwick
MTP auto-mount? (Kindle Fire HD)
On Tue, 18 Sep 2012 10:37:57 -0700, Mark Knecht wrote:
> mark@c2stable ~ $ cat /etc/udev/rules.d/51-android.rules
> UBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0007",
> MODE="0666" mark@c2stable ~ $
>
> Anyway, it's all usable but a bit clumsy. Is there a sensible way I
> can have the device recognized and mounted via rules in fstab? (Or any
> other fixed file?)
You could have your udev rule RUN mtpfs to mount the device. It takes a
few seconds to mount it, so I'd run it with &.
--
Neil Bothwick
Okay, who put a "stop payment" on my reality check?
09-18-2012, 10:01 PM
Mark Knecht
MTP auto-mount? (Kindle Fire HD)
On Tue, Sep 18, 2012 at 12:54 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Tue, 18 Sep 2012 10:37:57 -0700, Mark Knecht wrote:
>
>> mark@c2stable ~ $ cat /etc/udev/rules.d/51-android.rules
>> UBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0007",
>> MODE="0666" mark@c2stable ~ $
>>
>> Anyway, it's all usable but a bit clumsy. Is there a sensible way I
>> can have the device recognized and mounted via rules in fstab? (Or any
>> other fixed file?)
>
> You could have your udev rule RUN mtpfs to mount the device. It takes a
> few seconds to mount it, so I'd run it with &.
>
>
> --
> Neil Bothwick
>
> Okay, who put a "stop payment" on my reality check?
Seems like a reasonable enough solution for my needs.
Thanks,
Mark
09-18-2012, 10:23 PM
Grant Edwards
MTP auto-mount? (Kindle Fire HD)
On 2012-09-18, Mark Knecht <markknecht@gmail.com> wrote:
> On Tue, Sep 18, 2012 at 12:54 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
>> On Tue, 18 Sep 2012 10:37:57 -0700, Mark Knecht wrote:
>>
>>> mark@c2stable ~ $ cat /etc/udev/rules.d/51-android.rules
>>> UBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0007",
>>> MODE="0666" mark@c2stable ~ $
>>>
>>> Anyway, it's all usable but a bit clumsy. Is there a sensible way I
>>> can have the device recognized and mounted via rules in fstab? (Or any
>>> other fixed file?)
>>
>> You could have your udev rule RUN mtpfs to mount the device. It takes a
>> few seconds to mount it, so I'd run it with &.
> Seems like a reasonable enough solution for my needs.
Does jmtpfs seem to be working reliably?
I just ordered a Nexus Galaxy (which uses MTP), and Google has found
reports of flakey behavior with mtpfs. I've heard good things about
go-mtpfs (but you have to set up the Go compiler).
And there's also gmtp...
--
Grant Edwards grant.b.edwards Yow! Gee, I feel kind of
at LIGHT in the head now,
gmail.com knowing I can't make my
satellite dish PAYMENTS!
09-19-2012, 12:05 AM
Mark Knecht
MTP auto-mount? (Kindle Fire HD)
On Tue, Sep 18, 2012 at 3:23 PM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> On 2012-09-18, Mark Knecht <markknecht@gmail.com> wrote:
>> On Tue, Sep 18, 2012 at 12:54 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
>>> On Tue, 18 Sep 2012 10:37:57 -0700, Mark Knecht wrote:
>>>
>>>> mark@c2stable ~ $ cat /etc/udev/rules.d/51-android.rules
>>>> UBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0007",
>>>> MODE="0666" mark@c2stable ~ $
>>>>
>>>> Anyway, it's all usable but a bit clumsy. Is there a sensible way I
>>>> can have the device recognized and mounted via rules in fstab? (Or any
>>>> other fixed file?)
>>>
>>> You could have your udev rule RUN mtpfs to mount the device. It takes a
>>> few seconds to mount it, so I'd run it with &.
>
>> Seems like a reasonable enough solution for my needs.
>
> Does jmtpfs seem to be working reliably?
>
> I just ordered a Nexus Galaxy (which uses MTP), and Google has found
> reports of flakey behavior with mtpfs. I've heard good things about
> go-mtpfs (but you have to set up the Go compiler).
>
> And there's also gmtp...
>
> --
> Grant Edwards grant.b.edwards Yow! Gee, I feel kind of
> at LIGHT in the head now,
> gmail.com knowing I can't make my
> satellite dish PAYMENTS!
>
>
If mounting once and transferring 4GB of data in 6 files, unmounting
and then playing 5 minutes of video quaifies as reliable then yep,
it's reliable. ;-)
All I can say at this point is it seemed to work the way it was
advertised on the link in the first post. I'll post back over time as
I learn more. Possibly you an others who run into similar usage models
will too.
Cheers,
Mark
09-19-2012, 01:29 AM
Daniel Frey
MTP auto-mount? (Kindle Fire HD)
On 09/18/2012 10:37 AM, Mark Knecht wrote:
> Hi all,
> Are there any known tricks for auto-mounting an MTP device? I think
> this stuff is used on some newer Android phone so I'm hoping someone
> has a nice solution.
MTP is used on a quite a few newer Android devices, including my Nexus
7. I haven't found an automount solution yet, but it is possible to
create an fstab entry, though
>
> My wife decided to buy the new Kindle Fire HD based on our good
> experience with the original Kindle Fire. The new device is very nice
> - faster, nicer screen, better networking, etc. - but no longer
> presents itself as a USB Mass Storage device like my older Kindle
> Fire. Rather it uses Media Transfer Protocol. (MTP) I've managed to
> get it mounted using a package from the poly-c overlay called jmtpfs.
> Info is located here:
>
> http://research.jacquette.com/jmtpfs-exchanging-files-between-android-devices-and-linux/
>
> I've copied some movies over and they play fine on the new device
> but it's all by-hand manual mounting, etc. When the device is plugged
> in I get this sort of info in dmesg:
>
> [15720.370654] usb 2-2: new high-speed USB device number 4 using ehci_hcd
> [15720.490935] usb 2-2: New USB device found, idVendor=1949, idProduct=0007
> [15720.490940] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
> [15720.490944] usb 2-2: Product: Kindle
> [15720.490947] usb 2-2: Manufacturer: Amazon
> [15720.490949] usb 2-2: SerialNumber: REMOVED
>
> and based on one post I read for Ubuntu (or maybe Arch - I don't
> remember) I've created this udev rule:
>
> mark@c2stable ~ $ cat /etc/udev/rules.d/51-android.rules
> UBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0007", MODE="0666"
> mark@c2stable ~ $
I documented what I had to do to mount my Nexus 7 on the forums, under
my own Nexus 7 thread, although now that I think about it, I don't think
I put an fstab entry in it. I do have one in my /etc/fstab, though:
> Anyway, it's all usable but a bit clumsy. Is there a sensible way I
> can have the device recognized and mounted via rules in fstab? (Or any
> other fixed file?)
I haven't looked to see if there's a way to automount it yet though.
>
> Thanks,
> Mark
09-19-2012, 04:28 PM
Neil Bothwick
MTP auto-mount? (Kindle Fire HD)
On Tue, 18 Sep 2012 20:54:44 +0100, Neil Bothwick wrote:
> > Anyway, it's all usable but a bit clumsy. Is there a sensible way I
> > can have the device recognized and mounted via rules in fstab? (Or any
> > other fixed file?)
>
> You could have your udev rule RUN mtpfs to mount the device. It takes a
> few seconds to mount it, so I'd run it with &.
I've had a play with this and got it working for my Nexus7. The udev rule
has to go in a high-numbered file, because libmtp adds its own rules