Springe zum Inhalt

Linux Mint 16 und Moto G MTP

Das Smartphone Moto G von Motorola kann über die USB-Schnittstelle auf zwei unterschiedliche Arten mit dem PC kommunizieren. Standardmäßig ist Mediengerät (MTP) eingestellt. Der zweite Modus ist Kamera (PTP), mit dem das Gerät sofort unter Linux Mint 16 erkannt wird, aber leider nur Zugriff auf bestimmte Ordner erlaubt.

Um auch den MTP-Modus nutzen zu können, muß das Moto G durch Vendor-ID und Product-ID erst einmal dem udev-Prozess bekannt gemacht werden. Dazu editiert man (als root) die Datei /lib/udev/rules.d/69-libmtp.rules und fügt dort zwei Zeilen an passender Stelle, evtl. nach den bereits dort eingetragenen Motorola-Geräten ein:

# Motorola Moto G (MTP+?)
ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

Anschließend wird udev neu gestartet.

service udev restart

Nun kann das Smartphone angesteckt werden und im MTP-Modus sollte es sofort im Dateimanager sichtbar sein.

Update vom 08.01.2015: Ab Mint 17 wird das Moto G (2nd Edition) automatisch erkannt. Für Mint 13 LTS ist leider keine Lösung bekannt. (Danke an Michael)

Update vom 08.06.2015: Für das Moto G Modell 2014 ersetzt man in obiger Beschreibung ATTR{idProduct}==”2e82″ durch ATTR{idProduct}==”2e76″, dann wird auch dieses Smartphone durch udev erkannt. (Danke an Stefan)

