Monday, 25 May 2015

Connecting Android Device to Android Studio

Enable USB debugging on the phone.

If you see the RSA pop up then everything is fine and you can proceed.

However if you don't, then follow the steps to setup the device

Run the command:
adb devices

If you see "??????   no permissions" , then follow on:

- Connect the device and type the command:

- You can see the vendorId: productId of usbs. You can check which one is your phone by removing the phone and again executing to see which one vanished.

-Now edit this file as root (or create if doesn't exists)
Then add these two lines:

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4" , ATTR{idProduct}=="0c03" , MODE="0666" , GROUP="plugdev"
SUBSYSTEM=="usb", SYSFS{product}=="Android Phone", MODE="0666"

Replace idvendor and idProduct as displayed by lsusb command.

now restart the adb server.

sudo adb kill-server
sudo adb start-server

adb devices
now you should be able to see the device listed.