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
If you have never been able to use it before, you
adb
can try to configure it in the way shown below, if, on the contrary, it is a specific error, you can go to the end of the answer, and try one of the solutions that are mentioned:-1. We create the following file as root.
-two.
-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 format:
We
ATTR{idVendor}==”xxxx”
will change the“xxxx”
for the code that corresponds to our device, at this point you can obtain it in two ways.The first one 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 the second way below.
first way.
We launch
lsusb
in the Shell and we will get something similar to the following: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
each other, to see which one it is.We take the first number after the ID in this case it 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
Second Way.
You look for the manufacturer's brand in the following list, copy it or write it to the /etc/udev/rules.d/51-android.rules file.
/etc/udev/rules.d/51-android.rules file for a device
Huawei
would be the following.-4. We verify that your user (normal not as root) is within the group
plugdev
with the commandgroups
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 fileadb_usb.ini
, we do this as a normal user and we write the following inside it:and we save, the number
12d1
corresponds to the same one that we used previously, if it were another, it would be0x????
.If we introduce or have several devices, one will be added 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:
sources -> http://developer.android.com/tools/device.html
If you already had it configured, you can try the following:
Now with superUser permissions:
If you need it to work fast go to the folder where adb is located and stop it:
Then you start it again but with superuser permissions:
When checking the connected devices it should work fine