1 |
On Tue, 18 Sep 2012 20:54:44 +0100, Neil Bothwick wrote: |
2 |
|
3 |
> > Anyway, it's all usable but a bit clumsy. Is there a sensible way I |
4 |
> > can have the device recognized and mounted via rules in fstab? (Or any |
5 |
> > other fixed file?) |
6 |
> |
7 |
> You could have your udev rule RUN mtpfs to mount the device. It takes a |
8 |
> few seconds to mount it, so I'd run it with &. |
9 |
|
10 |
I've had a play with this and got it working for my Nexus7. The udev rule |
11 |
has to go in a high-numbered file, because libmtp adds its own rules |
12 |
|
13 |
% cat /etc/udev/rules.d/99-android-mtp.rules |
14 |
ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", RUN="/home/nelz/bin/mountnexus.sh &" |
15 |
|
16 |
|
17 |
% cat /home/nelz/bin/mountnexus.sh |
18 |
#!/bin/sh |
19 |
logger "Nexus connected" |
20 |
mkdir -p /media/nexus7 |
21 |
jmtpfs -o allow_other /media/nexus7 |
22 |
logger "Nexus mounted" |
23 |
|
24 |
You need to enable allow_other in /etc/fuse.conf. |
25 |
|
26 |
|
27 |
-- |
28 |
Neil Bothwick |
29 |
|
30 |
Oops. My brain just hit a bad sector. |