FP2 adb: no devices found on workstation but laptop yes

Hi there! :heart_eyes:

I’m developing a cordova android application and my workstation’ adb can’t recognise the device. I know the os (Ubuntu 14.04 LTS) recognises it:

$ dmesg
[16560.736267] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[16560.736270] usb 3-4: Product: FP2
[16560.736272] usb 3-4: Manufacturer: Fairphone


$ lsusb
Bus 003 Device 024: ID 2ae5:9039


$ adb devices
List of devices attached 


On my laptop (ubuntu 17.04), adb recognises correctly :face_with_raised_eyebrow:
What should I compare?
udev rules? adb versions? some tricky logs?

I’m lost on this subject and ask you for help :fearful: How can I debug this and find the cause?

I would love your help on this subject ^^


Check udev rules. I bet you’re not allowed to access the device nodes
Test with
adb kill-server
sudo adb devices
(Then the server runs as root and is not hindered by permissions)

1 Like

Thanks for the hint. Unfortunately, adb still doesnt recognises the phone :confused:

What I did so far:

  1. Detected the vendor:device ids

$ lsusb
Bus 003 Device 005: ID 2ae5:9039 # this line appears when phone connected

  1. Added a new udev rule (inspired by http://www.janosgyerik.com/adding-udev-rules-for-usb-debugging-android-devices/)
$ cat /etc/udev/rules.d/51-android.rules # check the file
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"

# add a new rule
sudo echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2ae5", MODE="0666", GROUP="plugdev", SYMLINK+="android%n"' >>  /etc/udev/rules.d/51-android.rules

# check the file again
$ cat /etc/udev/rules.d/51-android.rules 
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="2ae5", MODE="0666", GROUP="plugdev", SYMLINK+="android%n"
  1. Restarted udev / adb
$ sudo service udev restart
udev stop/waiting
udev start/running, process 4661
$ adb kill-server
$ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
  1. Made sure the phone was on “mode debugin on”, then plugged the phone.
    Then (unfortunately, adb sill doest recognizes the phone. Even when I start adb with sudo

Note: I updated the android-studio before being aware of the adb problem. Maybe should I try to check if android-studio changed something to adb? Or try to connect adb trhough android-studio?

For the moment, I’ve found a workaround. I don’t know what this means :confused:

  1. build the app with cordova
    $ cordova build android
  2. Launch android-studio and open the project on the cordova platform folder
  3. Rebuild through android-studio
  4. Launch from android-studio

Its annoying but it works. Still, I wonder why adb can’t detect the device :face_with_raised_eyebrow:

A shot in the dark, as I’m not too familiar with Ubuntu, isn’t 14.04 quite old, even as LTS? Maybe it has something to do with the USB drivers

@lklaus Or the adb package from 14.04 may be old too.

@Eldorico Android Studio uses its own adb binary. You can find it (and use it) from <your-android-sdk-path>/platform-tools/adb IIRC.

Thanks @lklaus @Roboe !

My adb seems old and 14.04 is very old too ^^

Using the adb from android-studio solved the problem! Thanks! :grinning:

$ sudo mv /usr/bin/adb /usr/bin/adb_old
$ sudo ln --symbolic /path/androidSdK/platform-tools/adb /usr/bin/adb
$ adb devices 
List of devices attached
f93f647    device

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.