LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   how to use mtpfs to transfer files to my android fone (https://www.linuxquestions.org/questions/slackware-14/how-to-use-mtpfs-to-transfer-files-to-my-android-fone-4175553736/)

nitecrawler 09-17-2015 02:57 AM

how to use mtpfs to transfer files to my android fone
 
i have installed mtpfs for transferring files to and from my android phone....
i also created the mount point as required.... /mnt/phone
i can see my files in the phone too but i am not able to copy files to my phone....

Code:

mtpfs /mnt/phone
mtpfs -o allow_other /mnt/phone
ls -lh /mnt/phone //lists the phone contents

now i tried doing cp of a song from my linux folder to the phone but it doesnt copy though the operation completes with no errors printed either...i run
Code:

cp -v file1.mp3 /mnt/phone/Phone\ Storage/mp3/
but the file is not copied....

nitecrawler 09-17-2015 03:01 AM

cool...i got the solution from this link:
as explained it says we need to go by file numbers to copy and not by file names in your phone....

Code:

mtp-folders // lists the files with numbers mapped to it for your phone
mtp-connect --sendfile file1.mp3 172 //172 was my mp3 folder in my phone

[COLOR="Silver"]

Mark Pettit 09-17-2015 01:05 PM

Hmmm - I battled with this stuff quite some time back. Nothing seemed to work, and the mtpfs libraries on Slack seemd to be out of date. Then I installed go-mtpfs. Problem solved. And you don't need to do weird things like my you describe above. Simple tools like MidnightCommander work perfectly fine.

Julius-Caesar 09-18-2015 12:59 PM

For me, the solution is to install an FTP server on my tablet:

FTP server

It is very easy to use and it is free software.

rkelsen 09-23-2015 07:11 PM

There are other ways which are better than MTP to transfer files to your phone.

If you're going to use a cable, you should set the phone up to present itself as a USB storage device. For reasons beyond my comprehension, this is not enabled by default in the latest versions of Android... but, fortunately, it is easy to find and change this setting.

Otherwise, +1 to what Julius-Caesar said. Hail Caesar! Install an FTP server app on your phone/tablet and copy whatever you like between devices wirelessly. My preferred app is: primitive ftpd. I've had better results with it than most others, and, despite it's name, it has some fairly advanced security features. Hint: Under Linux, I use gFTP as a client, since it is either pre-installed or easily available for most distros. If you have to use Windows, get FileZilla.

play4 09-23-2015 08:30 PM

I like btsync. You can sync your devices over a local lan.

bassmadrigal 09-24-2015 06:33 AM

Quote:

Originally Posted by rkelsen (Post 5424769)
If you're going to use a cable, you should set the phone up to present itself as a USB storage device. For reasons beyond my comprehension, this is not enabled by default in the latest versions of Android... but, fortunately, it is easy to find and change this setting.

Not all phones support this. My Nexus 6 only supports MTP or PTP. I think this is only allowed on devices that have a micro-sd card, but I'm not sure. I haven't had the ability to run any of my devices as a USB storage device after my Nexus One (as that is the last Nexus phone that had expandable memory).

Germany_chris 09-24-2015 06:41 AM

https://play.google.com/store/apps/d...transfer&hl=en

Is IMHO much simpler and what I use

cynwulf 09-24-2015 07:04 AM

1) Save all data on the phone to the microsd card and unmount and unplug it
2) Get a usb / mini sd adaptor for it (about £10 or less)
3) Insert the microsd card and plug it into a USB port/sd port
4) Mount the filesystem and grab your files

goumba 09-24-2015 07:19 AM

Quote:

Originally Posted by bassmadrigal (Post 5424956)
Not all phones support this. My Nexus 6 only supports MTP or PTP. I think this is only allowed on devices that have a micro-sd card, but I'm not sure. I haven't had the ability to run any of my devices as a USB storage device after my Nexus One (as that is the last Nexus phone that had expandable memory).

Samsung removed the UBSMS ability from their phones as well, so it's becoming a less common "feature".

bassmadrigal 09-24-2015 08:21 AM

Quote:

Originally Posted by cynwulf (Post 5424967)
1) Save all data on the phone to the microsd card and unmount and unplug it

Phones with microsd support are becoming less and less common. This may not always be an option.

Although, many, if not all, phones support USB-OTG (on-the-go), basically allowing you to plug a thumbdrive into the phone. This could be an alternative to transferring files, although, I tend to just transfer stuff using wifi (I have Root Explorer which supports SMB shares, so I can easily copy stuff to and from my phone).

But I also have mtp working fine on my computer and I can transfer stuff using Konqueror...

nitecrawler 09-29-2015 05:30 AM

well, i dont like the idea of a wireless transfer...thats like eating my bandwidth data for no use....was looking for a cabling solution....no offence meant...but just the idea of wireless transfer is difficult on low data plan users...

i have been told to exercise caution over mtpfs as it is all buggy...and to have a look at adb push/pull....well i need to check on it....
i remember using adb for rooting my phone once...

and for SD-card lots of phones today coming with no micro SD slot like bassmadrigal pointed out....

again a command line solution was what i was looking for.....

if anyone found issues with mtp do let me know...

Germany_chris 09-29-2015 07:04 AM

You're not using you cell connection you're using you home wifi.

nitecrawler 09-29-2015 07:23 AM

home wifi yes, but conception of bandwidth data is what i was intending on....use of bandwidth no matter cell or home wifi is consumption which gives that much less data to use if you use for transfer....
well thats what i think of it...you use wifi to transfer data....isnt it equivalent to upload/download of data from phone to pc and vice versa?correct me if am wrong...

Germany_chris 09-29-2015 08:50 AM

Quote:

Originally Posted by nitecrawler (Post 5427309)
home wifi yes, but conception of bandwidth data is what i was intending on....use of bandwidth no matter cell or home wifi is consumption which gives that much less data to use if you use for transfer....
well thats what i think of it...you use wifi to transfer data....isnt it equivalent to upload/download of data from phone to pc and vice versa?correct me if am wrong...

Your bandwidth is measured from your network out not internally between two computers in your home.


All times are GMT -5. The time now is 04:08 PM.