[GUIDE] How to transfer files in Linux

Search This thread

lassegs

Member
Aug 19, 2009
22
1
Oslo
I remember this **** from back in 05, struggling with Creative's MTP mp3 players. It sucked then, still sucks apparently.

Retail 10.1 32 gig rooted. lsusb shows
USB Debugging Enabled = 685e
USB Debugging Disabled = 6860

So I've tried them both, changed the udev rule, rebooted, gtab shows up under /dev/ , but both mtp-detect and gmtp tells me the same
No raw devices found.

EDIT: a bit off topic, but are there really no one who have considered making a GUI tool out of USB debugging and adb push?
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
It looks like no, but I think I might have figured out why - will test tomorrow.

Apparently libmtp will only find devices it "knows".

The commit for the Galaxy Tab support was 5/26/11, Ubuntu has version 1.0.6 of libmtp which was released 2/11/11.

So it looks like we need to find a PPA that has 1.1.0 for libmtp

Edit: None seems to exist and trying to install the Oneric packages doesn't work - too many packages in Natty depend on libmtp8 and this is libmtp9. Can't have both at once.
 
Last edited:

BlackOtaku

Senior Member
Dec 18, 2009
198
41
Is there anyway to compile the SGT support into libmtp8 and then replace it with the repos' libmtp8?
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Is there anyway to compile the SGT support into libmtp8 and then replace it with the repos' libmtp8?

I just tried backporting the timeout and detection patches to libmtp8. (libmtp-1.0.6)

At this point the tab is now detected by MTP but all operations hang/timeout, even beyond the "extended" 60 second timeout added by the patch.

Maybe there's another dependency I'm missing.
 

mlevin

Senior Member
Dec 8, 2008
323
6
Fairfax, VA
I just tried backporting the timeout and detection patches to libmtp8. (libmtp-1.0.6)

At this point the tab is now detected by MTP but all operations hang/timeout, even beyond the "extended" 60 second timeout added by the patch.

Maybe there's another dependency I'm missing.

I'm trying to do the same. Not having much luck either.

Other things I've tried:

Grabbed libmtp from sourceforge and compiled that, but it installed into /usr/local/bin and mtp-detect was still using the version in /usr/bin.

Then tried grabbing libmtp9 source packages for oneiric and building them locally the "normal" way (configure, make, make install). When I tried using debian/rules, got some errors that were beyond my capabilities.

Setup: gtab 10.1 from I/O (running 3.1), natty x64

Can't seem to find any libmtp9 PPAs, either. And trying to dpkg -i the libmtp9 .deb file just gives me loads of dependency problems.

Anyone making any progress with this?
 

bijixda

Senior Member
Feb 12, 2010
429
34
Jakarta
Hello found another way ^^
Use ddms from sdk tools
Then go to file explorer menu, you can drag and drop from nautilus
 

andyfarmery

Senior Member
Jul 12, 2009
55
11
I'm trying to do the same. Not having much luck either.

Other things I've tried:

Grabbed libmtp from sourceforge and compiled that, but it installed into /usr/local/bin and mtp-detect was still using the version in /usr/bin.

Then tried grabbing libmtp9 source packages for oneiric and building them locally the "normal" way (configure, make, make install). When I tried using debian/rules, got some errors that were beyond my capabilities.

Setup: gtab 10.1 from I/O (running 3.1), natty x64

Can't seem to find any libmtp9 PPAs, either. And trying to dpkg -i the libmtp9 .deb file just gives me loads of dependency problems.

Anyone making any progress with this?
Hey,

I got it working using the source from sourceforge, but adding: "./configure --bindir=/usr/bin --libdir=/usr/lib"

hope that helps!

update:

maybe i was a bit premature; mtp-detect finds gtab, but there's still a problem connecting - i'll work on it!


libmtp version: 1.1.0

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1.
Found 1 device(s):
Samsung: GT-P7510/Galaxy Tab 10.1 (04e8:6860) @ bus 3, dev 3
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.
 
Last edited:

ric64

Member
Sep 28, 2008
11
0
workaround

Hi everybody as there is a bug filed for libmt, not working actually with galaxy tab 10.1, I suggest a workaround using a very simple gui developed by Soledad Penades and called aafm. (Sorry, can't post links) It uses adb instead of mtp, so you have to enable debug. I tested it and works like a charm for transfer of files. :p
 

churchmice

Senior Member
Nov 20, 2010
222
96
If you type mtp-detect right after the tab is plugged via usb ( wait until it makes a notification sound ), you would get an output.
Type mtp-filetree even shows all the files in my tab.

But after that, the mtp functions seems to be disabled.
It seems the mtp function is only working during the first few seconds when the tab is plugged, after that, it just does not work.

Some says Samsung has embeded microsoft DRM in the MTP protocol, WTF!
 

kamileon

Senior Member
May 10, 2010
156
11
Phoenix
Trying to get the auto mount option to work. Ive gotten this to work with gMTP. But when I click on the gtab under places I get the following error.

fusermount: failed to open /etc/fuse.conf: Permission denied
fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf

Any ideas?
 

MapleSyrup

Senior Member
Oct 9, 2011
292
821
use Linux Mint 12 (11.10).
downloaded latest Linux QtADB file (tar)

how do I install/run it?

Change the file name according to your download:

Code:
tar xf QtADB_0.8.1_linux64.tar.gz

Code:
cd QtADB_0.8.1_linux64

Code:
chmod +x QtADB

Code:
./QtADB

It will prompt you to choose the path for adb and appt in your system (for example, mine is /opt/android-sdk/platform-tools/), do it and click "open". That's it.
 

Duvel999

Senior Member
Nov 1, 2010
1,731
430
Samsung Galaxy Tab S3
OnePlus 6T
but first you need to install the android sdk on you Linux pc or not?

So I installed eclipse by software center & followed this tutorial

hxxp://gihansblog.wordpress.com/2011/06/22/how-to-install-and-configure-android-sdk-with-eclipse-on-ubuntu-11-04/

then installed Qt ADB, by rightclick on the extracted file (rar)
changed permissions to execute

pointed it to the right path adb &appt

this works,


but the Qt ADB won start automatic when I connect the Tab to the PC..:(
I have tho execute it manually... so it seems?

Am I doing something wrong?:(
 

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    Now works on 32bit and 64bit Linux

    Just a quick guide on how to configure Linux for file transfers using MTP. I wrote the instructions and config for Ubuntu Natty 32bit and 64bit, though the same process will work on other platforms - the only real difference being the package manager commands and possibly the config file locations.

    The attached files are for the Galaxy Tab 10.1v but should work for the 10.1g / 10.1 as well. See the end of the post to learn how to modify this config to work for other devices.

    How to configure for gMTP and other Media Sync tools

    1) Install aptitude
    Code:
    sudo apt-get install aptitude
    2) Install mtp-tools and mtpfs
    Code:
    sudo aptitude install mtpfs mtp-tools
    3) Download the attached file ( View attachment 98-gtab.zip for 32bit Linux or View attachment 98-gtab.rules-AMD64.zip for 64bit Linux ) to your desktop.
    4) Extract the 98-gtab.rules file to your desktop
    5) Copy the rules file to /etc/udev/rules.d/
    Code:
    sudo cp ~/Desktop/98-gtab.rules /etc/udev/rules.d
    6) Reboot
    7) Connect your Tab
    8) Run the following command to confirm it is working:
    Code:
    ls /dev | grep gtab
    ...which should return "gtab" if successful. If not, follow the "Modifying" guide below.
    9) Download / install gMTP
    Code:
    sudo apt-get install gmtp
    10) Open gMTP and select "connect" from the menu
    11) Hit the thanks button :D
    12) Go nuts!

    Setting up for Automount (Optional, but recommended)

    ***You must have completed Steps 1-8 above before proceeding***
    1) Edit your fstab file to add your gtab:
    Code:
    sudo gedit /etc/fstab
    2) Add this to the end of the file:
    Code:
    #gtab
    mtpfs     /media/gtab     fuse     user,noauto,allow_other      0      0
    3) Save and exit
    4) Open fuse.conf for editing:
    Code:
    sudo gedit /etc/fuse.conf
    5) Find the following line and remove the #
    Code:
    #user_allow_other
    6) Save and exit
    7) Open and edit the groups file:
    Code:
    sudo gedit /etc/group
    8) Find the details for the group 'fuse' and append your username to the end of the line eg.
    Code:
    fuse:x:104:<YOUR USER NAME>
    9) Save and exit
    10) Create the folder to mount your Tab:
    Code:
    sudo mkdir /media/gtab
    11) Take ownership of the folder:
    Code:
    sudo chown <YOUR USER NAME>:users /media/gtab
    12) Reboot
    13) Plug in your Tab.
    14) Click on the Places menu and click gtab.
    15) You're in business!


    Modifying for other devices

    If the above doesn't work immediately on the 10.1g / 10.1 (I have only tested on the 10.1v), you can easily edit the rules file to support your device.

    1) Install lsusb
    Code:
    sudo apt-get install lsusb
    2) Run lsusb
    Code:
    lsusb
    3) Check the output of this command to find your device. The 10.1v is shown like this:
    Code:
    Bus 001 Device 010: ID 04e8:6860 Samsung Electronics Co., Ltd
    4) Make a note of the Vendor and Product IDs. In the example above, the vendor ID is 04e8 and device ID is 6860 (note 04e8:6860 in the output).
    5) Open the rules file for editing (if it's not already in /etc/udev/rules.d, copy it there now)
    Code:
    sudo gedit /etc/udev/rules.d/98-gtab.rules
    6) Find this line:
    Code:
    ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666" SYMLINK+="gtab"
    7) Replace the Vendor ID (04e8) and Product ID (6860) with the ones that you got from step 3 above.
    8) Save and exit
    9) Reboot
    10) Follow step 7 onward in the first guide above
    11) Hit the thanks button :D


    If you modify it for a particular device, please post the contents of your new 'rules' file here.


    32bit RULES FILE:
    Code:
    ACTION!="add", GOTO="gtab_rules_end"
    SUBSYSTEM!="usb|usb_device", GOTO="gtab_usb_end"
    
    ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666" SYMLINK+="gtab"
    
    LABEL="gtab_usb_end"
    
    LABEL="gtab_rules_end"

    64bit RULES FILE:
    Code:
    ACTION!="add", GOTO="gtab_rules_end"
    SUBSYSTEM!="usb|usb_device", GOTO="gtab_usb_end"
    
    ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0777" SYMLINK+="gtab"
    
    LABEL="gtab_usb_end"
    
    LABEL="gtab_rules_end"
    3
    I edited my post up above, but the gist is - you can't do this while USB Debugging is enabled.

    You may be right. When I wrote this guide, I was using a VM. It is possible that the fact that I was using both MTP and ADB at the same time has something to do with how VMWare presents the devices to the guest OS.

    Now I am using 'bare metal' Natty 64 bit and have the same problem as you.

    I have to go out for a while but will look at it again when I get back.

    EDIT: Just tried mtp-detect and it is finding the device. I suspect USB Debug is not the issue, but I'll leave it in your capable hands - really got to go now

    EDIT2: See here http://www.usb.org/developers/devclass_docs/MTP_1.0.zip OK - Im really REALLY going now. Back online in a few hours :D
    1
    Everything worked for me up to the GMTP part - I can grep through /dev and I can see the "gtab" device there. But GMTP insists "Detect: No raw devices found."

    I'm still running Maverick, but I added the maverick-backports repo, which has gmtp, so I would think it would work.

    This is a Samsung Galaxy Tab 10.1v (from Google I/O). Any ideas?

    EDIT: I also tried the automounting option with FUSE. Attempts to cd into it with bash or open it from the Places menu in GNOME both give the message "Transport endpoint is not connected".

    Can you post the output from 'lsusb' ?

    re the "Transport endpoint is not connected" - I just got this same error on 64bit Natty. Will try and see if I can find out why..
    1
    Messed up indeed.

    Can you get MTP to detect it with USB debugging enabled?

    Yes, both work simultaneously on 32bit Natty

    Note that you have to unmount the gtab for mtp-detect to work. I compared the output from mtp-detect on the 32bit working VM and the 64bit non-working 'bare metal' machine and the output was identical. I suspect this means that mtpfs is not where the problem is :confused:

    Re the strange problem with haptic feedback - I have had mine power off all by itself when testing some different parameters in the rules file.
    1
    [64bit working]

    OK. Problem solved... kind of. There seems to be some kind of bug in fuse which requires the filesystem to mount with higher permissions to run properly (at least on Natty AMD64)

    If you use the new 64bit rules file I have attached, it should work. Basically it uses 777 permissions instead of 666. Not great, but working nonetheless.

    New rules file for 64bit:
    Code:
    ACTION!="add", GOTO="gtab_rules_end"
    SUBSYSTEM!="usb|usb_device", GOTO="gtab_usb_end"
    
    ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0777" SYMLINK+="gtab"
    
    LABEL="gtab_usb_end"
    
    LABEL="gtab_rules_end"

    EDIT: If someone wants to experiment with lesser permissions and see what the minimum is and post back, that would be helpful for all.