Home » Android » ADB is not detecting my android device on Ubuntu

ADB is not detecting my android device on Ubuntu

Posted by: admin June 15, 2020 Leave a comment

Questions:

Need help, “adb” not detect my phone, I do not know what to do; and this was what I did, if I have a mistake or something tell me please.

  1. I log in as root and create this file.

    /etc/udev/rules.d/51-android.rules
    
  2. These are my rules, for my phone LG L80+Bello D331.

    SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
    
  3. I run this command and reboot.

    chmod a+r /etc/udev/rules.d/51-android.rules
    
  4. Finally, I test my changes, but don’t display my devices.

    $ adb devices
    List of devices attached
    

Additional Information

Q: Is USB debugging turned on on the Android?
R: Yes.

OS: Ubuntu 15.04 (64 bit)

$ lsusb
Bus 004 Device 003: ID 8086:0189 Intel Corp. 
Bus 004 Device 005: ID 1004:6300 LG Electronics, Inc. <<<
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 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 004: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
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

$ ls -l /dev/bus/usb/004/
total 0
crw-rw-r-- 1 root root 189, 384 ago 21 05:21 001
crw-rw-r-- 1 root root 189, 385 ago 21 05:21 002
crw-rw-r-- 1 root root 189, 386 ago 21 05:21 003
crw-rw-rw- 1 root root 189, 388 ago 21 18:15 005

Update 1

51-android.rules file changes:

SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"

Command:

$ lsusb
Bus 004 Device 004: ID 8086:0189 Intel Corp. 
Bus 004 Device 003: ID 1004:6300 LG Electronics, Inc. <<<
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 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
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

$ ls -l /dev/bus/usb/004/
total 0
crw-rw-r-- 1 root root    189, 384 ago 21 11:33 001
crw-rw-r-- 1 root root    189, 385 ago 21 11:33 002
crw-rw-rw- 1 root plugdev 189, 386 ago 21 11:33 003 <<<
crw-rw-r-- 1 root root    189, 387 ago 21 11:33 004

But, “adb” don’t detect my device: 🙁

$ adb devices
List of devices attached

Update 2

Here is the solution

Reference

How to&Answers:

from lsusb output I see that your device connected to Bus 004 as a device 005

Here it is
Bus 004 Device 005: ID 1004:6300 LG Electronics, Inc.

I see that you did not create any group.You need to create a group (if permission denied prepend “sudo” following commands):

1) add plugdev group:

 groupadd plugdev

2) add your username to plugdev group (useradd -G {group-name} username):

 useradd -G plugdev orvi

3) restart udev (you may need to log off and log back in to update user group):

 sudo service udev restart

4) Now reload the rules with the following commands:

 sudo udevadm control --reload-rules
 sudo service udev restart
 sudo udevadm trigger

5) Verify device is now allowing plugdev user group access

ls -l /dev/bus/usb/<bus number from step 4>

It should give something like that:

  crw-rw-rw- 1 root plugdev 189, 329 Jul  3 18:23 074

6) Run adb devices to confirm permissions are correct and enjoy!

Answer:

I know your issue was solved, but for everyone in the future make sure you don’t have two versions of adb running. Android Studio comes with adb and I installed adb through yum. The instances were interfering with each other and caused lots of issues including not being able to see my device.

Answer:

My phone thought it was connected to the computer, but the computer wouldn’t recognize it. On my phone I tapped the notification for ‘USB Debugging Enabled’, scrolled to ‘USB Debugging’, and toggled the setting off and on again. adb then saw my phone.

Answer:

On Ubuntu 16.04, I had to install the latest android sdk, rather than the one that comes with apt-get, and finally I could see the devices from adb.

Answer:

Use apt-get install to install the android-tools-adb package.

This gives you a community-maintained default set of udev rules for all Android devices.

Make sure that you are in the plugdev group. If you see the following error message, adb did not find you in the plugdev group:

error: insufficient permissions for device: udev requires plugdev group membership

Use id to see what groups you are in.

Use sudo usermod -aG plugdev $LOGNAME to add yourself to the plugdev group.

The following example shows how to install the Android adb tools package.

apt-get install android-tools-adb

form android developer doc:
https://developer.android.com/studio/run/device.html#connect