-

hey viewer, we're moving!

We are currently transitioning to a new web system, so we are not updating this wikisite anymore.

The public part of the new web system is available at http://www.ira.disco.unimib.it


Android developement

From Irawiki

Jump to: navigation, search

Contents

Set the UDEV rules

Create an udev rule for android phones:

sudo vim /etc/udev/rules.d/51-android.rules

Paste the following line for each vendor (this example is for HTC):

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" 

Change permissions:

sudo chmod a+r /etc/udev/rules.d/51-android.rules

General commands

adb devices - list of connected devices
adb shell pm list packages -f - list all the packages already installed on the device
adb install PATH_TO_YOUR_PACKAGE.apk - installs the .apk package on the device
adb uninstall NAME_OF_YOUR_PACKAGE - uninstalls the package. NB: the NAME_OF_YOUR_PACKAGE must be the same as listed with `adb shell pm list packages -f`
adb logcat - displays logs from the device (More details)
adb shell am start -n com.package.name/com.package.name.ActivityName; adb logcat | grep YOUR_LOG_TAG - launches the app, starts a logcat and greps it by the log tag specified while calling e.g. Log.i(YOUR_LOG_TAG,"Your log message!") in your code

ROS Android

Setup the environment

OpenCV Android

Install OpenCV and import in Eclipse

Personal tools