11

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

Pablo Bianchi
  • 1,824
  • 1
  • 26
  • 30
  • Did you try `SUBSYSTEM=="usb", ATTR{idVendor}=="1004", ATTR{idProduct}=="6300", MODE="0666", OWNER=""`? – PageNotFound Aug 22 '15 at 00:55
  • sorry, doesn't work me :/ –  Aug 22 '15 at 02:38
  • The second solution (creating adb_usb.ini file) in the link posted in your "Update 2" worked for me. :) – nagamanojv Mar 28 '16 at 05:28
  • Try this link ...The second answer may help you.. https://askubuntu.com/questions/632651/adb-devices-command-wont-detect-my-4-4-android-phone#comment1226861_632668 – kathiravan1151 Aug 02 '18 at 06:20
  • Hi, I had the same issue with Ubuntu 18.04 LTS for an LG tablet, I added "SUBSYSTEM=="usb", ATTR{idVendor}=="1004", ATTR{idProduct}=="6300", MODE="0666", OWNER=""" to 70-android.rules then rebooted and ran every adb command with sudo. It did work somehow. – Pulathisi Bandara Mar 29 '19 at 04:16

7 Answers7

13

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!

orvi
  • 3,142
  • 1
  • 23
  • 36
3

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.

Bill--
  • 140
  • 3
  • 6
  • 1
    this answer does not improve anything – m47730 Mar 15 '18 at 18:04
  • @m47730..but avoids a lot of BS and similar questions repeatedly posted otherwise. – ZF007 Mar 15 '18 at 18:28
  • 2
    @m47730 I wrote my answer poorly. I edited it to explicitly include removing the extra adb instance was the solution that solved the posted question for me. – Bill-- Mar 16 '18 at 12:33
2

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.

spiffytech
  • 6,161
  • 7
  • 41
  • 57
0

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.

Hugh Perkins
  • 7,975
  • 7
  • 63
  • 71
0

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

0

If you are using a virtual box(ubuntu), there is a menu at the bottom of the that allows you to add and remove USB devices. If you cannot see the bottom menu, that means you are probably in full screen.

Abacito
  • 141
  • 7
0

I personally faced the problem where my device with a USB C port was showing up in lsusb but not in adb devices.

I tried all solutions given like adb kill-server, configuring /etc/udev/rules.d/51-android.rules file, ~/.android/adb_usb.ini file, setting the adb rules https://github.com/M0Rf30/android-udev-rules and restarting but nothing helped.

What finally worked was connecting the device to a USB2.0 port. I had a new desktop so most of the ports were USB3.0.

zeitgeist
  • 852
  • 12
  • 19