17

My device is Alcatel OneTouch 890 with Android 2.1. I configured in 51-android.rules in rules.d of /etc/udev folder.

My operation system is Ubuntu.

I enabled the usb debugging mode in my device.

HTC and Samsung devices are detecting, but not my Alcatel,

Here is my 51-android.rules file.

#HTC
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
#samsung 
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb_device", SYSFS{idVendor}==”04e8”,ATTRS{idProduct}=="689e", MODE="0666",OWNER="abcd"
#alcatel
SUBSYSTEM=="usb", SYSFS{idVendor}=="1bbb", MODE="0666"
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="1bbb", MODE="0666"


root@abcd:/home/abcd# lsusb
Bus 005 Device 002: ID 0461:4d15 Primax Electronics, Ltd Dell Optical Mouse
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 1bbb:00f2 T & A Mobile Phones  // what is T & A in this line....?
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@abcd:/home/abcd# Android/android-sdk-linux_86/platform-tools/adb devices
List of devices attached 
Franci Penov
  • 74,861
  • 18
  • 132
  • 169
Noby
  • 6,562
  • 9
  • 40
  • 63
  • Have you tried starting ddms parallel to your eclipse? That sometimes works for me. – Maggie Oct 06 '11 at 09:32
  • No, can you please describe more...! – Noby Oct 06 '11 at 09:58
  • go to you android sdk folder, open tools, start ddms. In ddms, your device should be recognized. once it was recognized, eclipse will recognize it as well. – Maggie Oct 06 '11 at 10:04
  • there is no ddms in my tools folder..! But in Eclipse i have a window called DDMS...! and There my device is not recognizing...! – Noby Oct 06 '11 at 10:12
  • weird... I am not familiar with Linux, tough. Can you try in Eclipse: Window > Open Perspective > Other... > DDMS ? – Maggie Oct 06 '11 at 10:14
  • on Linux, afaik, you should run "./ddms" from your tools folder – Maggie Oct 06 '11 at 10:20
  • Ya i am getting the DDMS window...! but in devices list my device is not there.. – Noby Oct 06 '11 at 10:24
  • Why does your 51-android.rules file use the unicode `”` mark rather than the ASCII `"` mark? Also, check your current user has `udev` permission. – Dave Oct 06 '11 at 12:17
  • you are right, i used defferent ”. but after changing them also my device is not recognizin.... any further help...? – Noby Oct 06 '11 at 13:01
  • possible duplicate of [Why ADB Ubuntu does not recognize my device?](http://stackoverflow.com/questions/21117590/why-adb-ubuntu-does-not-recognize-my-device) – TuGordoBello Sep 13 '14 at 19:50

9 Answers9

13

First, check the kind of quotes you are using in your udev rules. It looks like you might be using non-ASCII double quotes. See the difference between the quotes around usb and usb_device, etc.

SUBSYSTEM=="usb", SYSFS{idVendor}=="1bbb", MODE="0666"
SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”1bbb”, MODE="0666"

You can also just use sudo with ADB, as suggested by @JeremyD. Doing that makes this file essentially irrelevant.

Second,

  1. Edit ~/.android/adb_usb.ini (or if you are running as root, check /root/.android)
  2. If the file already exists, add 0x1bbb to the end; otherwise do: echo 0x1bbb >> adb_usb.ini
  3. adb kill-server
  4. adb start-server
  5. Check output of adb devices for your device

Hope this helps.

Joel F
  • 2,591
  • 1
  • 19
  • 17
  • ~/.android/adb_usb.ini where can i find this...? – Noby Oct 06 '11 at 12:45
  • The ~ is Linux shorthand for your home directory. You can directly use it in a `cd` command, for instance. – Joel F Oct 06 '11 at 13:13
  • And actually if you use `sudo` I'm not entirely sure if it still looks in your user's home directory or if it looks in /root/.android. You might have to try both, but do it in your own user directory first. – Joel F Oct 06 '11 at 13:15
  • i searched entire my system, i never found "adb_usb.ini" where can i find this...? – Noby Oct 06 '11 at 13:21
  • If your Linux username is "noby" (for example), then you should definitely have a directory called `/home/noby/.android`. If `adb_usb.ini` does not exist in that directory, then just create it, with `0x1bbb` as the only contents. – Joel F Oct 06 '11 at 15:10
  • root@fstech032:/home/fstech/Android/android-sdk-linux_86/ this is my android sdk path. and i dont have anything like .android/adb_usb.ini – Noby Oct 06 '11 at 16:36
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/4073/discussion-between-joel-f-and-noby) – Joel F Oct 06 '11 at 16:55
  • Thank you! That works for me, too. However, just editing the `~/.android/adb_usb.ini` is not enough. In order to see the device under `adb devices` as a root AND normal user, I had to add `adb_usb.ini` to `/root/.android` first with the command `echo 0x1bbb >> adb_usb.ini` (see chat). I actually just added the file inside `/root` and it still worked. – Stefan Anca Oct 14 '12 at 21:25
  • This is the right answer, but -1 for endorsing running adb as root as an option. – Chris Stratton Jan 14 '14 at 21:17
  • @StefanAnca - you really should not be running the Android tools as root, hence no need to create a .android file for root – Chris Stratton Jan 15 '14 at 15:28
7

Alcatel OneTouch 891 - Android 2.1

Reading these helpful tips and some other posts about setting the Android device I wrote down a step by step tutorial how to get the device ready.

Edit the ~/.android/adb_usb.ini and append 0x1bbb line at the bottom.

This will list:

$ adb devices
List of devices attached
???????????? no permissions

