what is the android tool?

satya - Sunday, April 19, 2009 12:05:55 PM

It is used to


list targets
list/create/delete/move virtual devices
create/update projects

satya - Sunday, April 19, 2009 12:06:25 PM

How is the create project used with android tool?

How is the create project used with android tool?

Search for: How is the create project used with android tool?

satya - Sunday, April 19, 2009 12:09:37 PM

what is a target?

Describes an API. Gets a number. For example each SDK gets its own target number. Each add on gets its own number.

satya - Sunday, April 19, 2009 12:10:32 PM

Example android list targets will print out the following


C:\satya\i\android15\tools>android list targets
Available Android targets:
[1] Android 1.1
     API level: 2
     Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
[2] Android 1.5
     API level: 3
     Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
[3] Add-on: Google APIs
     Vendor: Google Inc.
     Description: Android + Google APIs
     Based on Android 1.5 (API level 3)
     Libraries:
     * com.google.android.maps (maps.jar)
         API for Google Maps
     Skins: QVGA-P, HVGA-L, HVGA (default), QVGA-L, HVGA-P

satya - Sunday, April 19, 2009 12:11:28 PM

How are target numbers used in Android?

How are target numbers used in Android?

Search for: How are target numbers used in Android?

satya - Sunday, April 19, 2009 12:11:45 PM

How do you create targets?

How do you create targets?

Search for: How do you create targets?

satya - Sunday, April 19, 2009 12:26:36 PM

what is a AVD?

Stands for Android Virtual Device

a named configuration to start the emulator with on which you want to run a specific SDK or more broadly a target as pointed above. Also allows the specifications such as an SD card etc.

satya - Sunday, April 19, 2009 12:27:05 PM

AVD creation options should make this clear


Action "create avd":
  Creates a new Android Virtual Device.
Options:
  -t --target   Target id of the new AVD [required]
  -c --sdcard   Path to a shared SD card image, or size of 
                a new sdcard for the new AVD
  -p --path     Location path of the directory where the 
                new AVD will be created
  -n --name     Name of the new AVD [required]
  -f --force    Force creation (override an existing AVD) (false)
  -s --skin     Skin of the new AVD

satya - Sunday, April 19, 2009 12:38:26 PM

Example of creating an avd


i:\android15\tools>android create avd -t 3 -c 32M -p ..\avds\avd3 -n avd 3
Created AVD 'avd3' based on Google APIs (Google Inc.)

satya - Sunday, April 19, 2009 12:38:39 PM

Notice the arguments are single letters

Notice the arguments are single letters

satya - Sunday, April 19, 2009 12:39:45 PM

With this you will get


i:\android15\tools>android list avds
Available Android Virtual Devices:
    Name: avd3
    Path: C:\satya\i\android15\tools\..\avds\avd3
  Target: Google APIs (Google Inc.)
          Based on Android 1.5 (API level 3)
    Skin: HVGA
  Sdcard: 32M

satya - Sunday, April 19, 2009 12:40:27 PM

Is it necessary to say multiple targets for an AVD?

Is it necessary to say multiple targets for an AVD?

Search Google for: Is it necessary to say multiple targets for an AVD?

Search Android Developers Group for: Is it necessary to say multiple targets for an AVD?

Search Android Beginers Group for: Is it necessary to say multiple targets for an AVD?

Search Google Code for: Is it necessary to say multiple targets for an AVD?

Search Android Issues Database for: Is it necessary to say multiple targets for an AVD?

satya - Sunday, April 19, 2009 12:46:18 PM

emulator -help-virtual-device


C:\satya\i\android15\tools>emulator -help-virtual-device

  An Android Virtual Device (AVD) models a single virtual
  device running the Android platform that has, at least, its own
  kernel, system image and data partition.

  Only one emulator process can run a given AVD at a time, but
  you can create several AVDs and run them concurrently.

  You can invoke a given AVD at startup using either '-avd <name>'
  or '@<name>', both forms being equivalent. For example, to launch
  the AVD named 'foo', type:

      emulator @foo

  The 'android' helper tool can be used to manage virtual devices.
  For example:

    android create avd -n <name> -t 1  # creates a new virtual device.
    android list avd                   # list all virtual devices available.

  Try 'android --help' for more commands.

  Each AVD really corresponds to a content directory which stores
  persistent and writable disk images as well as configuration files.
  Each AVD must be created against an existing SDK platform or add-on.
  For more information on this topic, see -help-sdk-images.

  SPECIAL NOTE: in the case where you are *not* using the emulator
  with the Android SDK, but with the Android build system, you will
  need to define the ANDROID_PRODUCT_OUT variable in your environment.
  See -help-build-images for the details.

