From 8b23a6c7e1aee255004dd19098d4c2462b61b849 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 3 Mar 2009 19:30:32 -0800 Subject: auto import from //depot/cupcake/@135843 --- android/help.c | 1452 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1452 insertions(+) create mode 100644 android/help.c (limited to 'android/help.c') diff --git a/android/help.c b/android/help.c new file mode 100644 index 0000000..92531d9 --- /dev/null +++ b/android/help.c @@ -0,0 +1,1452 @@ +#include "android/help.h" +#include "android/cmdline-option.h" +#include "android/utils/path.h" +#include "android/utils/bufprint.h" +#include "android/utils/debug.h" +#include "android/utils/misc.h" +#include "android/skin/keyset.h" +#include "android/android.h" +#include +#include "audio/audio.h" +#include +#include + +/* XXX: TODO: put most of the help stuff in auto-generated files */ + +#define PRINTF(...) stralloc_add_format(out,__VA_ARGS__) + +static void +help_virtual_device( stralloc_t* out ) +{ + PRINTF( + " An Android Virtual Device (AVD) models a single virtual\n" + " device running the Android platform that has, at least, its own\n" + " kernel, system image and data partition.\n\n" + + " Only one emulator process can run a given AVD at a time, but\n" + " you can create several AVDs and run them concurrently.\n\n" + + " You can invoke a given AVD at startup using either '-avd '\n" + " or '@', both forms being equivalent. For example, to launch\n" + " the AVD named 'foo', type:\n\n" + + " emulator @foo\n\n" + + " The 'android' helper tool can be used to manage virtual devices.\n" + " For example:\n\n" + + " android avd -- creates a new virtual device.\n" + " android list -- list all virtual devices available.\n\n" + + " Each AVD really corresponds to a content directory which stores\n" + " persistent and writable disk images as well as configuration files.\n" + + " Each AVD must be created against an existing SDK platform or add-on.\n" + " For more information on this topic, see -help-sdk-images.\n\n" + + " SPECIAL NOTE: in the case where you are *not* using the emulator\n" + " with the Android SDK, but with the Android build system, you will\n" + " need to define the ANDROID_PRODUCT_OUT variable in your environment.\n" + " See -help-build-images for the details.\n" + ); +} + + +static void +help_sdk_images( stralloc_t* out ) +{ + PRINTF( + " The Android SDK now supports multiple versions of the Android platform.\n" + " Each SDK 'platform' corresponds to:\n\n" + + " - a given version of the Android API.\n" + " - a set of corresponding system image files.\n" + " - build and configuration properties.\n" + " - an android.jar file used when building your application.\n" + " - skins.\n\n" + + " The Android SDK also supports the concept of 'add-ons'. Each add-on is\n" + " based on an existing platform, and provides replacement or additional\n" + " image files, android.jar, hardware configuration options and/or skins.\n\n" + + " The purpose of add-ons is to allow vendors to provide their own customized\n" + " system images and APIs without needing to package a complete SDK.\n\n" + + " Before using the SDK, you need to create an Android Virtual Device (AVD)\n" + " (see -help-virtual-device for details). Each AVD is created in reference\n" + " to a given SDK platform *or* add-on, and will search the corresponding\n" + " directories for system image files, in the following order:\n\n" + + " - in the AVD's content directory.\n" + " - in the AVD's SDK add-on directory, if any.\n" + " - in the AVD's SDK platform directory, if any.\n\n" + + " The image files are documented in -help-disk-images. By default, an AVD\n" + " content directory will contain the following persistent image files:\n\n" + + " userdata-qemu.img - the /data partition image file\n" + " cache.img - the /cache partition image file\n\n" + + " You can use -wipe-data to re-initialize the /data partition to its factory\n" + " defaults. This will erase all user settings for the virtual device.\n\n" + ); +} + +static void +help_build_images( stralloc_t* out ) +{ + PRINTF( + " The emulator detects that you are working from the Android build system\n" + " by looking at the ANDROID_PRODUCT_OUT variable in your environment.\n\n" + + " If it is defined, it should point to the product-specific directory that\n" + " contains the generated system images.\n" + + " In this case, the emulator will look by default for the following image\n" + " files there:\n\n" + + " - system.img : the *initial* system image.\n" + " - ramdisk.img : the ramdisk image used to boot the system.\n" + " - userdata.img : the *initial* user data image (see below).\n" + " - kernel-qemu : the emulator-specific Linux kernel image.\n\n" + + " If the kernel image is not found in the out directory, then it is searched\n" + " in /prebuilt/android-arm/kernel/.\n\n" + + " Skins will be looked in /development/emulator/skins/\n\n" + + " You can use the -sysdir, -system, -kernel, -ramdisk, -datadir, -data options\n" + " to specify different search directories or specific image files. You can\n" + " also use the -cache and -sdcard options to indicate specific cache partition\n" + " and SD Card image files.\n\n" + + " For more details, see the corresponding -help-