(solved) Re: can I access SD card in cell phone?
Thanks!
I will do some research on MTP later on.
--------------------------------------------
On Fri, 9/25/15, David Christensen <dpchrist@holgerdanske.com> wrote:
Subject: Re: can I access SD card in cell phone?
To: debian-user@lists.debian.org
Date: Friday, September 25, 2015, 8:33 PM
I have a Samsung Galaxy Indulge (R910, Android
2.2.1) phone that
automagically mounts on
Wheezy Xfce when plugged in. Then metroPCS
upgraded their cellular network, dropped
support for that model, and I
needed a new
phone.
So,
I bought a Motorola Moto G (XT1045, Android 4.4.4) from
AT&T. When
I plugged it in to Wheezy
Xfce, nothing happened. After much STFW,
RTFM, etc., I learned that I needed to use
Media Transfer Protocol:
https://en.wikipedia.org/wiki/Media_Transfer_Protocol
This is
available via FUSE on Wheezy. I installed two Apt
packages:
jmtpfs
mtp-tools
created a mount directory:
$HOME/xt1045
added myself to the FUSE
group:
usermod -a -G fuse dpchrist
and figured out how to mount
and umount the phone. (I can't remember if
I needed to do anything on the phone, and I
don't see anything in the
settings now
that looks relevant.) I put the relevant commands (with
some simple checks) into a pair of shell
scripts. See the sample
console session
that follows.
David
2015-09-25 17:00:18 dpchrist@t2250 ~
$ ls -aF xt1045/
./ ../
2015-09-25 17:00:22 dpchrist@t2250 ~
$ mount | grep xt1045
2015-09-25 17:00:26 dpchrist@t2250 ~
$ cat camera-phone-scripts/mount-xt1045.sh
#!/bin/sh
mountpoint=/home/dpchrist/xt1045
if cat /proc/mounts | grep -q
"$mountpoint"
then
echo
"'$mountpoint' is already mounted"
>&2
exit 0
fi
echo jmtpfs
"$mountpoint"
jmtpfs
"$mountpoint"
2015-09-25 17:00:36 dpchrist@t2250 ~
$ camera-phone-scripts/mount-xt1045.sh
jmtpfs /home/dpchrist/xt1045
Device 0 (VID=22b8 and PID=2e82) is UNKNOWN.
Please report this VID/PID and the device model
to the libmtp
development team
Android device detected, assigning default bug
flags
2015-09-25 17:01:12
dpchrist@t2250 ~
$ ls -aF xt1045/
./ ../
Internal storage/ SD card/
2015-09-25 17:01:19 dpchrist@t2250 ~
$ mount | grep xt1045
jmtpfs on
/home/dpchrist/xt1045 type fuse.jmtpfs
(rw,nosuid,nodev,relatime,user_id=********,group_id=********)
2015-09-25 17:01:23 dpchrist@t2250 ~
$ cat camera-phone-scripts/umount-xt1045.sh
#!/bin/sh
mountpoint=/home/dpchrist/xt1045
if ! cat /proc/mounts | grep -q
"$mountpoint"
then
echo
"'$mountpoint' is not mounted"
>&2
exit 0
fi
echo fusermount -u
"$mountpoint"
fusermount
-u "$mountpoint"
2015-09-25 17:01:35 dpchrist@t2250 ~
$ camera-phone-scripts/umount-xt1045.sh
fusermount -u /home/dpchrist/xt1045
2015-09-25 17:01:39 dpchrist@t2250 ~
$ ls -aF xt1045/
./ ../
2015-09-25 17:01:45 dpchrist@t2250 ~
$ mount | grep xt1045
Reply to: