I am unable connect my Android to Ubuntu.
On executing command lsusb
. It shows attached device.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04ca:0061 Lite-On Technology Corp.
Bus 001 Device 002: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 025: ID 2a70:9011
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
And I have created rule using this command.
echo SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", MODE="0666", GROUP="plugdev" | sudo tee /etc/udev/rules.d/51-android-usb.rules
And after running adb devices
. It is not showing any attached device.
I have also reinstalled adb tools. Even though it is not working.
First, try unplug then plug the device. Then check the the message log using dmesg instead lsusb, because it gives you more information about the idVendor and idProduct. Use the following command to show the last 10 message log:
Now, you can ge the idVendor and idProduct. It will be something like this:
add the following line to your /etc/udev/rules.d/51-android.rules (Beware, you need to change
idVendor
,idProduct
andusername
to yours):You also can use the 51-android.rules file from android-udev-rules.
Here I'm copying the step for Ubuntu from its documentation:
You need to enable USB debugging on your phone.
This video demonstrates this from 0:33 to 1:03.
Copying the steps here:
The device should now be listed under
$ adb devices
once connected.Tested with Android 5.1 and Ubuntu 17.10.
I had the same problem with an empty list of
adb devices
. The only solution that worked for me was to take the first part of the device's ID(vendor id0e8d
):Then edit, or create if it doesn’t exist the file ~/.android/adb_usb.ini and place on a single line the prefix
0x
followed by your vendor id:Then restart the adb: