LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Hi, how do I connect my Moto G on Slackware? (https://www.linuxquestions.org/questions/slackware-14/hi-how-do-i-connect-my-moto-g-on-slackware-4175501383/)

moisespedro 04-11-2014 03:22 PM

Hi, how do I connect my Moto G on Slackware?
 
I am completely lost here, I tried a few solutions I've found on Google but I couldn't make it work. Thunar detects a device when I plug it in but when I double click it I get this:

http://screencloud.net/v/gJNF

That means "no MTP device found"

Any help? Thanks

Didier Spaier 04-11-2014 03:44 PM

See here.

PS did you add the udev rule?

moisespedro 04-11-2014 04:08 PM

There is no "/etc/fuse.conf" file and, by the way, to solve libmpt reporting the device as unknow I did this.

EDIT: My mtp-detect reports this now

Code:

root@darkstar:~# mtp-detect
Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.6

Listing raw device(s)
Device 0 (VID=22b8 and PID=2e82) is a Motorola Moto G (XT1032).
  Found 1 device(s):
  Motorola: Moto G (XT1032) (22b8:2e82) @ bus 1, dev 5
Attempting to connect device(s)
Android device detected, assigning default bug flags

And now when I try to open it via Thunar I get this

http://screencloud.net/v/kWDS

(It wasn't posible to open the device MTP [usb])

The only thing I did so far was change the source code and recompiling libmpt.

Didier Spaier 04-11-2014 04:24 PM

I'm not sure you need fuse.

If not already done, writer the udev rule:
Code:

echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", MODE="0666"' > /etc/udev/rules.d/69-MotoG.rules
and restart udev.

Alse use the command line instead of thunar, eg. mtp-connect.

moisespedro 04-11-2014 04:31 PM

Well, I reverted my steps and went back to the beggining and now it works:

-Stock Slackware libmtp package
-mtpfs installed from slackbuilds.org
-'SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", MODE="0666"' on '/etc/udev/rules.d/51-android.rules' file

I reboot my system and now I can mount it by clicking it on Thunar :D

moisespedro 04-11-2014 04:35 PM

I don't know if that is normal but I can't access any file from it, it says "file format not recognized" but if I copy the archive to my desktop it works. Any clue? Is that normal?

smoooth103 04-11-2014 09:10 PM

Try an app called kdeconnect. There is a slack build for it as well. Works great on my moto x.

phi11ip 04-12-2014 06:55 AM

Quote:

Originally Posted by moisespedro (Post 5150908)
I don't know if that is normal but I can't access any file from it, it says "file format not recognized" but if I copy the archive to my desktop it works. Any clue? Is that normal?

Have you tried Dolphin instead of Thunar? I have a Nexus 5 and a Nexus 7, both work perfectly with MTP and Dolphin. Just tried with Thunar and am getting read errors if I try to access any file. You may need to upgrade to the latest KDE from AlienBob as early versions of kio-mtp were quite iffy.

moisespedro 04-12-2014 06:59 AM

It is working on Thunar, I already said that.

phi11ip 04-12-2014 07:46 AM

I'll quote you AGAIN!

Quote:

Originally Posted by moisespedro (Post 5150908)
I don't know if that is normal but I can't access any file from it, it says "file format not recognized" but if I copy the archive to my desktop it works. Any clue? Is that normal?

Now, if you can't access any file, then it is not working correcty! I also have exactly the same problem with Thunar. I get different errors with different file formats and applications, but if I use Dolphin, then I can open any file with its respected application. I also noticed when I copied a file to my desktop using Thunar, then the filename changed.

moisespedro 04-12-2014 08:05 AM

Quote:

Originally Posted by phi11ip (Post 5151220)
I'll quote you AGAIN!



Now, if you can't access any file, then it is not working correcty! I also have exactly the same problem with Thunar. I get different errors with different file formats and applications, but if I use Dolphin, then I can open any file with its respected application. I also noticed when I copied a file to my desktop using Thunar, then the filename changed.

Oh, well I don't have any KDE package installed here.
EDIT: But I will give Dolphin a try

moisespedro 11-04-2014 04:06 PM

1 Attachment(s)
Well, I had it working but I decided to install a custom ROM on it and now I can't mount it. I am running Slackware64 14.1 with the latest Alienbob's KDE

rkelsen 11-04-2014 05:33 PM

The FTP Server app is pretty good:

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

AirDroid also works quite well:

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

moisespedro 11-04-2014 05:50 PM

I just want to be able to use it as I was using it before (clicking on it in Dolphin). It is still quite confusing to me how this is handled (udisks? udisks2? udev? I am like what).

bosth 11-04-2014 05:56 PM

moisespedro: I've been maintaining the kdeconnect SlackBuild for about a year now and the latest version works fine for me on KDE 4.14 and my Moto G. After upgrading, you'll need to restart kdeconnect (the easiest way is logging out of KDE and then logging back in again).

http://slackbuilds.org/repository/14...op/kdeconnect/

moisespedro 11-04-2014 05:58 PM

It didn't get clear If I would be able to access the phone files, that is the only thing I really want to do now.

bosth 11-04-2014 06:05 PM

Quote:

Originally Posted by moisespedro (Post 5264614)
It didn't get clear If I would be able to access the phone files, that is the only thing I really want now.

All kdeconnect functionality is working for me, including transferring files to and from the phone.

moisespedro 11-04-2014 06:09 PM

Well, I tried KDE Connect and I coulnd't pair the device and computer. Even if it worked it wouldn't solve this thread's issue. I think it is related to udev? Before this ROM I could just click on "Moto G" in Dolphin, mount it and see my files.

Teufel 11-04-2014 06:17 PM

What do you meant when wrote "the phone files"? You can't access files on flash sd-card?

moisespedro 11-04-2014 06:25 PM

Quote:

Originally Posted by Teufel (Post 5264619)
What do you meant when wrote "the phone files"? You can't access files on flash sd-card?

I can't mount it. KDE recognizes it, I click on it in Dolphin but it can't mount it.

Teufel 11-04-2014 06:28 PM

What does fdisk -l shows? Did you try to mount it manually?

moisespedro 11-04-2014 07:45 PM

I had to use parted (my system is GPT)

Code:

(parted) print all                                                       
Model: ATA MAXTOR STM332062 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start  End    Size    File system    Name  Sinalizador
 1      1049kB  538MB  537MB  ext4
 2      538MB  2685MB  2147MB  linux-swap(v1)
 3      2685MB  24,2GB  21,5GB  ext4
 4      24,2GB  67,1GB  42,9GB  ext4


Model: ATA WDC WD5000AAKS-0 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start  End    Size    Type    File system  Sinalizador
 1      1049kB  368MB  367MB  primary  ntfs        boot
 2      368MB  458GB  458GB  primary  ntfs
 3      458GB  500GB  41,9GB  primary


Erro: /dev/zram0: unrecognised disk label
Model: Desconhecido (unknown)                                           
Disk /dev/zram0: 1074MB
Sector size (logical/physical): 4096B/4096B
Partition Table: unknown
Disk Flags:

And no I didn't try (and rather not) mount it manually.

Loomx 11-05-2014 12:37 AM

You mentioned it is a new ROM.
CyanogenMod and similar ROMs have an option to connect your phone as a 'USB mass storage' device, e.g. like a memory stick.
To activate it, go to "Settings" > "Storage" > menu button > " USB computer connection"
I find this the simplest way to connect phone<-->computer
(This doesn't interfere with AirDroid either)

moisespedro 11-05-2014 05:45 AM

My ROM doesn't have that, just the usual MTP and PTP.

bassmadrigal 11-05-2014 08:12 AM

What does your dmesg show when you connect the phone? What ROM are you running? I know you said you don't want to mount it manually, but if it does get recognized and displays it in dmesg, does mounting it manually work (this could help determine if it's a permissions issue)?

moisespedro 11-06-2014 06:49 AM

1 Attachment(s)
Quote:

Originally Posted by bassmadrigal (Post 5264933)
What does your dmesg show when you connect the phone? What ROM are you running? I know you said you don't want to mount it manually, but if it does get recognized and displays it in dmesg, does mounting it manually work (this could help determine if it's a permissions issue)?

Code:

[  984.400297] usb 1-4: new high-speed USB device number 4 using ehci-pci
[  984.516451] usb 1-4: New USB device found, idVendor=22b8, idProduct=2e82
[  984.516460] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  984.516465] usb 1-4: Product: Moto G
[  984.516469] usb 1-4: Manufacturer: motorola
[  984.516473] usb 1-4: SerialNumber: 0425446911

I switched to another ROM and it works if the phone is not in debugging mode. So I guess I can consider this problem partially solved. In the attachment is the message I get when I am in debugging mode.

bassmadrigal 11-06-2014 08:19 AM

Quote:

Originally Posted by moisespedro (Post 5265496)
Code:

[  984.400297] usb 1-4: new high-speed USB device number 4 using ehci-pci
[  984.516451] usb 1-4: New USB device found, idVendor=22b8, idProduct=2e82
[  984.516460] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  984.516465] usb 1-4: Product: Moto G
[  984.516469] usb 1-4: Manufacturer: motorola
[  984.516473] usb 1-4: SerialNumber: 0425446911

I switched to another ROM and it works if the phone is not in debugging mode. So I guess I can consider this problem partially solved. In the attachment is the message I get when I am in debugging mode.

Well, if Google translated that correctly, it means that the file or folder doesn't exist, right?

Do you have the same rule you mentioned in post #5? Does the output to dmesg (and mtp-detect) change between regular and debugging mode? I'm guessing it does. Based on Google searches it seems that the idProduct changes between regular and debugging. If that is the case, you'd need an additional rule for that. From what I found on Google, there are two additional idProduct IDs for the Moto G. One for debugging mode and one for fastboot mode (this should allow you to use fastboot commands if you have the Android SDK installed). You can just modify the udev rule file you already have and add the bottom two udev rules. Then just restart the udev system.

Code:

#motog normal mode
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}==”2e82″, MODE="0666"
#motog debug mode
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}==”2e76″, MODE="0666"
#motog fastboot mode
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}==”2e80″, MODE="0666"

You should be able to get away from using any of the idProduct entries by creating a single rule for Motorola devices. You can try that by just editing the current rule you have and removing ATTR{idProduct}==”2e82″, so it just shows the below and restarting udev.

Code:

SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
If creating the single rule for Motorola works by removing the idProduct section, you could use the following to create an all-encompassing udev rule for Android devices that should cover most manufacturers. This should help with MTP and other Android things like adb and fastboot on any device you plug into your system. If you get one of those no-name manufacturers, you can easily add that manufacturer to the rule by looking at the output of dmesg/mtp-detect and grabbing the idVendor code and creating a new rule with that code. You can also modify the permissions or specifying a group that has access.

Code:

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Fujitsu & Fujitsu Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="201e", MODE="0666"
#Hisense
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#Intel
SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenovo
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#MTK
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0666"
#Pegatron
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Teleepoch
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666"


moisespedro 11-08-2014 01:01 PM

Thank you all for the help, I have the following as udev rule:

Code:

bash-4.2$ cat /etc/udev/rules.d/69-MotoG.rules
# Moto G

SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"

And now I can mount it, I tested it with and without debugging mode. Didn't try adb because I don't have the SDK installed but I assume it would work.


All times are GMT -5. The time now is 02:32 AM.