13 Gedanken zu „Linux Mint 16 und Moto G MTP

  1. Sebastian

    Hey! Danke, dass Du das hier mitteilst. Habe genau danach gesucht. Nun kann ich endlich Musik auf mein Moto G überspielen. Vielen Dank! :-)

  2. Michael

    Hallo,
    ich stehe gerade vor dem fast gleichen Problem, allerdings noch unter Linux Mint 13 LTS Cinnamon 32 Bit und mit einem Motorola Moto G (2nd.). Die entsprechende Datei gibts auch in Mint 13, ich frage mich nur, ob das Moto G der zweiten Generation ebenfalls mit der gleichen Einfügung angesteuert werden kann?!
    Wäre für einen Rat dankbar!

    1. shogun

      Leider habe ich keine Moto G der zweiten Generation zur Verfügung. Könntest Du hier einmal posten, was bei angestecktem Smartphone ein sudo mtp-detect ausgibt (den oberen Teil bis Events supported). Evtl. musst Du vorher noch die mtp-tools mit sudo apt-get install mtp-tools installieren.

      1. Ragnar

        Habe es mit einem 2nd Gen soeben nach Deiner Anleitung auf Anhieb so hin bekommen, ohne weitere Installationen (Mint 17). Danke!

        1. shogun

          Danke für die Erfolgsmeldung! Vielleicht hilft es den Anderen bei denen es bisher noch nicht geklappt hat (Konfig prüfen und nochmal prüfen ob man sich nicht vertippt hat).

  3. Michael

    Hallo shogun,
    mtp-detect hatte ich schon installiert, bin inzwischen der Überzeugung es liegt an der Android-Version 4.4.4, seit 4.2 scheint google die Schreibzugriffe auf die externe SD gesperrt zu haben, bin aber nicht sicher ob das vom PC aus ebenfalls so ist. Windows öffnet beide Speicherbereiche ohne Probleme, bei Linux Mint 13 beide lediglich im PTP Modus für Foto-Übertragung.
    Hier die Ausgabe von mtp-detect wie gewünscht:

    libmtp version: 1.1.3

    Listing raw device(s)
    Device 0 (VID=22b8 and PID=2e82) is UNKNOWN.
    Please report this VID/PID and the device model to the libmtp development team
    Found 1 device(s):
    22b8:2e82 @ bus 1, dev 6
    Attempting to connect device(s)
    Android device detected, assigning default bug flags
    USB low-level info:
    Interface has a kernel driver attached.
    bcdUSB: 512
    bDeviceClass: 0
    bDeviceSubClass: 0
    bDeviceProtocol: 0
    idVendor: 22b8
    idProduct: 2e82
    IN endpoint maxpacket: 512 bytes
    OUT endpoint maxpacket: 512 bytes
    Raw device info:
    Bus location: 1
    Device number: 6
    Device entry info:
    Vendor: (null)
    Vendor id: 0x22b8
    Product: (null)
    Vendor id: 0x2e82
    Device flags: 0x08008106
    Configuration 0, interface 0, altsetting 0:
    Interface description contains the string "MTP"
    Device recognized as MTP, no further probing.
    Device info:
    Manufacturer: motorola
    Model: XT1068
    Device version: 1.0
    Serial number: ZX1D2278X4
    Vendor extension ID: 0x00000006
    Vendor extension description: microsoft.com: 1.0; android.com: 1.0; mot-mobility.com/DSU: 1.2
    Detected object size: 64 bits
    Extensions:
    microsoft.com: 1.0
    android.com: 1.0
    Supported operations:
    1001: get device info
    1002: Open session
    1003: Close session
    1004: Get storage IDs
    1005: Get storage info
    1006: Get number of objects
    1007: Get object handles
    1008: Get object info
    1009: Get object
    100a: Get thumbnail
    100b: Delete object
    100c: Send object info
    100d: Send object
    1014: Get device property description
    1015: Get device property value
    1016: Set device property value
    1017: Reset device property value
    101b: Get partial object
    9801: Get object properties supported
    9802: Get object property description
    9803: Get object property value
    9804: Set object property value
    9805: Get object property list
    9810: Get object references
    9811: Set object references
    95c1: Unknown (95c1)
    95c2: Unknown (95c2)
    95c3: Unknown (95c3)
    95c4: Unknown (95c4)
    95c5: Unknown (95c5)
    9001: Unknown (9001)
    9002: Unknown (9002)
    9003: Unknown (9003)
    9004: Unknown (9004)
    9005: Unknown (9005)
    9006: Unknown (9006)
    9007: Unknown (9007)
    9008: Unknown (9008)
    9009: Unknown (9009)
    900a: Unknown (900a)
    900b: Unknown (900b)
    900c: Unknown (900c)
    Events supported:
    0x4002
    0x4003
    0x4004
    0x4005

  4. Michael

    Hallo nochmal,
    wollte lediglich mitteilen, das bei Mint 17 Mate überhaupt keine Installation von weiteren Paketen erforderlich ist. Das Moto 2nd wird hier sofort auch als Mediengerät erkannt sowohl per MTP und auch PTP. Zugriff und Schreiben war auf beide Speicherbereiche (intern und SD) möglich. Das Problem scheint bekannt und tritt lediglich bis einschließlich der Mint 16 Petra auf. Für das noch aktuelle 13 Maya LTS gibt es keine Lösung des Problems.

    1. shogun

      Danke für die Rückmeldung. Ich habe ein Update an den Artikel drangehängt.

  5. Stefan

    Thank you so much! Used this in Ubuntu 14.04 for my Moto G 2014. Had to change ATTR{idProduct}=="2e82" to ATTR{idProduct}=="2e76", but it works!

  6. Michael

    Hab inzwischen eine Lösung für Mint 13 und das Moto G 2nd.
    Es gibt eine absolut praktikable Möglichkeit das Gerät per bluetooth anzusprechen. Kopieren auf das Gerät funktioniert nur in den internen Speicher Ordner "bluetooth", jedoch lassen sich mittels Dateimanager die Daten jederzeit die SD verschieben. Inhalte vom Moto G lassen sich aus allen Speicherbereichen auf Mint 13 Geräte kopieren. Leider hat Mint 17 hingegen wieder Probleme mit bluetooth.
    Die Lösung heißt also Mint 17 via USB, Mint 13 via bluetooth.
    ...und alles ist gut. Bin glücklich so.

  7. Arnold Schiller

    Vieles von dem kannte ich zwar schon, aber das Moto E2 2nd LTE ist irgendwie ziemlich tückisch. Das ändert nämlich ständig seine ID. Wenn USB-Debugging eingeschaltet ist, dann hat es die 2e76, wenn es ausgeschaltet ist, dann hat es die 2e82
    mit
    69-libmtp.rules
    ACTION!="add", GOTO="libmtp_rules_end" ENV{MAJOR}!="?*", GOTO="libmtp_rules_end" SUBSYSTEM=="usb", GOTO="libmtp_usb_rules" GOTO="libmtp_rules_end"
    LABEL="libmtp_usb_rules"
    # Motorola Moto
    ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
    ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e76", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

    funktioniert dann beides solange man nicht usb-Tethering einschaltet, dann ändert das liebe Gerät nämlich seine ID in 22b8:2e25 bzw. 22b8:2e24 jenachdem ob USB-Debugging an ist oder nicht. Eigentlich suche ich ja nach einem Weg, wie ich mit Wammu dann drauf zugreifen kann, weil ich noch nicht herausgefunden habe, in welchem Mode er dann ein ttyUSB device ist.

  8. Michael

    Nochmal für die Suche:

    Motorola Moto G XT1032 1st Gen Generation

    Dazu editiert man (als root) die Datei /lib/udev/rules.d/69-libmtp.rules und fügt dort zwei Zeilen an passender Stelle, evtl. nach den bereits dort eingetragenen Motorola-Geräten ein:

    # Motorola Moto G (MTP+?)
    ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e76", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

    (tested on Mint 17.1 - works fine)

Kommentare sind geschlossen.