Streamline Android Theme Customization with Graphic Porter

I dont have a custom theme on my Android phone, and the reason for this is because … more

Boost the Brightness of Your Sony Xperia Z1’s LED

I think the last time anyone has ever used a physical torch to find their earphones, … more

XDA Xposed Tuesday: Modify the Look of Your Volume Control – XDA TV

How many screenshots have you seen with a volume status bar in the … more

Prepare Your Nokia X2 for Battle with Nokia X2 Tools

Unveiled in June this year, the Nokia X2 is the Finnish companys second crack at an … more
Post Reply

MTP on Ubuntu/Mint/Debian

4th August 2012, 02:52 PM   |  #1  
mussieonlinux's Avatar
OP Member
Thanks Meter: 24
 
64 posts
Join Date:Joined: Apr 2012
More
With many devices not supporting mass storage anymore Android seemed to have moved from mass storage to PTP and MTP

With Windows supporting MTP by default and Mac OSX with an application there isn't any native support in Linux.
There are a few work arounds like gMTP but that didn't really work for me.
There also is another work around that requires you to edit some files.
To make it easier for others I wrote a little bash script, that does most for you.


Step 1 : sudo apt-get install mtp-tools mtpfs
Step 2 : Plugin your device
Step 3 : Open up a terminal
Step 4 : Type in : “mtp-detect”
Step 5 : Write the PID and VID down, you will need this later
Step 6 : disconnect your device
Step 7 : Download the script and execute it by sudo ./mtp (don't forget to make it an executable first)
Step 8: Follow the instructions on screen and after it's done reboot and plugin your device
Step 9: Use the command "android-connect" to mount your device and "android-disconnect" to dismount

It's not much, but I hope it helped someone.
Please let me know if it worked for your device/distro.
Original post

Tested and working on the P3110 and P5110.

EDIT 1:
(First) time mount can take up to 1-2 minutes, have had where it would mount in a few seconds, others half a minute. Be patient.
Attached Thumbnails
Click image for larger version

Name:	mtp.png
Views:	2090
Size:	59.1 KB
ID:	1241180  
Attached Files
File Type: gz mtp.tar.gz - [Click for QR Code] (804 Bytes, 3477 views)
Last edited by mussieonlinux; 4th August 2012 at 06:26 PM.
The Following 10 Users Say Thank You to mussieonlinux For This Useful Post: [ View ]
4th August 2012, 05:11 PM   |  #2  
wd5gnr's Avatar
Senior Member
Houston
Thanks Meter: 116
 
444 posts
Join Date:Joined: Dec 2010
Quote:
Originally Posted by mussieonlinux

With many devices not supporting mass storage anymore Android seemed to have moved from mass storage to PTP and MTP


Tested and working on the P3110 and P5110.

Thanks for this. I think I have tried all this before and it has not worked, but will try again. A few things come to mind though. First, I think you have to turn USB debugging off, right? There is another thread where several of us are able to see the tablet, but not really get any files. Also there is a way to get the tablet to share PTP or MTP and that changes things too (PTP lets me see the top level but no subdirectories).

Will report back if this works or not.
4th August 2012, 05:38 PM   |  #3  
mussieonlinux's Avatar
OP Member
Thanks Meter: 24
 
64 posts
Join Date:Joined: Apr 2012
More
I think USB debugging has to be on, at least for my phone. Mine is always on on all my devices.
Yeah you can see it in the file manager (1 for each SD card) with MTP but you can't access the files.
I am not sure about the PTP.. However for the MTP I just made a new folder in on my other SD card named extSD since MTP shows all directories of both sdcards in one directory.
4th August 2012, 06:31 PM   |  #4  
wd5gnr's Avatar
Senior Member
Houston
Thanks Meter: 116
 
444 posts
Join Date:Joined: Dec 2010
Quote:
Originally Posted by mussieonlinux

I think USB debugging has to be on, at least for my phone. Mine is always on on all my devices.
Yeah you can see it in the file manager (1 for each SD card) with MTP but you can't access the files.
I am not sure about the PTP.. However for the MTP I just made a new folder in on my other SD card named extSD since MTP shows all directories of both sdcards in one directory.

Nope doesn't work with or without USB debug. I think the issue may be due to some problem with mtp-tools on 64 bit Linux. Are you running 32?

The mtpfs mounts but any attempt to list the mounted directory just hangs.
4th August 2012, 06:36 PM   |  #5  
mussieonlinux's Avatar
OP Member
Thanks Meter: 24
 
64 posts
Join Date:Joined: Apr 2012
More
I am using 64bit, did you do the reboot and android-connect? If you are using nautilus you wont see your device under "Devices". You will see it above your filesystem.

Can you tell me what isn't working?
Attached Thumbnails
Click image for larger version

Name:	xda1.png
Views:	1149
Size:	27.2 KB
ID:	1241570  
Last edited by mussieonlinux; 4th August 2012 at 06:41 PM.
5th August 2012, 04:51 AM   |  #6  
wd5gnr's Avatar
Senior Member
Houston
Thanks Meter: 116
 
444 posts
Join Date:Joined: Dec 2010
Quote:
Originally Posted by mussieonlinux

I am using 64bit, did you do the reboot and android-connect? If you are using nautilus you wont see your device under "Devices". You will see it above your filesystem.

Can you tell me what isn't working?

Well I'm using Kubuntu so no Nautilus. And I'm just looking at the mount point. My udev rules already have an entry for the mtd device. I also grabbed the latest libmtd and built it from source.

The fuse mount seems to work but any ls on the mount point just hangs forever.

Very strange.
20th October 2012, 04:35 PM   |  #7  
ufizo's Avatar
Member
Flag Jaipur
Thanks Meter: 26
 
62 posts
Join Date:Joined: Sep 2012
More
At times like this I miss ubuntu

On my Arch (+XFCE), I use gMTP (uses mtpfs ofcourse). Most of the times it works, and then there are times when it is a pain in the a##. Gets stuck, does not respond, fails to copy what not.

I find the only reliable way is using adb.
Gosh! I push and pull everytime!
21st October 2012, 03:36 PM   |  #8  
mussieonlinux's Avatar
OP Member
Thanks Meter: 24
 
64 posts
Join Date:Joined: Apr 2012
More
yeah, after a couple of days I found it not very stable at all, so I too switched over to ADB, it's not the fastest method. But we gotta get around, don't we?
21st October 2012, 05:25 PM   |  #9  
Member
Thanks Meter: 16
 
99 posts
Join Date:Joined: Apr 2006
I am also waiting for a permanent fix... Just switched back to Ubuntu from Windows 8 Preview, and I love it!!!

The only issue I have at the moment is the fact that I cannot connect directly to the PC from the Tab, although transfer speeds are better by removing the memory card and inserting it into the computer directly. Would be nice to use Rhythmbox to manage my MP3s.

I've tried a few solutions and nothing seems to work fully. I'll give the ideas mentioned above a try.
The Following User Says Thank You to denialnw10 For This Useful Post: [ View ]
22nd October 2012, 08:54 AM   |  #10  
ufizo's Avatar
Member
Flag Jaipur
Thanks Meter: 26
 
62 posts
Join Date:Joined: Sep 2012
More
I have found my peace finally with qtADB.
By far the fastest, and most efficient app for this job.

qtadb[dot]wordpress[dot]com

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Galaxy Tab 2 General by ThreadRank