cmdline-options.h revision 318e4f294c181df33cf2541763904565b29bcccb
105436638acc7c010349a69c3395f1a57c642dc62Ying Wang/* this header file can be included several times by the same source code.
205436638acc7c010349a69c3395f1a57c642dc62Ying Wang * it contains the list of support command-line options for the Android
305436638acc7c010349a69c3395f1a57c642dc62Ying Wang * emulator program
405436638acc7c010349a69c3395f1a57c642dc62Ying Wang */
505436638acc7c010349a69c3395f1a57c642dc62Ying Wang#ifndef OPT_PARAM
605436638acc7c010349a69c3395f1a57c642dc62Ying Wang#error OPT_PARAM is not defined
705436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
805436638acc7c010349a69c3395f1a57c642dc62Ying Wang#ifndef OPT_LIST
905436638acc7c010349a69c3395f1a57c642dc62Ying Wang#error OPT_LIST is not defined
1005436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
1105436638acc7c010349a69c3395f1a57c642dc62Ying Wang#ifndef OPT_FLAG
1205436638acc7c010349a69c3395f1a57c642dc62Ying Wang#error OPT_FLAG is not defined
1305436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
1405436638acc7c010349a69c3395f1a57c642dc62Ying Wang#ifndef CFG_PARAM
1505436638acc7c010349a69c3395f1a57c642dc62Ying Wang#define CFG_PARAM  OPT_PARAM
1605436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
1705436638acc7c010349a69c3395f1a57c642dc62Ying Wang#ifndef CFG_FLAG
1805436638acc7c010349a69c3395f1a57c642dc62Ying Wang#define CFG_FLAG   OPT_FLAG
1905436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
2005436638acc7c010349a69c3395f1a57c642dc62Ying Wang
2105436638acc7c010349a69c3395f1a57c642dc62Ying Wang/* required to ensure that the CONFIG_XXX macros are properly defined */
2205436638acc7c010349a69c3395f1a57c642dc62Ying Wang#include "android/config/config.h"
2305436638acc7c010349a69c3395f1a57c642dc62Ying Wang
2405436638acc7c010349a69c3395f1a57c642dc62Ying Wang/* Some options acts like flags, while others must be followed by a parameter
2505436638acc7c010349a69c3395f1a57c642dc62Ying Wang * string. Nothing really new here.
2605436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
2705436638acc7c010349a69c3395f1a57c642dc62Ying Wang * Some options correspond to AVD (Android Virtual Device) configuration
2805436638acc7c010349a69c3395f1a57c642dc62Ying Wang * and will be ignored if you start the emulator with the -avd <name> flag.
2905436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
3005436638acc7c010349a69c3395f1a57c642dc62Ying Wang * However, if you use them with -avd-create <name>, these options will be
3105436638acc7c010349a69c3395f1a57c642dc62Ying Wang * recorded into the new AVD directory. Once an AVD is created, there is no
3205436638acc7c010349a69c3395f1a57c642dc62Ying Wang * way to change these options.
3305436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
3405436638acc7c010349a69c3395f1a57c642dc62Ying Wang * Several macros are used to define options:
3505436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
3605436638acc7c010349a69c3395f1a57c642dc62Ying Wang *    OPT_FLAG( name, "description" )
3705436638acc7c010349a69c3395f1a57c642dc62Ying Wang *       used to define a non-config flag option.
3805436638acc7c010349a69c3395f1a57c642dc62Ying Wang *       * 'name' is the option suffix that must follow the dash (-)
3905436638acc7c010349a69c3395f1a57c642dc62Ying Wang *          as well as the name of an integer variable whose value will
4005436638acc7c010349a69c3395f1a57c642dc62Ying Wang *          be 1 if the flag is used, or 0 otherwise.
4105436638acc7c010349a69c3395f1a57c642dc62Ying Wang *       * "description" is a short description string that will be
4205436638acc7c010349a69c3395f1a57c642dc62Ying Wang *         displayed by 'emulator -help'.
4305436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
4405436638acc7c010349a69c3395f1a57c642dc62Ying Wang *    OPT_PARAM( name, "<param>", "description" )
4505436638acc7c010349a69c3395f1a57c642dc62Ying Wang *       used to define a non-config parameter option
4605436638acc7c010349a69c3395f1a57c642dc62Ying Wang *        * 'name' will point to a char* variable (NULL if option is unused)
4705436638acc7c010349a69c3395f1a57c642dc62Ying Wang *        * "<param>" is a template for the parameter displayed by the help
4805436638acc7c010349a69c3395f1a57c642dc62Ying Wang *        * 'varname' is the name of a char* variable that will point
4905436638acc7c010349a69c3395f1a57c642dc62Ying Wang *          to the parameter string, if any, or will be NULL otherwise.
5005436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
5105436638acc7c010349a69c3395f1a57c642dc62Ying Wang *    CFG_FLAG( name, "description" )
5205436638acc7c010349a69c3395f1a57c642dc62Ying Wang *        used to define a configuration-specific flag option.
5305436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
5405436638acc7c010349a69c3395f1a57c642dc62Ying Wang *    CFG_PARAM( name, "<param>", "description" )
5505436638acc7c010349a69c3395f1a57c642dc62Ying Wang *        used to define a configuration-specific parameter option.
5605436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
5705436638acc7c010349a69c3395f1a57c642dc62Ying Wang * NOTE: Keep in mind that optio names are converted by translating
5805436638acc7c010349a69c3395f1a57c642dc62Ying Wang *       dashes into underscore.
5905436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
6005436638acc7c010349a69c3395f1a57c642dc62Ying Wang *       This means that '-some-option' is equivalent to '-some_option'
6105436638acc7c010349a69c3395f1a57c642dc62Ying Wang *       and will be backed by a variable name 'some_option'
6205436638acc7c010349a69c3395f1a57c642dc62Ying Wang *
6305436638acc7c010349a69c3395f1a57c642dc62Ying Wang */
6405436638acc7c010349a69c3395f1a57c642dc62Ying Wang
6505436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( sysdir,  "<dir>",  "search for system disk images in <dir>" )
6605436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( system,  "<file>", "read initial system image from <file>" )
6705436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( datadir, "<dir>",  "write user data into <dir>" )
6805436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( kernel,  "<file>", "use specific emulated kernel" )
6905436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( ramdisk, "<file>", "ramdisk image (default <system>/ramdisk.img" )
7005436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( image,   "<file>", "obsolete, use -system <file> instead" )
7105436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( init_data, "<file>", "initial data image (default <system>/userdata.img" )
7205436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( initdata, "<file>", "same as '-init-data <file>'" )
7305436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( data,     "<file>", "data image (default <datadir>/userdata-qemu.img" )
7405436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( partition_size, "<size>", "system/data partition size in MBs" )
7505436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( cache,    "<file>", "cache partition image (default is temporary file)" )
7605436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_FLAG ( no_cache, "disable the cache partition" )
7705436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_FLAG ( nocache,  "same as -no-cache" )
7805436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( sdcard, "<file>", "SD card image (default <system>/sdcard.img")
7905436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( wipe_data, "reset the use data image (copy it from initdata)" )
8005436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( avd, "<name>", "use a specific android virtual device" )
8105436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( skindir, "<dir>", "search skins in <dir> (default <system>/skins)" )
8205436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( skin, "<name>", "select a given skin" )
8305436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_FLAG ( no_skin, "don't use any emulator skin" )
8405436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_FLAG ( noskin, "same as -no-skin" )
8505436638acc7c010349a69c3395f1a57c642dc62Ying WangCFG_PARAM( memory, "<size>", "physical RAM size in MBs" )
8605436638acc7c010349a69c3395f1a57c642dc62Ying Wang
8705436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( netspeed, "<speed>", "maximum network download/upload speeds" )
8805436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( netdelay, "<delay>", "network latency emulation" )
8905436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( netfast, "disable network shaping" )
9005436638acc7c010349a69c3395f1a57c642dc62Ying Wang
9105436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( trace, "<name>", "enable code profiling (F9 to start)" )
9205436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( show_kernel, "display kernel messages" )
9305436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( shell, "enable root shell on current terminal" )
9405436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( no_jni, "disable JNI checks in the Dalvik runtime" )
9505436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( nojni, "same as -no-jni" )
9605436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( logcat, "<tags>", "enable logcat output with given tags" )
9705436638acc7c010349a69c3395f1a57c642dc62Ying Wang
9805436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( no_audio, "disable audio support" )
9905436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( noaudio,  "same as -no-audio" )
10005436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( audio,    "<backend>", "use specific audio backend" )
10105436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( audio_in, "<backend>", "use specific audio input backend" )
10205436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( audio_out,"<backend>", "use specific audio output backend" )
10305436638acc7c010349a69c3395f1a57c642dc62Ying Wang
10405436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( raw_keys, "disable Unicode keyboard reverse-mapping" )
10505436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( radio, "<device>", "redirect radio modem interface to character device" )
10605436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( port, "<port>", "TCP port that will be used for the console" )
10705436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( ports, "<consoleport>,<adbport>", "TCP ports used for the console and adb bridge" )
10805436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( onion, "<image>", "use overlay PNG image over screen" )
10905436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( onion_alpha, "<%age>", "specify onion-skin translucency" )
11005436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( onion_rotation, "0|1|2|3", "specify onion-skin rotation" )
11105436638acc7c010349a69c3395f1a57c642dc62Ying Wang
11205436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( scale, "<scale>", "scale emulator window" )
11305436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( dpi_device, "<dpi>", "specify device's resolution in dpi (default "
11405436638acc7c010349a69c3395f1a57c642dc62Ying Wang            STRINGIFY(DEFAULT_DEVICE_DPI) ")" )
11505436638acc7c010349a69c3395f1a57c642dc62Ying Wang
11605436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( http_proxy, "<proxy>", "make TCP connections through a HTTP/HTTPS proxy" )
11705436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( timezone, "<timezone>", "use this timezone instead of the host's default" )
11805436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( dns_server, "<servers>", "use this DNS server(s) in the emulated system" )
11905436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( cpu_delay, "<cpudelay>", "throttle CPU emulation" )
12005436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( no_boot_anim, "disable animation for faster boot" )
12105436638acc7c010349a69c3395f1a57c642dc62Ying Wang
12205436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG( no_window, "disable graphical window display" )
12305436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG( version, "display emulator version number" )
12405436638acc7c010349a69c3395f1a57c642dc62Ying Wang
12505436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( report_console, "<socket>", "report console port to remote socket" )
12605436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( gps, "<device>", "redirect NMEA GPS to character device" )
12705436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( keyset, "<name>", "specify keyset file name" )
12805436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( shell_serial, "<device>", "specific character device for root shell" )
12905436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_FLAG ( old_system, "support old (pre 1.4) system images" )
13005436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( tcpdump, "<file>", "capture network packets to file" )
13105436638acc7c010349a69c3395f1a57c642dc62Ying Wang
13205436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( bootchart, "<timeout>", "enable bootcharting")
13305436638acc7c010349a69c3395f1a57c642dc62Ying Wang
13405436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_LIST(  prop, "<name>=<value>", "set system property on boot")
13505436638acc7c010349a69c3395f1a57c642dc62Ying Wang
13605436638acc7c010349a69c3395f1a57c642dc62Ying Wang#ifdef CONFIG_NAND_LIMITS
13705436638acc7c010349a69c3395f1a57c642dc62Ying WangOPT_PARAM( nand_limits, "<nlimits>", "enforce NAND/Flash read/write thresholds" )
13805436638acc7c010349a69c3395f1a57c642dc62Ying Wang#endif
13905436638acc7c010349a69c3395f1a57c642dc62Ying Wang
14005436638acc7c010349a69c3395f1a57c642dc62Ying Wang
14105436638acc7c010349a69c3395f1a57c642dc62Ying Wang#undef CFG_FLAG
14205436638acc7c010349a69c3395f1a57c642dc62Ying Wang#undef CFG_PARAM
14305436638acc7c010349a69c3395f1a57c642dc62Ying Wang#undef OPT_FLAG
14405436638acc7c010349a69c3395f1a57c642dc62Ying Wang#undef OPT_PARAM
14505436638acc7c010349a69c3395f1a57c642dc62Ying Wang#undef OPT_LIST
14605436638acc7c010349a69c3395f1a57c642dc62Ying Wang