User Tools

Site Tools


android:devel

Android Development

Setup

  1. Configure virtual and physical devices
    1. Virtual: Create an AVD
    2. Physical: Enable USB-Debugging, enable Debugging in Manifest and add this rule to udev
/etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
$ chmod a+r /etc/udev/rules.d/51-android.rules

Commandline environment

~/bin/android.env
#!/bin/bash
 
BASEDIR=~/local/android-sdk-linux
TOOLS=$BASEDIR/tools
PLATFORM_TOOLS=$BASEDIR/platform-tools
 
export PATH=$TOOLS:$PLATFORM_TOOLS:$PATH
$ source ~/bin/android.env

adb (Android Debug Bridge)

Prerequisites:

  • USB debugging enabled
  • on x86_64:
    • sudo apt-get install lib32stdc++6
    • sudo apt-get install lib32ncurses5
$ adb  # all options
$ adb start-server  # start the remote-adbd; usually not needed!
$ adb push <local-file>  # upload file to phone
$ adb pull <remote-file>  # download file from phone
$ adb shell  # starts a remote-shell
$ adb logcat  # tail-follow system messages
$ adb reboot  # reboot system

Hello World

android/devel.txt · Last modified: 2011-12-03 15:43 CET by dominik