Steps to make it working:
Add your self to the group
Install a 51-android.rules package for your distro, then open the file:
/etc/udev/rules.d/51-android.rules

** if it's not there, list the package files and locate this file.

Append the following section under a comment section called OneTouch or whatever you want to name it:

SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”1bbb”, MODE="0666"

So, the result would be:

# Alcatel OneTouch 891
SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”1bbb”, MODE="0666"

Save the file!
Replug USB of the device several times, then restart the adb daemon:
Distro specific:

  • Archlinux

    $ rc.d restart adb

  • ubuntu, redhat, fedora, centos

    $ service adb restart

Or manually:

$ adb kill-server
$ adb start-server

$ adb devices

will list your device.

Finally:

My results showing in bash:

$ adb devices
List of devices attached
0123456789ABCDEF device

  • If still no results: run this command:

    $ udevadm trigger

then replug your device again. or simply reboot.

Proof:


Dalvik:
http://wstaw.org/m/2011/11/13/plasma-desktopos8794.jpg
File Manager:
http://wstaw.org/m/2011/11/13/plasma-desktopgt8794.jpg

Bo Persson
  • 90,663
  • 31
  • 146
  • 203
Damjan Dimitrioski
  • 679
  • 2
  • 9
  • 20
  • Very useful post Bo. Do you know how I can enable this on Windows 7? I tried adding the 0x1bbb in the .android/adb_usb.ini, but no success. – Tomislav Markovski Dec 08 '11 at 03:12
4

Try to kill and start the adb server after closing eclipse.

So try :

  1. close eclipse
  2. go to platform-tools directory
  3. do : sudo ./adb kill-server
  4. disable the development debugging on your phone
  5. enable it again
  6. do : sudo ./adb start-server
  7. do : ./adb devices

It should work. I had this problem several times and by doing this it was working after doing instructions I give you.

Hope it is helping!

EDIT: That might be not working as most of the android developers moved to Android studio and other emulators.

Jeremy D
  • 4,787
  • 1
  • 31
  • 38
  • I felt happy when see this answer but still its not working...! – Noby Oct 05 '11 at 08:01
  • root@fstech032:/home/fstech/Android/android-sdk-linux_86/platform-tools# sudo ./adb kill-server root@fstech032:/home/fstech/Android/android-sdk-linux_86/platform-tools# sudo ./adb start-server * daemon not running. starting it now on port 5037 * * daemon started successfully * root@fstech032:/home/fstech/Android/android-sdk-linux_86/platform-tools# ./adb devices List of devices attached root@fstech032:/home/fstech/Android/android-sdk-linux_86/platform-tools# – Noby Oct 05 '11 at 08:02
  • Hmm.. really strange. And in Eclipse, your device appears with an interrogation mark? Offline? or nothing at all in Windows > Avd manager ? – Jeremy D Oct 05 '11 at 23:55
  • No where my phone is detecting except at one place that, when i type "lsusb" command my phone is detecting but no where else. – Noby Oct 06 '11 at 07:42
  • and you're sure about modifications you've done in the 51-android-rules file? – Jeremy D Oct 06 '11 at 19:27
  • ya.. i changed the the quotes...! – Noby Oct 07 '11 at 05:56
3

check this out

http://developer.android.com/guide/developing/device.html#setting-up

it is weird that alcatel isn't included

Ahmed Salem
  • 3,947
  • 1
  • 21
  • 40
1

I also have an Alcatel Phone and I solve this issue by following:

1.#lsusb

Bus 002 Device 021: ID 18d1:0002 Google Inc. //This is my alcatel phone

2.Add following to /etc/udev/rules.d/51-android.rules:

SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="0002", MODE="0666"

Note:I noticed that expected "idVendor", you also need to add "idProduct".

3.#sudo service udev restart

4.Unplug the phone and plug again.

5.#adb devices

List of devices attached

TCL-Martini device

wayne_bai
  • 1,218
  • 4
  • 14
  • 23
1

I know the accepted answer worked for the OP, but for people having this issue in the future where the above answers do not work, the following worked for me.

This universal udev rule -

ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:ff420?:*", MODE="0666"

from this question - ADB not detecting device samsung i777 in ubuntu 12.04

Helped me solve this problem on a "BLU Dash Jr" phone (vendor = Spreadtrum) as mentioned in my related question here:

Spreadtrum (Vendor ID 1782) Issues Connecting to adb

Community
  • 1
  • 1
jjmilburn
  • 380
  • 3
  • 12
1

For those who would be interested to find out a perrenial solution for adb recognizing devices on CentOS, I found a solution.

First, running adb as root is NOT a good solution, because adb may be restarted by any user at any moment ; even IDE auto-restarts adb, and then adb is blind again.

My solution was to create a group "adb", and add my user to this group. Then in 51-android-rules, add the GROUP like this :

SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666", GROUP="adb"

Reload udev rules. If you are using a gnome session, restart your session because gnome holds a cache upon your groups...

Open a new xterm, verify that you belong to the adb group : $ groups

Then $ adb devices should start adb server then identify your devices.

darkhi
  • 11
  • 1
0

In your device make sure you are using your usb interface as MTP or PTP. Some times it starts with mass storage interface by default an seems that adb is not granted permission to access the device.

Pablo Valdes
  • 734
  • 8
  • 19
0

I use ArchLinux I Installed this package: https://aur.archlinux.org/packages.php?ID=51476 it installed all rules I need more details on arch and android: https://wiki.archlinux.org/index.php/Android

Ahmed Aswani
  • 8,271
  • 7
  • 33
  • 54