Android device connection via USB

Technical issues/questions of an intermediate or advanced nature.
rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

Android device connection via USB

Post#1 by rych » 18 Jun 2019, 08:38

Can't connect my Samsung Galaxy A3 2017 to Porteus 4.0: no new disk in the SpaceFM, and a long error message on the smartphone saying
Attention The connected device is unable to access data on this device ...
and so on mentioning Android File Transfer for Mac OS X. There is a Android File Transfer for Linux -- "reliable MTP client with minimalistic UI similar to Android File Transfer for Mac." https://github.com/whoozle/android-file-transfer-linux On that page there is also an interesting remark:
Samsung removed android extensions from MTP, so fuse will be available readonly, sorry.
Actually, I remember it used to just work (?) on previous versions of Android and/or Porteus? With all the libmtp, gvfs included already; or is there something missing? Or indeed Samsung (?) has broken the Android-MTP link?! Hope someone has it working and could teach me how, please.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Android device connection via USB

Post#2 by ncmprhnsbl » 18 Jun 2019, 13:02

it may be possible with spacefm (provided samsung android plays nice)
see: toolbar>devices>settings>protocol handlers>mtp
it's script is set up for jmtpfs, simple-mtpfs, mtpfs, or go-mtpfs but i don't see why gvfs couldn't be made to work(don't know how tho)
i'd try xfce and check if thunar works ootb before messing about too much with spacefm.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

Android device connection via USB

Post#3 by rych » 19 Jun 2019, 09:02

Thanks, ncmprhnsbl. SpaceFM indeed has an interesting script in >devices>settings>protocol handlers>mtp with the following comment:
"To mount mtp:// you must install jmtpfs, simple-mtpfs, mtpfs, or go-mtpfs, or add a custom protocol handler."
Perhaps I should try to install one of the "jmtpfs, simple-mtpfs, mtpfs, or go-mtpfs" because it seems my system as it is can't talk to Android. I seems to have gvfs, but it's not picking it up. I used to have something mounted automatically in

Code: Select all

/tmp/xdg-runtime-root/gvfs
when my old Samsung S5 was connected (to my old Porteus 3.2.2 LXDE) --- now that directory is empty.

The question is should I install "jmtpfs, simple-mtpfs, mtpfs, or go-mtpfs" and which one?

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Android device connection via USB

Post#4 by ncmprhnsbl » 19 Jun 2019, 13:13

jmtpfs-0.5-x86_64-1.txz is in slackware current, would be the first to try.
then/or mtpfs-1.1-x86_64-2_slonly.txz
rych wrote:
19 Jun 2019, 09:02
when my old Samsung S5 was connected (to my old Porteus 3.2.2 LXDE) --- now that directory is empty.
most likely pcmanfm would use gvfs automaticly..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

Android device connection via USB

Post#5 by rych » 24 Jun 2019, 08:45

I've installed those two packages. SpaceFM didn't pick it up when I plugged the phone. So I tried to do something manually:

Code: Select all

root@porteus:~# mkdir /mnt/A
root@porteus:~# jmtpfs /mnt/A
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
At this stage I was asked for additional permission on the phone screen and then could access the Phone and its SD card even in SpaceFM but only for a short period of time, less than a minute. Then it seems to disconnect by itself, the phone displays the same full-screen message as in the OP and I get this on command line:

Code: Select all

root@porteus:~# cd /mnt/A
root@porteus:/mnt/A# ls -la
/bin/ls: cannot open directory '.': Input/output error
root@porteus:/mnt/A# 
How do I keep it awake now? Or am I mounting it wrong?

I'd like to ask also if anyone with an android phone could please plug it and tell what happens on your Porteus 4.0? I can't believe it's not plug-n-play already in 2019.

User avatar
omero
White ninja
White ninja
Posts: 23
Joined: 31 Aug 2019, 10:49
Distribution: omerux-4v

Android device connection via USB

Post#6 by omero » 16 Sep 2019, 01:12

I was interested in this topic,
rych wrote:
24 Jun 2019, 08:45
I'd like to ask also if anyone with an android phone could please plug it and tell what happens on your Porteus 4.0? I can't believe it's not plug-n-play already in 2019.


I just grabbed an USB cable and plugged phone into my freshly installed Porteus-4.0 system...
I did not install anything special, just plugged my android phone device via the USB cable.
I see a new device (android phone) and I can exploreit with Thunar.
Not sure what I am seeing though... Or doing.

I unmounted the android device (via Thunar GUI) and will refrain doing anything else.
Seems that Porteus-4.0 is Plug-n-Play in 2019 :fine:

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

Android device connection via USB

Post#7 by M. Eerie » 18 Sep 2019, 08:51

From my observations, the lack of connectivity, is often due to a defective cable or to a USB port that does not have enough amperage to activate the connection.
Assuming that the mobile has USB debugging unlocked and (preferably) the File Transfer protocol activated on the mobile itself, a phone-shaped icon should appear on the side panel of Thunar / SpaceFM / PcmanFM. Clicking on it, you should see 2 folders, one for the internal storage of the phone, and another for the SD card (should it be present).

Sample

However, I have 2 phones of the same model. One allows the connection and the other does not (on the same PC) :unknown:

Cheers!
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

Post Reply