Cannot connect smartphone to Leap 15.1 via USB

It’s an old Motorola Moto G3 with Android 5.1

I need to connect it via USB to PC in order to transfer files.
Since I don’t know about any other native way on Linux, my only option was adb.

But problem is, when connecting phone to PC, adb sees no devices at all. I thought “maybe the udev rules”, but then I realized device does not even appear in lsusb.
I tried with more than one USB cable with same results.

Could it be due to the old Android version?
Is there any other way to transfer files from or to smartphone in Gnome, aside just adb?


Assuming that you have a WLAN environment, you could use GSConnect perhaps…

GSConnect is a complete implementation of KDE Connect especially for GNOME Shell with Nautilus, Chrome and Firefox integration. It does not rely on the KDE Connect desktop application and will not work with it installed.

This openSUSE KDE Connect wiki page has more info about using GSConnect…
…including firewall and pairing advice.

You might look into AirDroid.

Yes, but the main question is, why isn’t phone even shown in lsusb when plugged?
I do enable USB debugging in the phone, but still no dice
Can someone help please?

Well typically that could signify a possible issue with the USB controller on the device itself or the cable. With the phone plugged in, power off and then on again. Is it then enumerated in the lsusb output?

I’m ashamed of myself:
turned that it was a trivial matter: the used USB cable no longer works. I tried with a new one…

Further, just connecting the phone, Leap detects it immediately out of the box as multimedia storage, and I can transfer files. No even need for USB debug mode nor udev rules!

So, nowadays udev rules on Leap 15.1 are no longer needed?

Not surprised by this finding. It would be one of the first things to check. Anyway, good to read of your progress. :slight_smile:

Further, just connecting the phone, Leap detects it immediately out of the box as multimedia storage, and I can transfer files. No even need for USB debug mode nor udev rules!

So, nowadays udev rules on Leap 15.1 are no longer needed?

The necessary rules are already included. :wink:

Where? Couldn’t find them…

/usr/lib/udev/rules.d/69-libmtp.rules (part of libmtp-udev)

Before any of the above can work,
You need to make sure you have a udev rule created that can identify your Android device by vendor id and product id.

First thing to do is to do an Internet search for those values that identify your specific Android device…
Then create a udev rule as described in the following ArchWiki

Once that has been set up,
You should be able to run an adb device query that returns your phone as identified, and then you can issue commands for whatever you want to do (or apps will suddenly work connecting to your phone).


There should be already. :wink:

So it’s no longer /lib/udev/rules.d/51-android.rules (or was it /etc/udev/rules.d/51-android.rules? Which one?)

In general, pre-packaged (system-specific) rules files for a given Linux distribution are placed in /lib/udev/rules.d/, while /etc/udev/rules.d/ contains custom rules. You can search online for the historic files and their locations - I’ve just explained where the existing MTP device rules live for the distro.

So what changed since openSUSE 11.3 (or 12.1?) that udev rules for smartphones are already included and one no longer needs to add them manually?

Yes, but that can’t be assumed, it’s imperative to run the adb command to verify the device is recognized.
I believe the most popular brands should already be set to be recognized, but for many, many years even popular brands weren’t guaranteed to be set up properly. (I owned the very first Android, I think it was called something like the “HTC G1” and remember having to do this).

I wouldn’t take recognizing the device for granted.


The natural evolution/development of libmtp (as with other things) I guess. There may be new (or uncommon) devices that need to be catered for manually occasionally. Not often though… and like most community projects participation is encouraged…

New Device? If you happen upon a device which libmtp claims it cannot autodetect, please:

  • Submit the vendor ID and device ID as a bug, patch or feature request on the Sourceforge bug tracker at our homepage.
  • If it gives a sensible output from “mtp-detect” then please attach the result as well as it teaches us some stuff about your device.
  • If it doesn’t give sensible output, attach the output from “lsusb -v” for your device.
  • If you want to be able to hack some more and you’re not afraid of C hacking, add an entry for your device’s vendor/product ID and a descriptive string to the database in the file src/music-players.h.
  • If you want to poke around to see if your device has some special peculiarities, you can test some special device flags defined in src/device-flags.h by inserting them together with your device entry in src/music-players.h. Flags can be tested in isolation or catenated with “|” (binary OR). If relatives to your device use a certain flag, chances are high that a new device will need it too, typically from the same manufacturer. The most common flag that needs to be set is the DEVICE_FLAG_UNLOAD_DRIVER that detach any Linux kernel drivers that may have attached to the device making MTP access impossible.

More info here…

Then go back and read post #7. It’s now working as expected AFAIU.