Media Transfer Protocol MTP (SOLVED)

Using applications, configuring, problems
Message
Author
SnoopPup
Posts: 49
Joined: Wed 07 Jan 2015, 02:27

#226 Post by SnoopPup »

It's weird because my phone shows Serial# as 0000000000, which is usually the decimal of the 8 digit hex I think. I thought I needed the ESN to activate this phone, but now I can't even find it.

EDIT: Scratch that. GSM uses IMEI and CDMA uses ESN/MEID I guess.

SnoopPup
Posts: 49
Joined: Wed 07 Jan 2015, 02:27

#227 Post by SnoopPup »

So using lsusb I can duplicate the variance in Device ID by switching from PDA (e) to MODEM (d) which are options in Phone Utils (#*7284#).
Attachments
lsusb.png
(143.97 KiB) Downloaded 727 times

SnoopPup
Posts: 49
Joined: Wed 07 Jan 2015, 02:27

#228 Post by SnoopPup »

So I went back to Slacko 5.7 as it seemed like I made more progress there.

I can now proceed to where I get the screen reporting AndroidAndroid with the "d" Device ID variance. It appears that MTPdetect will only recognize the "d" which represents the MODEM setting as opposed to the "e" which represents PDA. lsusb will easily detect either setting, but MTPdetect only recognizes it as MODEM even though it can only detect phone when set as PDA, which should show an "e" at the end of the Device ID.
Still puzzled why the Device ID would not be constant, regardless of PDA/MODEM setting, but that appears to be the case.

So I think MTPdetect is seeing my phone as a MODEM with no files to be mounted.

Samsung has issues with this PDA/MODEM protocol or whatever it is. It is necessary in Samsung Kies to switch from PDA to MODEM and back to PDA to connect to KIES on this particular phone. Somebody randomly figured that out and it is on the net. It is also necessary for me to toggle this to shut off USB Mass Storage so that MTP will be active or dominant. There is very little info on net about PDA/MODEM, little that I could find anyway.

I also note that lsusb detects and reports either "download mode" for MODEM "d" setting or "debugging mode" for PDA "e" selection.

I'm starting to fully appreciate why OpenSource is vital. Samsung could open the books on the various bizarre stuff they do. Not a lot different between Samsung and Microsoft. Next phone will be as Open Source as possible and probably not a Samsung. Like all the code and protocols used and embedded in hardware should be free and open. Then 8)

Could still be the cable though, but I still doubt it. :shock:
Attachments
Screenshot_2015-01-11_001648.png
(160.01 KiB) Downloaded 711 times

SnoopPup
Posts: 49
Joined: Wed 07 Jan 2015, 02:27

#229 Post by SnoopPup »

ANd lsusb reports my phone differently in Slacko 5.7 compared to tahrpup, very differently. I don't even unplug phone, move or touch it, but the 2 versions reports are not nearly the same. Must be the kernel?

SnoopPup
Posts: 49
Joined: Wed 07 Jan 2015, 02:27

#230 Post by SnoopPup »

One more thing.

I noticed that 1 dependency is missing after installing MTPdetect -exper-noarch: qt. Jus the letters q and t. Not sure what that is or how to fix it or if it's a problem. That's in Slacko 5.7 with mtplib 1.0.3 utilities installed as well.

Back to tahrpup to see if it's the same...

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#231 Post by Karl Godt »

I could not get anything to work !

Android-4.2.2 Archos 79 Cobalt tablet .

What was wrong ?

go-mtpfs calls fusermount, which calls mount -f to expect returnvalue 0 from /bin/mount .

/bin/mount wrapper called mount-FULL $@ which always return non-zero ( wrong fs options or already mounted ) .

My own mount.sh hung while testing if directory exists .

BIG trouble was that /mnt was not accessible by ROX-Filer as long as fusermount stalled waiting for mount to finish .

What I did :
created a /bin/mountMTP.sh as :

Code: Select all

#!/bin/ash
exit 0
created a /bin/mountMTP as :

Code: Select all

#!/bin/ash


. /etc/rc.d/f4puppy5

_pidof go-mtpfs && _exit 3 "go-mtpfs already running -- use umountMTP"


test -L /bin/mount    || _exit 4 "/bin/mount needs to be a link"
test -e /bin/mountBAK || cp -a /bin/mount /bin/mountBAK

test -e /bin/mountMTP.sh || {
echo 'exit 0' >/bin/mountMTP.sh || _exit 41 "Could not create /bin/mountMTP.sh wrapper"
chmod $VERB +x /bin/mountMTP.sh || _exit 42 "Could not set /bin/mountMTP.sh executable"
}

OLD_MOUNT=`realpath /bin/mount`
# REM: Needs here in case of early exit
#      link /bin/mount does exit if fails
which go-mtpfs >>$OUT || _exit 6 "go-mtpfs not found in PATH"

ln $VERB -sf mountMTP.sh /bin/mount || _exit 5 "Could not create link /bin/mount -> mountMTP.sh"

MOUNT_POINT=/mntf/MTPdev
test -e "$MOUNT_POINT" || mkdir -p "$MOUNT_POINT"

GO_MTPFS_OPS=
go-mtpfs $GO_MTPFS_OPS "$MOUNT_POINT" &

sleep 5

ln $VERB -sf "$OLD_MOUNT" /bin/mount
_pidof go-mtpfs && exit 0 || exit 1

# TODO: Handle GetStorageInfo 10001: SessionNotOpen
#       app. when mtpdevice switches into lower-power-mode
created a /bin/umountMTP as :

Code: Select all

#!/bin/ash

. /etc/rc.d/f4puppy5

MOUNT_POINT=/mntf/MTPdev

grep -w "$MOUNT_POINT" /proc/mounts || _exit 3 "'$MOUNT_POINT' not mounted"

fusermount -uz "$MOUNT_POINT"
Note : mount -f is fake mount, so would not do anything . So exit 0 is all it needs .
Note : Since I had troubles with /mnt/ I use /mntf/ to be able to access /mnt/ if troubles with fuse arise .

Basically the mountMTP creates /bin/mount.sh and links and re-links /bin/mount to mount.sh and back to OLD_MOUNT .

Rename /bin/mount to /bin/mountORIG and link mountORIG to /bin/mount, before using the scripts .

fusermount is v2.7.0 and Puppies are 4.3 and 4.3.1 .

Note : libusb-1.0 is needed, had no luck with libusb-1.0.so.0.0.0 but with 1.0.so.0.1.0 .

Note : No udev rule needed ( calls pupcamera ) .
Note : dmesg is unreliable if polluted by buggy drivers ( mei.ko ) .
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

User avatar
michaellowe
Posts: 66
Joined: Sat 17 Dec 2011, 08:33
Location: The Garden

Media Transfer Protocol MTP (SOLVED)

#232 Post by michaellowe »

Hi can8v

Firstly thank you for creating this, mounted my rooted google nexus 5 phone (rooted with the hammerhead purity exploit form xda devs) just fine in lucid puppy 525 using the commands you specified:

cd /mnt
go-mtpfs MTPdevice

However when it came to copying files over to an external hdd I get this error

2015/07/16 11:08:31 Unimplemented opcode INTERRUPT
2015/07/16 11:08:31 writer: Write/Writev failed, err: 2=no such file or directory. opcode: INTERRUPT

the files that i copied over did actually copy but when I checked properties it shows size as 0
having said that after noticing the error message I went back to browse the rest of the contents of my phone and guess what the files I just tried to copy plus all my .apks are the only files showing up on the device every other directory showing up as "empty"

what is happening here? during the file copy process did the device unmout or something? strange that apks and the files I just tried to copy are the only ones showing up form a 16GB device

would love to know what is going on here as my excitement and joy at discovering a mounting solution for my android phone was very quickly dashed when this occurred :-( may have to just return to using the remote desktop solution seems quick enough if not faster?

Let me know what you think of this and if you require any other information thank you
M
Smash forehead on keyboard to continue.....
well thats at least how some of us deal with ba$h !

User avatar
michaellowe
Posts: 66
Joined: Sat 17 Dec 2011, 08:33
Location: The Garden

#233 Post by michaellowe »

SnoopPup wrote:One more thing.

I noticed that 1 dependency is missing after installing MTPdetect -exper-noarch: qt. Jus the letters q and t. Not sure what that is or how to fix it or if it's a problem. That's in Slacko 5.7 with mtplib 1.0.3 utilities installed as well.

Back to tahrpup to see if it's the same...
I may be wrong but as far as I recall qt "

is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) (in which cases Qt4 is classified as a widget toolkit), and also used for developing non-GUI programs such as command-line tools and consoles for servers. One of the major users of Qt is KDE4"

just use your ppm or whatever package manager you have to download a pet of qt or compile it from source, have often found that compiling is the most relaible way of building/installing things for my specific system that way I dont have to chase after missing deps and libs, i can compile them at the time.
It is quite complex but if you do it methodically it can be done and you have to excercise much patience! the wait is worth the reward.

just google qt source tarball.gz and you should get a download page on sourceforge or something?

extra reading: http://www.linuxfromscr ... x/qt4.html

the fact that there is qt5 can complicate things you have to somehow find out which one you need, again another reason to compile as the terminal will return error messages to help you configure things correctly for your system or kernel version. Good luck and I'm sorry I could not be more elaborate with my explanantion, perhaps one of the gurus here in puppy land could help further??? cheers
Smash forehead on keyboard to continue.....
well thats at least how some of us deal with ba$h !

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#234 Post by Semme »

Michael, seeing as the MTP cat hasn't posted in over a year, try one of the file explorer apps.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
michaellowe
Posts: 66
Joined: Sat 17 Dec 2011, 08:33
Location: The Garden

file explorer apps?

#235 Post by michaellowe »

Semme wrote:Michael, seeing as the MTP cat hasn't posted in over a year, try one of the file explorer apps.
Hi Semme thanks for reply, could you possibly name some good reliable examples of file explorer apps sutable for lucid puppy 525? my ppm is broken so Id like to just either download a source tarball or if you know of someone who has a repo somewhere online with pets or sfs?
Thanks in advance
Smash forehead on keyboard to continue.....
well thats at least how some of us deal with ba$h !

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#236 Post by Burn_IT »

I use XFE.SFS

and X-Plore under Android
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#237 Post by Semme »

Here's X-plore.

This one'll show you a lot too >> ES File Explorer.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#238 Post by Semme »

Hey Michael, wouldn't you like to fix that PPM of yours?

You running frugal or full install?

If full, you have the disk?
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#239 Post by greengeek »

Is there any way to add apps to Android other than going through the Google app store? I would rather have an offline "executable" or portable app.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#240 Post by Semme »

"Is there any way.." is surely a query deserving *IT'S OWN* new topic.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#241 Post by Burn_IT »

Indeed it is.
And yes there is.
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
michaellowe
Posts: 66
Joined: Sat 17 Dec 2011, 08:33
Location: The Garden

wouldnt you like to fix that PPM of yours?

#242 Post by michaellowe »

Semme wrote:Hey Michael, wouldn't you like to fix that PPM of yours?

You running frugal or full install?

If full, you have the disk?
frugal
Smash forehead on keyboard to continue.....
well thats at least how some of us deal with ba$h !

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#243 Post by Semme »

Then try this.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#244 Post by greengeek »

Semme wrote:"Is there any way.." is surely a query deserving *IT'S OWN* new topic.
Ok. New topic regarding "non-GooglePlayStore" methods for adding file explorers and other functionality to Android devices here

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#245 Post by nubc »

Can someone verify that go-mtpfs will work with Marshmallow? After mounting in Slacko 6.3.0, I do not see data.

Post Reply