, ,

For cordova application, which i’ve an android platform

cordova run

runs the application in mobile directly in MAC OS. when i tried to connect mobile in ubuntu and ran, it didn’t work! adb devices showed nothing in list of devices attached.

we have to define rules so that to connect to that device.

use lsusb command to list devices. This will result in many devices connected,

 Bus 002 Device 037: ID 0fce:019e Sony Ericsson Mobile Communications AB

ofce is idVendor and 019e is idproduct

or download the file for 51-andorid.rules from http://www.joescat.com/linux/android_rules.html

sudo udevadm control --reload-rules

Now remove the mobile and reconnect it. and try

adb devices

if you still see this

List of devices attached 
???????????? no permissions

Edit the file 51-android.rules to /etc/udev/rules.d [temporary rules directory] and add the line

ATTRS{idVendor}==”0fce”, ATTRS{idProduct}==”519e”, ENV{adb_matched}=”yes”

change the last but third line from GROUP=”usb” to

SYMLINK+="android_adb", MODE="0664", GROUP="plugdev"

now reload rules and reconnect mobile. It should list a device with its id in adb devices.

it worked without adb kill-server and adb start-server, but if still didn’t update you can do that.

More info: