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
[...]
And:
$ lsusb
[…]
Bus 003 Device 024: ID 2ae5:9039
[…]
But
$ adb devices
List of devices attached
$
On my laptop (ubuntu 17.04), adb recognises correctly What should I compare?
udev rules? adb versions? some tricky logs?
I’m lost on this subject and ask you for help How can I debug this and find the cause?
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)
$ 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"
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 *
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?