The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 1 | /* this header file can be included several times by the same source code. |
| 2 | * it contains the list of support command-line options for the Android |
| 3 | * emulator program |
| 4 | */ |
| 5 | #ifndef OPT_PARAM |
| 6 | #error OPT_PARAM is not defined |
| 7 | #endif |
David 'Digit' Turner | 318e4f2 | 2009-05-25 18:01:03 +0200 | [diff] [blame] | 8 | #ifndef OPT_LIST |
| 9 | #error OPT_LIST is not defined |
| 10 | #endif |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 11 | #ifndef OPT_FLAG |
| 12 | #error OPT_FLAG is not defined |
| 13 | #endif |
| 14 | #ifndef CFG_PARAM |
| 15 | #define CFG_PARAM OPT_PARAM |
| 16 | #endif |
| 17 | #ifndef CFG_FLAG |
| 18 | #define CFG_FLAG OPT_FLAG |
| 19 | #endif |
| 20 | |
| 21 | /* required to ensure that the CONFIG_XXX macros are properly defined */ |
David Turner | b58c44e | 2009-03-25 02:42:45 -0700 | [diff] [blame] | 22 | #include "android/config/config.h" |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 23 | |
| 24 | /* Some options acts like flags, while others must be followed by a parameter |
| 25 | * string. Nothing really new here. |
| 26 | * |
| 27 | * Some options correspond to AVD (Android Virtual Device) configuration |
| 28 | * and will be ignored if you start the emulator with the -avd <name> flag. |
| 29 | * |
| 30 | * However, if you use them with -avd-create <name>, these options will be |
| 31 | * recorded into the new AVD directory. Once an AVD is created, there is no |
| 32 | * way to change these options. |
| 33 | * |
| 34 | * Several macros are used to define options: |
| 35 | * |
| 36 | * OPT_FLAG( name, "description" ) |
| 37 | * used to define a non-config flag option. |
| 38 | * * 'name' is the option suffix that must follow the dash (-) |
| 39 | * as well as the name of an integer variable whose value will |
| 40 | * be 1 if the flag is used, or 0 otherwise. |
| 41 | * * "description" is a short description string that will be |
| 42 | * displayed by 'emulator -help'. |
| 43 | * |
| 44 | * OPT_PARAM( name, "<param>", "description" ) |
| 45 | * used to define a non-config parameter option |
| 46 | * * 'name' will point to a char* variable (NULL if option is unused) |
| 47 | * * "<param>" is a template for the parameter displayed by the help |
| 48 | * * 'varname' is the name of a char* variable that will point |
| 49 | * to the parameter string, if any, or will be NULL otherwise. |
| 50 | * |
| 51 | * CFG_FLAG( name, "description" ) |
| 52 | * used to define a configuration-specific flag option. |
| 53 | * |
| 54 | * CFG_PARAM( name, "<param>", "description" ) |
| 55 | * used to define a configuration-specific parameter option. |
| 56 | * |
| 57 | * NOTE: Keep in mind that optio names are converted by translating |
| 58 | * dashes into underscore. |
| 59 | * |
| 60 | * This means that '-some-option' is equivalent to '-some_option' |
| 61 | * and will be backed by a variable name 'some_option' |
| 62 | * |
| 63 | */ |
| 64 | |
| 65 | CFG_PARAM( sysdir, "<dir>", "search for system disk images in <dir>" ) |
| 66 | CFG_PARAM( system, "<file>", "read initial system image from <file>" ) |
| 67 | CFG_PARAM( datadir, "<dir>", "write user data into <dir>" ) |
| 68 | CFG_PARAM( kernel, "<file>", "use specific emulated kernel" ) |
| 69 | CFG_PARAM( ramdisk, "<file>", "ramdisk image (default <system>/ramdisk.img" ) |
| 70 | CFG_PARAM( image, "<file>", "obsolete, use -system <file> instead" ) |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 71 | CFG_PARAM( initdata, "<file>", "same as '-init-data <file>'" ) |
| 72 | CFG_PARAM( data, "<file>", "data image (default <datadir>/userdata-qemu.img" ) |
The Android Open Source Project | b3ee93a | 2009-03-13 13:04:21 -0700 | [diff] [blame] | 73 | CFG_PARAM( partition_size, "<size>", "system/data partition size in MBs" ) |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 74 | CFG_PARAM( cache, "<file>", "cache partition image (default is temporary file)" ) |
Vladimir Chtchetkine | 6f50aa3 | 2012-04-26 08:20:18 -0700 | [diff] [blame] | 75 | OPT_PARAM( cache_size, "<size>", "cache partition size in MBs" ) |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 76 | CFG_FLAG ( no_cache, "disable the cache partition" ) |
| 77 | CFG_FLAG ( nocache, "same as -no-cache" ) |
| 78 | OPT_PARAM( sdcard, "<file>", "SD card image (default <system>/sdcard.img") |
Ot ten Thije | 353b3b1 | 2010-10-05 17:53:30 +0100 | [diff] [blame] | 79 | OPT_PARAM( snapstorage, "<file>", "file that contains all state snapshots (default <datadir>/snapshots.img)") |
| 80 | OPT_FLAG ( no_snapstorage, "do not mount a snapshot storage file (this disables all snapshot functionality)" ) |
Tim Baverstock | 53d8a5c | 2010-12-02 14:21:39 +0000 | [diff] [blame] | 81 | OPT_PARAM( snapshot, "<name>", "name of snapshot within storage file for auto-start and auto-save (default 'default-boot')" ) |
| 82 | OPT_FLAG ( no_snapshot, "perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage" ) |
| 83 | OPT_FLAG ( no_snapshot_save, "do not auto-save to snapshot on exit: abandon changed state" ) |
| 84 | OPT_FLAG ( no_snapshot_load, "do not auto-start from snapshot: perform a full boot" ) |
Ot ten Thije | ae835ac | 2010-10-18 13:37:37 +0100 | [diff] [blame] | 85 | OPT_FLAG ( snapshot_list, "show a list of available snapshots" ) |
Tim Baverstock | 622b8f4 | 2010-12-07 11:36:59 +0000 | [diff] [blame] | 86 | OPT_FLAG ( no_snapshot_update_time, "do not do try to correct snapshot time on restore" ) |
David 'Digit' Turner | fd59c33 | 2011-03-01 00:48:52 +0100 | [diff] [blame] | 87 | OPT_FLAG ( wipe_data, "reset the user data image (copy it from initdata)" ) |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 88 | CFG_PARAM( avd, "<name>", "use a specific android virtual device" ) |
| 89 | CFG_PARAM( skindir, "<dir>", "search skins in <dir> (default <system>/skins)" ) |
| 90 | CFG_PARAM( skin, "<name>", "select a given skin" ) |
| 91 | CFG_FLAG ( no_skin, "don't use any emulator skin" ) |
| 92 | CFG_FLAG ( noskin, "same as -no-skin" ) |
Siva Velusamy | 2abcdc4 | 2012-10-04 17:44:27 -0700 | [diff] [blame] | 93 | CFG_FLAG ( dynamic_skin, "dynamically construct a skin of given size, requires -skin WxH option" ) |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 94 | CFG_PARAM( memory, "<size>", "physical RAM size in MBs" ) |
| 95 | |
David 'Digit' Turner | 045bdbe | 2014-04-28 22:26:52 +0200 | [diff] [blame] | 96 | OPT_PARAM( accel, "<mode>", "Configure emulation acceleration" ) |
| 97 | OPT_FLAG ( no_accel, "Same as '-accel off'" ) |
| 98 | |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 99 | OPT_PARAM( netspeed, "<speed>", "maximum network download/upload speeds" ) |
| 100 | OPT_PARAM( netdelay, "<delay>", "network latency emulation" ) |
| 101 | OPT_FLAG ( netfast, "disable network shaping" ) |
| 102 | |
| 103 | OPT_PARAM( trace, "<name>", "enable code profiling (F9 to start)" ) |
| 104 | OPT_FLAG ( show_kernel, "display kernel messages" ) |
| 105 | OPT_FLAG ( shell, "enable root shell on current terminal" ) |
| 106 | OPT_FLAG ( no_jni, "disable JNI checks in the Dalvik runtime" ) |
| 107 | OPT_FLAG ( nojni, "same as -no-jni" ) |
| 108 | OPT_PARAM( logcat, "<tags>", "enable logcat output with given tags" ) |
| 109 | |
| 110 | OPT_FLAG ( no_audio, "disable audio support" ) |
| 111 | OPT_FLAG ( noaudio, "same as -no-audio" ) |
| 112 | OPT_PARAM( audio, "<backend>", "use specific audio backend" ) |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 113 | |
| 114 | OPT_FLAG ( raw_keys, "disable Unicode keyboard reverse-mapping" ) |
| 115 | OPT_PARAM( radio, "<device>", "redirect radio modem interface to character device" ) |
| 116 | OPT_PARAM( port, "<port>", "TCP port that will be used for the console" ) |
| 117 | OPT_PARAM( ports, "<consoleport>,<adbport>", "TCP ports used for the console and adb bridge" ) |
| 118 | OPT_PARAM( onion, "<image>", "use overlay PNG image over screen" ) |
| 119 | OPT_PARAM( onion_alpha, "<%age>", "specify onion-skin translucency" ) |
| 120 | OPT_PARAM( onion_rotation, "0|1|2|3", "specify onion-skin rotation" ) |
| 121 | |
| 122 | OPT_PARAM( scale, "<scale>", "scale emulator window" ) |
| 123 | OPT_PARAM( dpi_device, "<dpi>", "specify device's resolution in dpi (default " |
| 124 | STRINGIFY(DEFAULT_DEVICE_DPI) ")" ) |
| 125 | |
| 126 | OPT_PARAM( http_proxy, "<proxy>", "make TCP connections through a HTTP/HTTPS proxy" ) |
| 127 | OPT_PARAM( timezone, "<timezone>", "use this timezone instead of the host's default" ) |
| 128 | OPT_PARAM( dns_server, "<servers>", "use this DNS server(s) in the emulated system" ) |
| 129 | OPT_PARAM( cpu_delay, "<cpudelay>", "throttle CPU emulation" ) |
| 130 | OPT_FLAG ( no_boot_anim, "disable animation for faster boot" ) |
| 131 | |
| 132 | OPT_FLAG( no_window, "disable graphical window display" ) |
| 133 | OPT_FLAG( version, "display emulator version number" ) |
| 134 | |
| 135 | OPT_PARAM( report_console, "<socket>", "report console port to remote socket" ) |
| 136 | OPT_PARAM( gps, "<device>", "redirect NMEA GPS to character device" ) |
| 137 | OPT_PARAM( keyset, "<name>", "specify keyset file name" ) |
| 138 | OPT_PARAM( shell_serial, "<device>", "specific character device for root shell" ) |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 139 | OPT_PARAM( tcpdump, "<file>", "capture network packets to file" ) |
| 140 | |
David Turner | b58c44e | 2009-03-25 02:42:45 -0700 | [diff] [blame] | 141 | OPT_PARAM( bootchart, "<timeout>", "enable bootcharting") |
| 142 | |
vchtchetkine | 9085a28 | 2009-09-14 15:29:20 -0700 | [diff] [blame] | 143 | OPT_PARAM( charmap, "<file>", "use specific key character map") |
| 144 | |
David 'Digit' Turner | 318e4f2 | 2009-05-25 18:01:03 +0200 | [diff] [blame] | 145 | OPT_LIST( prop, "<name>=<value>", "set system property on boot") |
| 146 | |
Dries Harnie | 40beab4 | 2010-05-15 17:04:47 +0200 | [diff] [blame] | 147 | OPT_PARAM( shared_net_id, "<number>", "join the shared network, using IP address 10.1.2.<number>") |
| 148 | |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 149 | #ifdef CONFIG_NAND_LIMITS |
| 150 | OPT_PARAM( nand_limits, "<nlimits>", "enforce NAND/Flash read/write thresholds" ) |
| 151 | #endif |
| 152 | |
David Turner | 9da935d | 2011-09-12 21:27:56 +0200 | [diff] [blame] | 153 | OPT_PARAM( gpu, "<mode>", "set hardware OpenGLES emulation mode" ) |
| 154 | |
Vladimir Chtchetkine | 7485c29 | 2012-03-19 11:35:29 -0700 | [diff] [blame] | 155 | OPT_PARAM( camera_back, "<mode>", "set emulation mode for a camera facing back" ) |
| 156 | OPT_PARAM( camera_front, "<mode>", "set emulation mode for a camera facing front" ) |
| 157 | OPT_FLAG( webcam_list, "lists web cameras available for emulation" ) |
Vladimir Chtchetkine | ae0d813 | 2011-09-13 10:48:02 -0700 | [diff] [blame] | 158 | |
Vladimir Chtchetkine | 8dd31e8 | 2012-02-15 17:16:04 -0800 | [diff] [blame] | 159 | OPT_PARAM( screen, "<mode>", "set emulated screen mode" ) |
| 160 | |
Andrew Hsieh | ddd4ef7 | 2012-03-22 00:39:08 +0800 | [diff] [blame] | 161 | OPT_FLAG( force_32bit, "always use 32-bit emulator" ) |
| 162 | |
Nick Kralevich | 185231a | 2013-10-07 13:54:31 -0700 | [diff] [blame] | 163 | OPT_PARAM(selinux, "<disabled|permissive>", "Set SELinux to either disabled or permissive mode") |
| 164 | |
The Android Open Source Project | 8b23a6c | 2009-03-03 19:30:32 -0800 | [diff] [blame] | 165 | #undef CFG_FLAG |
| 166 | #undef CFG_PARAM |
| 167 | #undef OPT_FLAG |
| 168 | #undef OPT_PARAM |
David 'Digit' Turner | 318e4f2 | 2009-05-25 18:01:03 +0200 | [diff] [blame] | 169 | #undef OPT_LIST |