You are not logged in.

#1 2017-12-15 13:20:17

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,861

Mounting/Sharing files with Andriod device

My wife's phone is Android 5.  How can I transfer files from there to the computer and back again?

Have looked at mtp-tools another cryptic program with a man page as helpful as teats on a bull.

MTP-TOOLS(1)                                    [FIXME: manual]                                    MTP-TOOLS(1)



NAME
       mtp-tools - tools for communicating with Media Transfer Protocol (MTP) devices

SYNOPSIS
       mtp-albumart [args]

       mtp-albums

       mtp-connect [args]

       mtp-delfile [args]

       mtp-detect

       mtp-emptyfolders

       mtp-files

       mtp-filetree

       mtp-folders

       mtp-format

       mtp-getfile [args]

       mtp-getplaylist [args]

       mtp-hotplug [args]

       mtp-newfolder [args]

       mtp-newplaylist [args]

       mtp-playlists

       mtp-sendfile [args]

       mtp-sendtr [args]

       mtp-thumb [args]

       mtp-tracks

       mtp-trexist [args]

DESCRIPTION
       This manual page documents briefly the commands distributed with the libmtp package, collectively called
       mtp-tools.

       This manual page was written for the Debian distribution because the original programs do not have
       manual pages. Concise synopsis can be obtained by giving -h to the commands.

SEE ALSO
       http://libmtp.sourceforge.net

AUTHOR
       This manual page was written by Rafael Laboissiere <rafael@debian.org> for the Debian system (but may be
       used by others). Permission is granted to copy, distribute and/or modify this document under the terms
       of the GNU General Public License, Version 2 any later version published by the Free Software
       Foundation.

       On Debian systems, the complete text of the GNU General Public License can be found in
       /usr/share/common-licenses/GPL.

AUTHOR
       Rafael Laboissiere
           Author.

COPYRIGHT
       Copyright © 2007 Rafael Laboissiere



[FIXME: source]                                    2007-02-01                                      MTP-TOOLS(1)

Any help helping me help my wife would be appreciated.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#2 2017-12-15 17:15:06

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,605

Re: Mounting/Sharing files with Andriod device

The MTP comfort varies wildly by desktop environment. On KDE and GNOME, the MTP stuff is handled behind the scenes for you when you connect via USB, this works for me. I never managed to use a separate MTP tool/FUSE file system (mtpfs) reliably…

As a note: The fastest way is unfortunately (short of swapping memory cards between computer and device) to use adb (Android Debugging Bridge). You need to enable developer mode on the phone, launch adb, and then you can just cp/mv from the adb shell as you're used to. This does not have the overhead MTP does (is fast). There are also FUSE file systems based on adb, see this repo and the list of programs in the README: https://github.com/google/adb-sync.

The simplest way is KDE Konnect + Dolphin, it's what I use. Phone and computer need to be on the same network). Install the KDEConnect app on the phone (fdroid or Playstore), on the computer install the kdeconnect daemon and the Dolphin file manager. Open kdeconnect on the computer and pair the devices. Then, you need to add kdeconnect as an autostart daemon, and whenever your devices see each other, in KDE file managers (KIO slave, sorry, no alternative), the phone appears as a device you can mount, copy to and from. The protocol is neither ADB nor MTP but quite fast as well (still slower than the direct ADB method).


The show must go on.

Offline

#3 2017-12-15 17:20:33

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,861

Re: Mounting/Sharing files with Andriod device

Hmmm using Debian with openbox ... no ked no arch.

Guess it's going to be a tough ride with BL.  sad


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#4 2017-12-15 17:28:16

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,605

Re: Mounting/Sharing files with Andriod device

Sector11 wrote:

Hmmm using Debian with openbox ... no ked no arch.

Guess it's going to be a tough ride with BL.  sad

Try the ADB tools in the link above. Simplest way, I think.


The show must go on.

Offline

#5 2017-12-15 17:36:46

unklar
Member
Registered: 2015-10-31
Posts: 1,026

Re: Mounting/Sharing files with Andriod device

Hello, my friend,  smile
yes, with kde would be the solution, but you don't...

What I found in a hurry:

apt-cache policy go-mtpfs
go-mtpfs:
  Installiert:           (keine)
  Installationskandidat: 0.0~git20150917.0.bc7c0f7-1+b2
  Versionstabelle:
     0.0~git20150917.0.bc7c0f7-1+b2 500
        500 http://httpredir.debian.org/debian unstable/main i386 Packages
aptitude show go-mtpfs
Paket: go-mtpfs                                 
Version: 0.0~git20150917.0.bc7c0f7-1+b2
Zustand: nicht installiert
Priorität: optional
Bereich: devel
Verwalter: Julian Gilbey <jdg@debian.org>
Architektur: i386
Unkomprimierte Größe: 2.635 k
Hängt ab von: libc6 (>= 2.3.6-6~), libusb-1.0-0 (>= 2:1.0.9)
Beschreibung: Mount MTP devices over FUSE
 Go-mtpfs is a simple FUSE filesystem for mounting Android devices as an MTP
 device. 
 
 It will expose all storage areas of a device in the mount, and only reads file
 metadata as needed, making it mount quickly. It uses Android extensions to
 read/write partial data, so manipulating large files requires no extra space in
 /tmp.
Homepage: https://github.com/hanwen/go-mtpfs

should be good, because faster and more stable than mtpfs (unfortunately only in unstable?)


If you do have to access mtpfs, a current german manual and the translator (better than google)
https://linuxwelt.blogspot.de/2015/10/a … linux.html
https://www.deepl.com/translator

https://linuxundich.de/android/mit-go-m … zugreifen/

Last edited by unklar (2017-12-15 18:05:29)

Offline

#6 2017-12-15 18:09:25

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,861

Re: Mounting/Sharing files with Andriod device

Arch no thanks.  And of course no it SID to..

Please close this.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#7 2017-12-15 18:27:24

unklar
Member
Registered: 2015-10-31
Posts: 1,026

Re: Mounting/Sharing files with Andriod device

2017-12-15-19-24-16_scrot.th.png

Offline

#8 2017-12-15 22:55:16

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Mounting/Sharing files with Andriod device

Sector11 wrote:

Please close this

No! tongue

I am getting a new Android (8) phone tomorrow and I know that won't work with BL/thunar/gvfs so I'm going to install https://f-droid.org/en/ (in the phone) and use that to get https://f-droid.org/packages/be.ppareit.swiftp_free/

I will post again after I have actually tried it but it should be as simple as starting the application on your phone then navigating to it in thunar (via the "Network" icon, or whatever it is).

I'll be back neutral


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#9 2017-12-16 02:40:00

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Mounting/Sharing files with Andriod device

For sharing files it's an easy way to use a cloud storage like Nextcloud, Owncloud or Seafile (Syncthing offers free storage - obviously it only works if there is internet available). It's good to have the content encrypted with something like cryptomator.

Last edited by martix (2017-12-16 02:49:02)

Offline

#10 2017-12-16 20:28:15

tynman
Member
Registered: 2015-10-13
Posts: 87

Re: Mounting/Sharing files with Andriod device

I've never found a solution to this, i.e. connecting between a Linux computer and my Android phone (Samsung Galaxy S7 - Android 7.0). Until today. When I saw unklar's suggestion above to use go-mtpfs, I checked it out. It is mentioned in the Arch wiki (https://wiki.archlinux.org/index.php/MTP#go-mtpfs) . I have tried a few of the methods discussed in that wiki, but I had overlooked go-mtpfs - maybe the name was too dorky for me.

I tried go-mtpfs today, and it worked good to update ("sync") my phone with music mp3 files. My PC is running Debian Stretch with Openbox - not BunsenLabs, but close smile.

# apt install go-mtpfs
# mkdir /mnt/phone
# chown root:staff /mnt/phone
# chmod 775 /mnt/phone
> go-mtpfs -android /mnt/phone

Popup Message on phone: “Allow Access to Device Data” – Reply “Allow”

> go-mtpfs -android /mnt/phone
2017/12/16 12:48:46 FUSE mounted

Terminal will now be blocked until the go-mtpfs program completes.
Open a second “terminal”

> cd /001/music/mp3
> rsync -vah --progress --no-perms --inplace --ignore-existing --delete-after . /mnt/phone/Card/Music/mp3/
> fusermount -u /mnt/phone

The fusermount command causes the go-mtpfs command to end (and unmounts the phone). The original terminal will un-block.

Offline

#11 2017-12-16 20:48:34

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,168

Re: Mounting/Sharing files with Andriod device

@S11 - is spaceFM still in the repos? I never had an issue with it to get photos and other files off our Android phones; it just worked. I actually kept it installed just to get pictures off my phone.


You must unlearn what you have learned.
    -- yoda

Offline

#12 2017-12-17 01:25:20

qcgxr
Member
Registered: 2016-08-31
Posts: 28

Re: Mounting/Sharing files with Andriod device

Syncthing works well on Android. No server needed. Just syncs to the desktop client (or wherever else you've installed it). Also Syncopoli is essentially rsync for Android. Both are on F-droid. If neither of those work, adb, as others have suggested, works well enough.

Offline

#13 2017-12-17 08:45:29

ohnonot
...again
Registered: 2015-09-29
Posts: 4,305
Website

Re: Mounting/Sharing files with Andriod device

Sector11 wrote:

Arch no thanks.  And of course no it SID to..

Please close this.

don't get frustrated!
i will add my 5ct regardless...

if 'adb' is in your PATH, enter this in a terminal:

adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
XXXXXXXXXXXXXXXX    device

the last line is the most important, it shows that the system can SEE your device.
with that working, you are 90% there!

you can use the adb command as previously described, copy, move , even un/install software etc.
or get a shell with 'adb shell'.

if youi want a graphical filemanager go here: https://github.com/sole/aafm
and download or clone the repo.
now i THINK it's enough to simply execute ./aafm in the current directory, or then maybe you should use the setup.py script; maybe like this:

python2 setup.py install --optimize=1

Last edited by ohnonot (2017-12-17 08:46:09)

Offline

#14 2017-12-17 08:57:32

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: Mounting/Sharing files with Andriod device

Me-->> takes external sd mem card out of phone, inserts into computer with a fancy usb3.0 card adapter/reader, does transfer inbound or outbound --> Complete.

That is how i do it, i have a 32 GB card that has most photos, video etc on that and hardly any on the internal phone device itself.

Offline

#15 2017-12-17 18:01:40

ututo
Member
Registered: 2015-09-29
Posts: 277

Re: Mounting/Sharing files with Andriod device

Me-->> using BL Hydrogen with openbox + KDEConnect + Device with Android v5.0.1

Screenshot---12172017---013808-PM.th.png

  1. Installed kdeconnect app via google play store

  2. Installed kdeconnect... (with a lot of kde dependencies, yeah...)

  3. Installed indicator-kdeconnect... (and some extra dependencies)

  4. Then added this to my autostart

    ## KDE Servicies
    (sleep 5; kdeinit4) &
    
    ## KDE Connect
    (sleep 6; qdbus org.kde.kded /kded loadModule kdeconnect) &
    (sleep 7; kbuildsycoca4 -noincremental) &
    (sleep 10; indicator-kdeconnect --gapplication-service) &
  5. And last but not least...I added this custom action to pcmanfm

    [Desktop Entry]
    Type=Action
    Name=KDEconnect Send To
    Icon=kdeconnect
    Profiles=profile-zero;
    
    [X-Action-Profile profile-zero]
    Exec=kdeconnect-send %f
    Name=KDEconnect Send To

    in ~/.local/share/file-manager/actions

kdepcman.th.png

I hope these links could help you
indicator-kdeconnect
LIGNUX - Instalando KDEConnect en Debian XFCE

The downside:

  • the amount of dependencies

  • it doesn't have all the features you find in KDEConnect +KDE environment+Dolphin+applets

  • i can't find a way to customize the indicator-kdeconnect icon in the tint2 systray, so you see a black spot in the first screenshot (actually, it is a black phone icon)

Last edited by ututo (2017-12-17 18:07:26)


BunsenLabs on deviantArt
Don't touch my git!

Offline

#16 2017-12-17 18:18:20

ututo
Member
Registered: 2015-09-29
Posts: 277

Re: Mounting/Sharing files with Andriod device

...and this is my Plan B:

pen-drive-kingston-micro-duo-16gb-otg-usb-smartphone-tablet-1456.jpg

a microduo flash-drive with both connectors


BunsenLabs on deviantArt
Don't touch my git!

Offline

#17 2017-12-18 11:28:37

unklar
Member
Registered: 2015-10-31
Posts: 1,026

Re: Mounting/Sharing files with Andriod device

^ tynman

do you know termux ?

termux-setup-storage

Code  smile

Offline

#18 2017-12-19 06:14:12

ohnonot
...again
Registered: 2015-09-29
Posts: 4,305
Website

Re: Mounting/Sharing files with Andriod device

unklar wrote:

^ tynman

do you know termux ?

termux-setup-storage

Code  smile

wow!
didn't know this existed.
installing it right now.

Offline

#19 2017-12-19 16:42:10

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,605

Re: Mounting/Sharing files with Andriod device

@ututo quality post. The list of KDE services is worth documenting.


The show must go on.

Offline

#20 2017-12-21 08:44:12

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Mounting/Sharing files with Andriod device

Head_on_a_Stick wrote:

I'll be back neutral

Sorry for the delay, Amazon shafted me hmm

Anyway, I've now got my Android 8 device and my "quick-fix" fileshare solution is to install Google's GDrive on the phone and use that along with the web client in my other systems; this allows me to share files across Android, Linux, OpenBSD and Windows, all without having to find the correct cable.

This is lame (obviously) so I will be investigating a better solution when I have time.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#21 2017-12-21 09:33:07

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,991
Website

Re: Mounting/Sharing files with Andriod device

1. Cable way

My very old post http://paste.debian.net/plain/1001786

Mostly about:
- Use jmtpfs,
- Use correct cable (that the usb cable you are using is one that is used for transferring data and not just one for charging the device! Some cheap tablets and mobiles for instance only have a charging cable! To the uninitiated, they both look the same!)

2. Use something that can connect to ssh on android (The easy way). EZ commander is what I think I used.

Last edited by brontosaurusrex (2017-12-21 09:59:42)

Offline

#22 2017-12-22 03:16:09

garnet&gold
Member
Registered: 2017-12-22
Posts: 10

Re: Mounting/Sharing files with Andriod device

the android device should connect without issue.  You may need to toggle "usb debugging" under developer options in the phone's settings.  If developer options is not displayed under settings/system, then go to settings/system/about phone/ scroll to the bottom of the display, click on "build number" 7 times, a pop up will tell you developer options is active, go back one screen and select it, then scroll down to toggle usb debugging.  When you connect your phone by usb you will have to slide down the notification shade on the phone, about midway down the shade, you will see "Android system - USB Charging this device" click on it, one of the options on the pop up will be transfer files.  When you are done transferring what you want unmount thephone in thunar and unplug.

Offline

#23 2017-12-22 12:50:55

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Mounting/Sharing files with Andriod device

See D219's post here for a udev-based solution that should work with BL-H:

https://forums.bunsenlabs.org/viewtopic … 614#p65614


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#24 2017-12-23 05:09:37

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Mounting/Sharing files with Andriod device

Abstained from this cause don't really know all that much about Android, started to get really into, lost interest for awhile and haven't resumed as of yet. Though have used enough, connected enough of the suckers and mtp never gave any trouble. Mostly was always as simple as making sure the right settings for it were clicked on the mobile device, plugging it in with usb cord, firing up x-file-manager for easy copy or cut/paste.

Provided a few packages are installed on your OS, should pop right up for you. Do know Android is ridiculous in all it can do, pretty much an app for everything in it. Including no doubt many the file server someone can setup on the phone, even if you strictly want to restrict it to opensource F-droid or whichever, am sure there's still plenty of app-age readily available. Though see no reason mtp shouldn't work out fine.

Ps, yep ... should've kept the trap shut, my gnu/Nixy goodness atm doesn't recognize either android phone ! Arghhh, oh well. May or not bother figuring it out.

PS2, ok got it, not really sure what to suggest though Sector, I was missing both gvfs-backends and gvfs-fuse too and wound up installing a bit of this and that. Phone's worked out-of-box on the Hydrogen-hybrid install but mucho was upgraded on that sucker when the dist-upgrade was done and none of these are Android v 5, not that I can see how that should matter with mtp. In any event just keep chipping at it, just too many ways for gnu/Linux and Android to play nice together, has to be plenty of good solutions for this. Alrighty ... shutting it.

Last edited by BLizgreat! (2017-12-23 07:26:01)

Offline

#25 2017-12-23 07:49:14

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: Mounting/Sharing files with Andriod device

More babble, fired up the live Hydrogen thumbdrive. The latest version of Android I have 4.4.4 Kitkat phone, worked ootb but noticed a couple packages missing while poking around in live session which may be relevant (or not), one being the gvfs-backends another libmtp-runtime, part of the output of "apt-cache show libmtp-runtime" describes it as doing this

This package provides mtp-probe, a program to probe newly connected
device interfaces from userspace to determine if they are MTP devices,
used for udev rules.

Which this mtp-probe sounds possibly useful in getting that Android device to popup in thunar if it's not/won't. I also did install mtp-tools if it's not already installed on your OS, I assume it has been and part of the this/that I installed also were the following two.

ii  go-mtpfs                                     0.0~git20150917.0.bc7c0f7-1+b2    i386         Mount MTP devices over FUSE
ii  jmtpfs                                       0.5-2+b2                          i386         FUSE based filesystem for accessing MTP devices

Forgot to check if they were installed on the Hydrogen iso or not. Well I tried hope this helps ... cause yeah, it's aggravating when someone plugs in an Android phone and the sucker doesn't automatically show up in Thunar's side pane ! Arghhh.

PS AGAIN. big_smile ... Newer version of this libmtp-runtime thing in jessie-backports (from Hydrogen live session once more.)

apt-cache policy libmtp-runtime
libmtp-runtime:
  Installed: (none)
  Candidate: 1.1.8-1+b1
  Version table:
     1.1.12-1~bpo8+1 0
        100 http://ftp.debian.org/debian/ jessie-backports/main i386 Packages
     1.1.8-1+b1 0
        500 http://deb.debian.org/debian/ jessie/main i386 Packages

So personally if were running BL-Hydrogen and having mtp/Android issues would definitely opt for installing the sucker from there. "sudo apt-get install -t jessie-backports libmtp-runtime". Likely other relevant packages from backports too, if any upgrades are available in those repo's. Still not really seeing why something such as mtp should be overly problematic tho.

Last edited by BLizgreat! (2017-12-23 08:22:10)

Offline

Board footer

Powered by FluxBB