satya - Sunday, April 19, 2009 12:49:55 PM

emulator -help-sdk-images


C:\satya\i\android15\tools>emulator -help-sdk-images

  The Android SDK now supports multiple versions of the Android platform.
  Each SDK 'platform' corresponds to:

    - a given version of the Android API.
    - a set of corresponding system image files.
    - build and configuration properties.
    - an android.jar file used when building your application.
    - skins.

  The Android SDK also supports the concept of 'add-ons'. Each add-on is
  based on an existing platform, and provides replacement or additional
  image files, android.jar, hardware configuration options and/or skins.

  The purpose of add-ons is to allow vendors to provide their own customized
  system images and APIs without needing to package a complete SDK.

  Before using the SDK, you need to create an Android Virtual Device (AVD)
  (see -help-virtual-device for details). Each AVD is created in reference
  to a given SDK platform *or* add-on, and will search the corresponding
  directories for system image files, in the following order:

    - in the AVD's content directory.
    - in the AVD's SDK add-on directory, if any.
    - in the AVD's SDK platform directory, if any.

  The image files are documented in -help-disk-images. By default, an AVD
  content directory will contain the following persistent image files:

     userdata-qemu.img     - the /data partition image file
     cache.img             - the /cache partition image file

  You can use -wipe-data to re-initialize the /data partition to its factory
  defaults. This will erase all user settings for the virtual device.

satya - Sunday, April 19, 2009 12:54:10 PM

emulator -help-disk-images


C:\satya\i\android15\tools>emulator -help-disk-images

  The emulator needs several key image files to run appropriately.
  Their exact location depends on whether you're using the emulator
  from the Android SDK, or not (more details below).

  The minimal required image files are the following:

    kernel-qemu      the emulator-specific Linux kernel image
    ramdisk.img      the ramdisk image used to boot the system
    system.img       the *initial* system image
    userdata.img     the *initial* data partition image

  It will also use the following writable image files:

    userdata-qemu.img  the persistent data partition image
    system-qemu.img    an *optional* persistent system image
    cache.img          an *optional* cache partition image
    sdcard.img         an *optional* SD Card partition image

  If you use a virtual device, its content directory should store
  all writable images, and read-only ones will be found from the
  corresponding platform/add-on directories. See -help-sdk-images
  for more details.

  If you are building from the Android build system, you should
  have ANDROID_PRODUCT_OUT defined in your environment, and the
  emulator shall be able to pick-up the right image files automatically.
  See -help-build-images for more details.

  If you're neither using the SDK or the Android build system, you
  can still run the emulator by explicitely providing the paths to
  *all* required disk images through a combination of the following
  options: -sysdir, -datadir, -kernel, -ramdisk, -system, -data, -cache
  and -sdcard

  The actual logic being that the emulator should be able to find all
  images from the options you give it.

  For more detail, see the corresponding -help-<option> entry.

  Other related options are:

      -init-data   Specify an alernative *initial* user data image

      -wipe-data   Copy the content of the *initial* user data image
                   (userdata.img) into the writable one (userdata-qemu.img)

      -no-cache    do not use a cache partition, even if one is
                   available.

satya - Tuesday, April 28, 2009 5:19:37 PM

adb tool documentation from the current release

adb tool documentation

satya - Monday, October 19, 2009 9:17:09 AM

Approach for creating a new avd


//you can use the following to list avds
android list avds

//you can use the following command to delete an avd
android delete avd -n your-avd-name
//make sure the emulator is not running and even possibly eclipse

//use the following to list your targets
android list targets

//then issue the following command to create an avd
android create avd -t 3 -c 32M -p ..\avds\avd3 -n your-avd-name

//here are the relevent args
where

-t is target
-c amount of sd card storage
-p path
-n name of the avd