Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,354 Members 44,354 Now Online
XDA Developers Android and Mobile Development Forum

HowTo - USB connection to Ubuntu

Tip us?
 
Angralon
Old
(Last edited by Angralon; 19th April 2012 at 02:22 PM.)
#1  
Junior Member - OP
Thanks Meter 12
Posts: 28
Join Date: Feb 2009
Lightbulb HowTo - USB connection to Ubuntu


Edit: Have a look at this thread: (MSC Mode for XPS). It could be a good workaround for your problem. MSC mode is kind of oldschool, but fine for copying things around.


If you want MTP support on Ubuntu, try this:
  1. Connect Xperia S to an USB2 port.

  2. Use the "lsusb" command to list your devices in a terminal
    One of the lines should look like this:
    Code:
    Select Code
    Bus 002 Device 012: ID 0fce:5169 Sony Ericsson Mobile Communications AB
  3. Note your vendor- and product id. Usually this is "0fce" for the vendor and "5169" for the product id. If you have USB debugging disabled, product id will be "0169".

  4. unplug your phone

  5. read this thread: humans-enabled.com
    Install the newest Version of "libmtp" and copy the 69-libmtp.rules file to /etc/udev/rules.d as described

  6. Edit: This step may not be necessary for you!
    Xperia S support is implementet in the libmtp-1.1.3. release. If you use the newest version from sourceforge.net
    skip this and go to step 7.


    type following to edit the copied file as root:
    Code:
    Select Code
    sudo gedit /etc/udev/rules.d/69-libmtp.rules
    Add the following text somewhere around the sony ericsson devices that are in this file. You can find them by searching for "0fce". Remember to set the correct vendor and product id:
    Code:
    Select Code
    # Sony Xperia S
    ATTR{idVendor}=="0fce", ATTR{idProduct}=="5169", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
    ATTR{idVendor}=="0fce", ATTR{idProduct}=="0169", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
  7. reboot, or use
    Code:
    Select Code
    sudo udevadm control --reload-rules
    to actualise.

  8. Plug in your device to a USB2 port, it will mount automatically. Use nautlius to copy files around.



Please let me know if it worked for you.
The Following 11 Users Say Thank You to Angralon For This Useful Post: [ Click to Expand ]
 
memfel
Old
#2  
Junior Member
Thanks Meter 0
Posts: 19
Join Date: Jul 2009
I tried the solution u proposed, but I can only see 1.1 gb and if I go on storage on the phone settings, it says the external storage is mounted, but nothing about the 26gb or so of the internal storage, which in fact I can't see at all in my ubuntu nautilus.
don't really know how to deal with this...which version of ubuntu do u have?
 
Angralon
Old
#3  
Junior Member - OP
Thanks Meter 12
Posts: 28
Join Date: Feb 2009
Hi memfel

I just tried it on another laptop and noticed my tutorial was not complete.
Please read my edited Tutorial again. I am quite sure it will work like that.

Thanks for your response
 
memfel
Old
#4  
Junior Member
Thanks Meter 0
Posts: 19
Join Date: Jul 2009
hi, thanks. now the difference is that it asks me if I want to use rhythmbox to see the connected device...nonetheless, still I can only see 1.5 gb partition, and not the all drive of the phone...that is, I can't move any file, because of those 1.5 gb most are already occupied... really don't know how to manage this, it's kinda crazy...
I found an app that seems to work, but the free version allows only to move 1 file or so...I can see 25gb there, through the web browser, but I find it so incredible that I'd need to pay for an app to do such a simple thing such as being able to connect the phone to my laptop and move files around...
 
Angralon
Old
#5  
Junior Member - OP
Thanks Meter 12
Posts: 28
Join Date: Feb 2009
Did you copy the libusb file to the right path?

Does it change something, if you enable the usb debugging mode?


If you don't succed with a USB connection you could still use airdroid. It works with wifi tethering or over a wlan router.
 
memfel
Old
#6  
Junior Member
Thanks Meter 0
Posts: 19
Join Date: Jul 2009
nope USB debugging doesn't seem to make any difference.
what I'm trying now is to force a copy of some gb of files, also if it shows no space. I realized after making a video that when the space that get showed up is full, then it shows more, so it went from 1.5gb to 4.4...don't know why such a move, but seems like there's a bug perhaps somewhere.
'Funny' thing is, to copy 2gb it's taking 1h....do u also need all this time?
 
Angralon
Old
#7  
Junior Member - OP
Thanks Meter 12
Posts: 28
Join Date: Feb 2009
Just tested it: It took me about 3 minutes to copy a 2 GB video to the phone.

Did you flash a newer Firmware? Do you have root access?
I have rooted my XPS, but i don't see why this should make a difference...
 
memfel
Old
#8  
Junior Member
Thanks Meter 0
Posts: 19
Join Date: Jul 2009
not rooted still, and no firmware change...really have no idea why it works this way...it's really weird I think.
Forcing copy didn't work, I got errors at one point, and all got blocked. Also, some files were copied on the phone, but when I tried to open the directory I copied, nautilus continued to crash all the time, so I am also not able to access the files that I copied...
I guess it's something broken with my ubuntu installation...perhaps going to be solved with 12.04...
 
Angralon
Old
#9  
Junior Member - OP
Thanks Meter 12
Posts: 28
Join Date: Feb 2009
Yes, they will hopefully integrate full MTP support into Ubuntu 12.

Just don't try to update your (broken) system from 11 to 12 with the update manager
 
memfel
Old
#10  
Junior Member
Thanks Meter 0
Posts: 19
Join Date: Jul 2009
let's hope I have the time to do a new install by the time 12 comes out. but in the meantime, if u have any other idea...let me know.
just to be precise...how many gb do u see when u connect ur phone?

---------- Post added at 09:44 PM ---------- Previous post was at 08:47 PM ----------

well, I retried to copy files over the allowed and visible size, it worked quite faster, and there I go, there appear some more gb of visible space...around 4.5 now...not all the disk, but still, it might mean the space shows up when needed even if at first it seems it's not there.

Tags
file, linux, mtp, transfer, ubuntu
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes