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.
On Android 5.0, go to Settings -> Storage -> menu -> USB computer connection and make sure 'Media device (MTP)' is disabled. When it's disabled 'adb devices' lists the device, when enabled not.
Open a command window and enter "adb devices". Watch the device's screen for any Authorization message and allow the connection.
Using the ADB Devices CommandOn your computer, press Win+R to open the Run dialog. In the Run dialog, type cmd and press Enter . This will open Windows command prompt. Check whether your device is on the list.
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:
dmesg | tail
Now, you can ge the idVendor and idProduct. It will be something like this:
[24936.555273] usb 1-2: USB disconnect, device number 9
[24939.022181] usb 1-2: new high-speed USB device number 10 using xhci_hcd
[24939.187152] usb 1-2: New USB device found, idVendor=04e8, idProduct=6860
[24939.187154] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24939.187156] usb 1-2: Product: SAMSUNG_Android
[24939.187157] usb 1-2: Manufacturer: SAMSUNG
[24939.187158] usb 1-2: SerialNumber: 5ae1b464
[24939.188132] cdc_acm 1-2:1.1: ttyACM0: USB ACM device
add the following line to your /etc/udev/rules.d/51-android.rules (Beware, you need to change idVendor
, idProduct
and username
to yours):
SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", ATTR{idProduct}=="9011", MODE="0600", OWNER="username"
You also can use the 51-android.rules file from android-udev-rules.
Here I'm copying the step for Ubuntu from its documentation:
# Clone this repository
git clone [email protected]:M0Rf30/android-udev-rules.git
# Create a sym-link to the rules file
sudo cp android-udev-rules/51-android.rules /etc/udev/rules.d/
# Change file permissions
sudo chmod a+r /etc/udev/rules.d/51-android.rules
# add the adbusers group if it's doesn't already exist
sudo groupadd adbusers
# Add your user to the adbusers group
sudo usermod -a -G adbusers $(whoami)
# Restart UDEV
sudo udevadm control --reload-rules
sudo service udev restart
# Restart the ADB server
adb kill-server
# Replug your Android device and verify that USB debugging is enabled in developer options
adb devices
# You should now see your device
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With