Android not detected linux

Ubuntu is not detecting my android device

I am new to android. I have just downloaded and installed android sdk. Now when I run the application from eclipse, my device is not getting detected. I have googled and was brought up with this as my solution, but that also didn’t worked. Here’s the 51-android.rules

SUBSYSTEMS=="usb", ATTR=="0bb4", ATTR=="0c03", MODE="0666", GROUP="plugindev", OWNER="" 
username@laptopname:~/Android/adt-bundle/sdk/platform-tools$ adb devices 
* daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached . no permissions 
crazydeveloper@crazydeveloper:~$ lsusb Bus 002 Device 004: ID 0bb4:0c03 HTC (High Tech Computer Corp.) Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 04f2:b337 Chicony Electronics Co., Ltd Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub crazydeveloper@crazydeveloper:~$ ls -l /dev/bus/usb/004/ ls: cannot access /dev/bus/usb/004/: No such file or directory crazydeveloper@crazydeveloper:~$ 
crazydeveloper@crazydeveloper:~$ ls -l /dev/bus/usb/002 total 0 crw-rw-r-- 1 root root 189, 128 May 7 09:45 001 crw-rw-r--+ 1 root root 189, 129 May 7 09:45 002 crw-rw-rw- 1 root plugdev 189, 130 May 7 09:48 003 

8 Answers 8

OK here are all the steps to get this to work. I had problems with all responses I found online, bits and pieces everywhere without any certain order and no single working solution, (running Android Studio, Jmonkey 3D, and Ubuntu 14.04)

If adb devices shows android device as . (no permissions) follow these instructions:

    create file /etc/udev/rules.d/51-android.rules

sudo gedit /etc/udev/rules.d/51-android.rules 
SUBSYSTEM=="usb", ATTRS=="0bb4", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0e79", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0502", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0b05", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="413c", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0489", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="091e", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="18d1", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0bb4", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="12d1", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="24e3", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="2116", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0482", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="17ef", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="1004", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="22b8", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0409", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="2080", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0955", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="2257", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="10a9", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="1d4d", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0471", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="04da", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="05c6", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="1f53", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="04e8", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="04dd", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0fce", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="0930", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS=="19d2", MODE="0666", GROUP="plugdev" 
sudo chmod a+r /etc/udev/rules.d/51-android.rules 
sudo udevadm control --reload-rules sudo service udev restart sudo udevadm trigger 
ls -l /dev/bus/usb/003 crw-rw-rw- 1 root plugdev 189, 329 Jul 3 18:23 074 

Note: if you haven’t created the plugdev group and added your user name to it (if permission denied prepend «sudo» following commands):

sudo service udev restart 

Источник

Читайте также:  Linux запуск bat файлов

ADB is not detecting my android device on Ubuntu

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.  

Update 1

51-android.rules file changes:

SUBSYSTEM=="usb", ATTR=="1004", MODE="0666", GROUP="plugdev" 
$ lsusb Bus 004 Device 004: ID 8086:0189 Intel Corp. Bus 004 Device 003: ID 1004:6300 LG Electronics, Inc.  

But, "adb" don't detect my device: 🙁

$ adb devices List of devices attached 

Update 2

Reference

The second solution (creating adb_usb.ini file) in the link posted in your "Update 2" worked for me. 🙂

Hi, I had the same issue with Ubuntu 18.04 LTS for an LG tablet, I added "SUBSYSTEM=="usb", ATTR=="1004", ATTR=="6300", MODE="0666", " to 70-android.rules then rebooted and ran every adb command with sudo. It did work somehow.

7 Answers 7

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):

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

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

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!

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.

@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.

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.

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.

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

Источник

Android device not recognized in Ubuntu 16.04 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Recently I installed Ubuntu 16.04, and Android Studio 2.1.2. I have tried these instructions to try to run the app in a physical device, without any luck. Am I missing something? It is the first time I try Ubuntu, so I'm kinda new to it. Also, I'm trying with a LG Stylus 3 device. (With debug option enabled). Thanks for any help.

What does "adb devices" say when you have the device plugged-in? Also, do you have USB debugging enabled on your Android phone (and is the USB in a mode that allows for data transfer, not just charging)?

adb devices say: "List of devices attached" and no results below that. And yes, I have USB debugging enabled, and using the correct usb mode. (I have access to the phone's files in my PC).

5 Answers 5

After a lot of things I tried, this was the solution.

And what did the trick was to change in my phone the "USB PC connection" from Media device (MTP) to Send Images (PTP).

I have two USB cords for my Moto X, and both can charge, but only one can transfer data. The one that can only charge does not allow my smart phone to show up in Ubuntu 16.04. It only dawned on me what the problem was when I realized that I was using the short cord that I keep with the phone in its case. After switching to the cord that can transfer data, all is well. So, check your cord (somehow, someway, but I do not know of any way to tell the difference between the two types of cords. A close comparison of both ends of both cords do not reveal any obvious differences).

Источник

Оцените статью
Adblock
detector