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 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 12:53 AM.