LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-29-2015, 02:34 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
MTP device on Slackware 14.1 + Xfce


Hi,

One of my clients has an Android smartphone. On his computer, he's running MLED 14.1 (Slackware 14.1 + Xfce). He connected the smartphone to his PC, but only got an error message (see attached screenshot).

Any idea what can be done to access this device?

Cheers,

Niki
Attached Thumbnails
Click image for larger version

Name:	mtp.png
Views:	392
Size:	90.0 KB
ID:	19699  
 
Old 09-29-2015, 03:05 AM   #2
sebre
LQ Newbie
 
Registered: Jun 2013
Location: France
Distribution: Slackware
Posts: 28

Rep: Reputation: Disabled
Hello,

Just a workaround, sorry but I gave up with MTP. I ended up managing files and folders on my android smartphone from Linux PC by FTP over USB this way.
 
Old 09-29-2015, 04:13 AM   #3
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
Check that the device has MTP enabled. It's possible that it's disabled, or it has PTP enabled instead.

FWIW, I also abandoned MTP a while ago, as sebre, I find FTP much better.
 
Old 09-29-2015, 05:04 AM   #4
MRZA
LQ Newbie
 
Registered: Apr 2015
Location: Moscow, Russia
Distribution: Xubuntu
Posts: 10

Rep: Reputation: Disabled
To make Android smartphones work in Slackware you have to add udev rules to /etc/udev/rules.d/51-android.rules
It should look like
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", ATTR{idProduct}=="01a9", MODE="0666"
You can get vendor and product IDs from lsusb
Also edit /etc/udev/rules.d/69-libmtp.rules
Code:
ATTR{idVendor}=="0fce", ATTR{idProduct}=="01a9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
Now reload udev rules or reboot. MTP should be working now.
 
1 members found this post helpful.
Old 09-29-2015, 06:07 AM   #5
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
afaik udev supports wildcards
so one could write these rules for all the smartphone usb adapters based just on vendor
 
Old 09-29-2015, 09:23 AM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by MRZA View Post
To make Android smartphones work in Slackware you have to add udev rules to /etc/udev/rules.d/51-android.rules
It should look like
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", ATTR{idProduct}=="01a9", MODE="0666"
You can get vendor and product IDs from lsusb
Also edit /etc/udev/rules.d/69-libmtp.rules
Code:
ATTR{idVendor}=="0fce", ATTR{idProduct}=="01a9", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
Now reload udev rules or reboot. MTP should be working now.
AFAIK, 51-android.rules should only be needed for accessing USB debugging or fastboot/recovery (only when using the commands fastboot or adb). And I don't have any libmtp rules other than the defaults in /lib/udev/rules.d/, and I don't have any problems with my device being detected, and it's not listed in that file.

But, just as an FYI, you don't need the idProduct attribute. Leaving it out allows any device from that manufacturer/vendor to be recognized properly rather than adding each individual one. I have a massive android rules file that contains most manufacturers. It makes it easy when I switch devices because I don't have to edit additional rules to get it to work (since I tend to unlock my bootloaders and use adb and fastboot).

@Niki, if the other suggestions don't work, maybe try updating libmtp. I remember mine was quite old on my computer.
 
Old 09-29-2015, 09:26 AM   #7
the3dfxdude
Member
 
Registered: May 2007
Posts: 730

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Kiki,

Have you tried libmtp? It's the only one I found worth the trouble. Nothing I found on slackbuilds works as well. It also comes with udev rules, so it should be able to integrate with the xfce desktop & thunar. Not sure at the moment.

Here it is: http://sourceforge.net/projects/libmtp/

Last edited by the3dfxdude; 09-29-2015 at 09:34 AM.
 
Old 09-29-2015, 09:43 AM   #8
Bertman123
Member
 
Registered: Jun 2010
Distribution: Slackware Current 64 bit KDE 5
Posts: 380

Rep: Reputation: 77
I just did a fresh install on an old laptop - slack 14.1 & MLED 32bit - and plugged my android phone in and was able to open it with thunar with no problem.
 
Old 09-29-2015, 10:16 AM   #9
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by the3dfxdude View Post
Kiki,

