TECHIES WORLD

For Techs.... Techniques.... Technologies....

Linux

Android devices not detecting in Ubuntu machine

Ubuntu machines automatically detects all Android phones in most cases, but some recent devices is not. Is such cases we need to enable the same manually and this article explains the procedure in detail.

List all the usb devices connected to the machine using the command lsusb.

#lsusb
Sample output will be like this:

#lsusb
Bus 004 Device 003: ID 04f2:b2e2 Chicony Electronics Co., Ltd
Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 003 Device 008: ID 17ef:7999 Lenovo
Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
Bus 001 Device 002: ID 046d:c31d Logitech, Inc. Media Keyboard K200
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

From the output we can see that the Android device here connected is Lenovo.

Bus 003 Device 008: ID 17ef:7999 Lenovo

In this, 17ef is the Vendor id and 7999 is the Product id.

Create the file '/lib/udev/rules.d/69-mtp.rules' and update the below contents.
ATTR{idVendor}=="17ef", ATTR{idProduct}=="7999", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
Please note that here I have used the details from the sample output. Depending on your device, the Vendor id and the Product id will differ, just use the relevant values to create this file.

Now disconnect and reconnect your device. The device should now be shown in the File manager.

Note: If it still does not work for you, try enabling the USB debug option, in the Developer Tools Menu of your android phone. I have already enabled it to get my phone detected properly.

Leave a Reply