Monday, July 21, 2014

Setup 51-android.rules for Android SDK

After Install Android SDK on Ubuntu 14.04, you have to setup 51-android.rules, otherwise you cannot connect, download and run your code on real devices.

Refer to the document

- Make sure enable something like Developer options, USB debugging...on your device.

- As root, create/modify the file /etc/udev/rules.d/51-android.rules in your Ubuntu system.

- Add a line in the file
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666", GROUP="plugdev"

where xxxx is the vendor id of your device. You can use the Linux command lsusb to get the vendor id of your device, refer 2:05 of the below video to know how to.

- Run the command to execute it:
$ chmod a+r /etc/udev/rules.d/51-android.rules

After setup /etc/udev/rules.d/51-android.rules, you can download and run your apps on real devices.

No comments: