Connect Android via usb. adb devices various errors (xxxxxxxxxx no permissions) OS UNIX type

2

Trying to connect an android device I am having errors of the type:

command shell:

./adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

command shell:

./adb devices
List of devices attached
xxxxxxxxxxxx    no permissions
    
asked by Angel Angel 11.01.2016 в 22:22
source

2 answers

5

If you have never been able to use the adb before, you can try to configure it in the way shown below, if on the contrary it is a point error you can go to the end of the answer, and try some of the solutions that are Mention:

-1. We create the following file as root.

touch /etc/udev/rules.d/51-android.rules

-2.

chmod a+r /etc/udev/rules.d/51-android.rules 

-3. Now with the created file we open it with an editor so that we can edit in it to add some lines with the following this format:

#x-x-x-x-x-x
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666", GROUP="plugdev"

The ATTR{idVendor}==”xxxx” We will change the “xxxx” by the code that corresponds to our device, at this point you can get it in two ways.

The first one that I consider faster using the lsusb command, if you do not have it, you can download it, but it is not necessary, if you choose not to download it, you can do it in the second way below.

First way.

We launch lsusb in the Shell and we will get something similar to the following:

lsusb
//..
Bus 001 Device 006: ID xxxx:xxxx ............................... 
Bus 001 Device 008: ID 12d1:1038 Huawei Technologies Co.........
Bus 001 Device 007: ID 0333:0330 ...........................
//..

We look for the line where it shows us the device that we are going to add, if it is not so clear we connect and disconnect using lsusb among them, to see what it is.

We take the first number after the ID in this case is 12d1. And it is the one that we apply to the format that we write in the file.

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

#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"

Second Way.

You look for the manufacturer's brand in the following list the copies or write in the file /etc/udev/rules.d/51-android.rules.

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0664", GROUP="plugdev"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0664", GROUP="plugdev"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0664", GROUP="plugdev"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0664", GROUP="plugdev"
#Fujitsu & Fujitsu Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0664", GROUP="plugdev"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0664", GROUP="plugdev"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0664", GROUP="plugdev"
#Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="201e", MODE="0664", GROUP="plugdev"
#Hisense
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0664", GROUP="plugdev"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0664", GROUP="plugdev"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0664", GROUP="plugdev"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0664", GROUP="plugdev"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0664", GROUP="plugdev"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0664", GROUP="plugdev"
#Lenovo
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0664", GROUP="plugdev"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0664", GROUP="plugdev"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0664", GROUP="plugdev"
#MTK
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0664", GROUP="plugdev"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0664", GROUP="plugdev"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0664", GROUP="plugdev"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0664", GROUP="plugdev"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0664", GROUP="plugdev"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0664", GROUP="plugdev"
#Pegatron
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0664", GROUP="plugdev"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0664", GROUP="plugdev"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0664", GROUP="plugdev"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0664", GROUP="plugdev"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0664", GROUP="plugdev"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0664", GROUP="plugdev"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0664", GROUP="plugdev"
#Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0664", GROUP="plugdev"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0664", GROUP="plugdev"
#Teleepoch
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0664", GROUP="plugdev"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0664", GROUP="plugdev"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0664", GROUP="plugdev"
#ZUK
SUBSYSTEM=="usb", ATTR{idVendor}=="2b4c", MODE="0664", GROUP="plugdev"

file /etc/udev/rules.d/51-android.rules for a device Huawei would be the following.

#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0664", GROUP="plugdev"

-4. We verify that your user (normal not as root) is inside the group plugdev with the command groups if it is not found, we add it.

-5. Now we go to the directory where we have the Home/Android/Sdk/tools and we create the file adb_usb.ini this we do as a normal user and write in the following:

0x12d1

and save, the number 12d1 corresponds to the same that we used previously to be another because it would be 0x???? . To enter or have several devices will be added one per line in the same file.

-6. In this directory Home/Android/Sdk/tools we execute the following:

./android update adb

-7. Now with superUser permissions:

@:/home//Android/Sdk/platform-tools# ./adb kill-server
@:/home/Android/Sdk/platform-tools# ./adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
@:/home/Android/Sdk/platform-tools# ./adb devices
List of devices attached
3xxxxxxxxxx device

sources - > link

If you already had it configured you can try the following:

sudo service udev restart

Now with superUser permissions:

@:/home//Android/Sdk/platform-tools# ./adb kill-server
@:/home/Android/Sdk/platform-tools# ./adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
@:/home/Android/Sdk/platform-tools# ./adb devices
List of devices attached
3xxxxxxxxxx device
    
answered by 11.01.2016 / 22:36
source
0

If you need it to work fast you go to the folder where adb is located and stop it:

./adb kill-server

Then you start it again but with superuser permissions:

sudo ./adb start-server

When reviewing connected devices you should work fine

    
answered by 14.01.2016 в 17:49