# android-tools no device detected

## Eiji

I installed android-tools package:

```
[ebuild   R    ] dev-util/android-tools-5.1.1_p13::gentoo  USE="-libressl" 0 KiB
```

I also enabled "USB debugging" in my phone.

When I type in console:

```
adb devices
```

I got this result:

```
List of devices attached 

```

lsusb command returns:

```
Bus 002 Device 016: ID 2970:e688
```

My USB keyboard and mouse are recognized without problems:

```
Bus 002 Device 010: ID 046d:c31c Logitech, Inc. Keyboard K120

Bus 002 Device 011: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse
```

Also in http://www.the-sz.com/products/usbid/ I can find my keyboard and mouse, but I can't find my phone.

My phone is: "Kazam TV 45" (Android 4.4.2).

How can I solve this?

----------

## miket

Funny, I made a reply at first to your message describing how to enable USB debugging.  Only when I submitted it that I noticed that you had already enabled it.  So rather than give you useless directions, it's time for help at the step where you are.

You *could* set up udev rules to let you recognize the device, but you may get away without that.  ADB has to know about the device, though.  Look to the file ~/.android/adb_usb.ini  If your phone doesn't have a definition preset in ADB, somehow the USB ID of your phone will have to get into this file.  The file has a comment telling not to edit the file but instead run android update adb.  There's some magic involved at this point I don't know--you'll have to search for that yourself.  In any event, this should get you started.

----------

## Eiji

 *Quote:*   

> You *could* set up udev rules to let you recognize the device, but you may get away without that. ADB has to know about the device, though.

 

I found this:  *Quote:*   

> All I need for adb to work is to emerge dev-util/android-tools . Never created udev-rules manually, nor did I need any extra java-library. You could try to install it trough portage too or take a look in the ebuild.

  at https://forums.gentoo.org/viewtopic-t-977256-start-0.html, so I don't think udev rules could solve it.

 *Quote:*   

> Look to the file ~/.android/adb_usb.ini If your phone doesn't have a definition preset in ADB, somehow the USB ID of your phone will have to get into this file. The file has a comment telling not to edit the file but instead run android update adb. There's some magic involved at this point I don't know--you'll have to search for that yourself. In any event, this should get you started.

 

1. I don't have file: "~/.android/adb_usb.ini".

2. I don't have "android" command.

----------

## fedeliallalinea

 *Eiji wrote:*   

> 2. I don't have "android" command.

 

You need to install dev-util/android-sdk-update-manager

----------

## Eiji

 *fedeliallalinea wrote:*   

>  *Eiji wrote:*   2. I don't have "android" command. 
> 
> You need to install dev-util/android-sdk-update-manager

 I think this is not a problem.

 *Quote:*   

> All I need for adb to work is to emerge dev-util/android-tools . Never created udev-rules manually, nor did I need any extra java-library. You could try to install it trough portage too or take a look in the ebuild.

 So other users can connect phone without this package, see: https://forums.gentoo.org/viewtopic-t-977256-start-0.html.

or:

Is this package required with some phone models? What you think about it?

----------

## miket

Well, here is time for a Wild Ass Guess.  I do have android-update-manager, so I do have an android command.  I've never installed dev-util/android-tools, so I can't vouch for how that package works.  I can presume that, as the package description asserts, it supplies the complete adb binary and not a reduced-function one.  I can tell you that android-update-manager does supply adb.

The adb installed with android-update-manager looks to configuration files in the ~/.android directory.  It could be that adb installed with android-tools still looks there but does not create the directory and file if they are not there already. You might get around that.

Try creating a .android directory in your home directory and then populating it with an adb_usb.ini file.  This is the basic contents of that file:

```
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.

# USE 'android update adb' TO GENERATE.

# 1 USB VENDOR ID PER LINE.
```

On one machine I have, that's all that's present in the file.  In another machine, one which I had set up years before, I also find one of those vendor ID's expressed as a c-language hex literal (hex digits prefixed with 0x).

Try executing this line in your home directory.

```
mkdir -p .android; echo '0x2970' >.android/adb_usb.ini
```

That sets up that adb_usb.ini file with your device's vendor ID.  Maybe this will get adb to recognize your device.

Edit to add:  Be sure to kill the adb background process before attempting to run adb after you make this change.  You want to be sure that adb really has a chance to read the new configuration before starting up:

```
killall adb
```

----------

## fedeliallalinea

If doesn't work miket's suggestion, I would try to create udev rule

```
# echo "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"2970\", MODE=\"0666\"" >> /etc/udev/rules.d/51-android.rules
```

time ago I did for a device that wasn't detected from adb (unfortunately I don't have anymore this device for a test)

EDIT: I always used dev-util/android-sdk-update-manager not dev-util/android-tools

----------

## Eiji

@miket: thx, now I can see my device and access shell to it.

Can you link to a good tutorial about how to root my phone with these packages? I tried some tutorials, but can't do it.

----------

## miket

 *Eiji wrote:*   

> Can you link to a good tutorial about how to root my phone with these packages? I tried some tutorials, but can't do it.

 

The trouble with Android rooting is that there nothing even close to a consistent, clear-cut way to do it.  Sometimes a manufacturer is careless and ships the product already rooted.  Very often someone has found a vulnerability in the hardware or software that can be exploited in order to gain root access.  Sometimes the manufacturer of the device allows the user to alter the bootloader to open root access to the device.  There is no single path; it generally comes down to the luck of the draw.

You've got a device I hadn't even heard of.  You'll have to do research.  Try doing internet searches mentioning your device name and the word "root".  Yes indeed, it may be that tools like adb could help you.  You could use it to load an .apk like Kingo or Superuser after having enabled loading by other sources (the command is adb install.)  On the other hand, your path to rooting might use some other tool.  All I can do at this point is wish you luck.

----------

