Reputation:
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.
I log in as root and create this file.
/etc/udev/rules.d/51-android.rules
These are my rules, for my phone LG L80+Bello D331.
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
I run this command and reboot.
chmod a+r /etc/udev/rules.d/51-android.rules
Finally, I test my changes, but don't display my devices.
$ adb devices
List of devices attached
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
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
Upvotes: 12
Views: 61425
Reputation: 111
For me on ubuntu 20.04 the issue was starting adb server without sudo.
The fix was:
adb kill-server
sudo adb start-server
Upvotes: 1
Reputation: 1032
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.
Upvotes: 0
Reputation: 151
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.
Upvotes: 0
Reputation: 6582
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.
Upvotes: 2
Reputation: 170
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.
Upvotes: 3
Reputation: 145
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
Upvotes: 0
Reputation: 8572
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.
Upvotes: 0
Reputation: 3340
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!
Upvotes: 13