Have you tried libmtp? It's the only one I found worth the trouble. Nothing I found on slackbuilds works as well. It also comes with udev rules, so it should be able to integrate with the xfce desktop & thunar. Not sure at the moment.

Here it is: http://sourceforge.net/projects/libmtp/
libmtp is already included in a standard Slackware 14.1 installation.
 
Old 09-29-2015, 11:13 AM   #10
the3dfxdude
Member
 
Registered: May 2007
Posts: 730

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by kikinovak View Post
libmtp is already included in a standard Slackware 14.1 installation.
OK, I must have meant mtpfs. Fuse based system.
 
Old 09-29-2015, 03:37 PM   #11
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 619

Rep: Reputation: 299Reputation: 299Reputation: 299
I've never had any luck with the "stock" mtpfs or libmtp based software. I use go-mtpfs. It worked with my Samsung S3 and now with my LG G3, both under CyanogenMod. I've also used a sshd process on the phone and then via sshfs. That works, but not as fast as a direct USB cable connect.
 
Old 10-02-2015, 02:02 AM   #12
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,442
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
Hi Niki,

Whilst I can understand the reasons Google removed the "USB mass storage" function from Android, it was the wrong thing to do.

Some versions of Android will allow you to re-enable sane USB storage functionality, but word on the street is that the latest versions don't.

In my experience, FTP works significantly better than MTP. The FTP server I use on my Android devices is: primitive ftpd. It works very well with gFTP which comes with Slackware.
 
Old 10-02-2015, 04:10 AM   #13
phi11ip
Member
 
Registered: Jul 2007
Location: Nottingham, UK
Distribution: Slackware64-current
Posts: 93

Rep: Reputation: 23
I'm running Slackware 64 bit current with KDE and can connect to my Nexus 5 and Samsung tab S via mtp with thunar and dolphin. I believe KDE uses its own kio-mtp which has been working successfully for me for some time now.
 
Old 10-02-2015, 04:24 AM   #14
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by bassmadrigal View Post
@Niki, if the other suggestions don't work, maybe try updating libmtp. I remember mine was quite old on my computer.
I'll try that, but I wonder if by updating libmtp from 1.1.6 to 1.1.9 I will have to rebuild some stuff.

Suggestions?
 
Old 10-02-2015, 11:34 AM   #15
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by rkelsen View Post
Whilst I can understand the reasons Google removed the "USB mass storage" function from Android, it was the wrong thing to do.
I'm not sure I agree with you. Keep in mind, when a device is mounted as "USB mass storage" it disconnects it from Android and nothing that was on that device is available to the OS (which effectively rules out using this on internal storage, since that would disconnect /data, which is where all the apps and app data resides in the internal memory). This caused a lot of issues with people who had apps installed to the sdcard, because it would break any widgets or push notifications that were used by those apps. I saw constant posts on the CM forum about people having issues with apps/widgets when they mounted as USB storage. But at the same time MTP is a horrible protocol, and I wish something else would've been used/developed. It'll be interesting to see how Android 6.0/Marshmallow will handle sdcards.

Quote:
Originally Posted by kikinovak View Post
I'll try that, but I wonder if by updating libmtp from 1.1.6 to 1.1.9 I will have to rebuild some stuff.
I don't remember recompiling anything, but I built it back in December, so my memory may be off.

I just dug through my /var/log/packages, and I installed the newer libmtp (1.1.8) on 30 DEC, and I didn't install anything after that until 27 JAN, so it's reasonable to assume I didn't need to recompile anything to take advantage of the newer libmtp. I have no problems accessing my Nexus 6 with Konqueror/Dolphin, and I'd assume it is the same with Thunar.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Debian 8 + Xfce, Thunar mount MTP (Android) device HMW Debian 17 03-11-2017 05:46 PM
[SOLVED] Slackware64 14.1, Xfce, MTP, LG E612 phone - filenames replaced with numeric code yars Slackware 3 11-06-2014 03:23 PM
ONE removable device not mounting in Slackware w/ XFCE Sumguy Slackware 20 06-22-2014 07:06 PM
Cannot mount hotpluggable device in xfce (Slackware 13.0) valsiterb Linux - General 3 03-28-2010 02:50 AM
Automounting an mtp device amishtechie Linux - Hardware 0 04-09-2009 05:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration