Udostępnij za pośrednictwem


Device Emulator Command-Line Reference

Start the Device Emulator at a command prompt by using the following syntax. The os_image_file_name is required unless you use the /s or @decfg_filename command-line option.

Note

Some SDKs do not support all options. Check your SDK documentation for more information.

DeviceEmulator os_image_file_name [/a] [/c] [/f [featurevalue]]
   [/flash [flash_file_name]] [/h] [/hostkey keyname]
   [/language LangID] [/memsize size] [/n [macaddress]]
   [/nosecurityprompt] [/p [macaddress]] [/r ROM_address]
   [/rotate angle] [/s save-state_file_name]
   [/sharedfolder directoryname] [/skin skin_file_name] [/tooltips
    state] [/u0 serialport] [/u1 serialport] [/u2 serialport]
   [/video <width>x<height>x<bit depth>] [/vmid {GUID}]
   [/vmname name] [/z]

Parameters

Parameter

Description

os_image_file_name

Specifies the path and file name (*.bin or *.nb0) of the kernel image the emulator is to use.

You can start device emulator from a kernel image, a device emulator configuration file, or a saved state file by using the /s command-line option.

@decfg_filename

Specifies the path and file name of the device emulator configuration file (*.decfg) to use.

You can start device emulator from a kernel image, a device emulator configuration file, or a saved state file by using the /s command-line option.

Switches

Switch

Description

/a

Keeps emulator window always on top, even when it does not have focus.

/battery

Specifies battery power. If the option is absent, then the emulator defaults to AC power

/batterycharge[n]

Specifies battery charge as a percent n from 0-100. If the option is absent, then the charge defaults to 100%

/c

Creates and displays a console window to show output from the Windows CE debug serial port, where keystrokes typed by the user are transmitted. This technique is useful for watching debug output and downloading kernel images from Platform Builder.

/cpucore

ARMv4 or ARMv5. Default is ARMv4.

/cpuoptions

A combination of (T)humb, (D)ebug, (I)nternetworking, (M)Long Multiply, (e)DSP. Of these, T,D, I will always be set.

/defaultsave

Use the VMID as the saved state name and put the saved state file in the per user directory.

Note

You cannot specify both /defaultsave and /s.

/funckey[value]

This special switch usually has a value of 193. Using a value of 193 will map the keyboard function keys (F1,F2, and so on) to the soft keys of a device emulator.

/flash[flash_file_name]

Enables flash-memory emulation, where optional flash_file_name specifies the name of the file to use as flash memory storage.

/h

Sets host-only routing for network packets. Affects both CS8900 and NE2000 cards.

/hostkeykeyname

Specifies the host key, where case-insensitive keyname can be None, Left-Alt, or Right-Alt.

/languageLangID

Specifies the UI language, where LangID is a four-digit decimal.

/memsizesize

Sets emulated RAM size, where size is in megabytes. Valid values are 64 through 256 inclusive. If a valid value is not specified, size defaults to 64.

/n[macaddress]

Enables CS8900 network adapter, where optional macaddress is a twelve-digit hex number specifying which host adapter the card will bind to.

/nosecurityprompt

Disables prompts to enable network connectivity, serial ports, and folder sharing, when the saved-state file uses these features.

Security noteSecurity Note:

Any use of the folder-sharing feature poses a potential security risk. For example, do not enable sharing of directories that contain confidential or sensitive information.

/p[macaddress]

Enables NE2000 PCMCIA network adapter, where optional macaddress is a twelve-digit hex number specifying which host adapter the card will bind to.

/rROM_address

Specifies the ROM file base address, where ROM_address can be in hexadecimal or in decimal.

/rotateangle

Rotates the display clockwise by degrees, where angle can be 0, 90, 180, or 270. Other integer values are allowed but are rounded down to the nearest 90.

/sfilename

Enables save-state support, where filename is the save-state file name.

Security noteSecurity Note:

Using saved-state files from untrusted sources can pose a security risk.

Note the following behavior for the /s switch:

  • If a ROM image file name is specified but no /sfilename, the emulator cold-boots from the ROM image and save-state is disabled.

  • If a ROM image file name and /sfilename are specified, the emulator cold-boots from the ROM image and enables save-state when it exits, saving state to the specified file name.

  • If no ROM image is specified, a /sfilename must be present, and the emulator restores from the specified save-state file. When the emulator exits, it saves the new state on top of the saved-state file.

    Note

    You cannot specify both /defaultsave and /s.

/sharedfolderdirectoryname

Mounts a directory as a Shared Folder, where directoryname is a Windows directory. The directory is mounted as guest "\Storage File" as if it were a storage card.

/skinskin_file_name

Loads the specified skin file.

Note

You cannot specify both /skin and /video.

/tooltipson|off

Enables or disables tooltips, where state is ON or OFF.

/u0serialport

Maps guest serial port 0 (emulator COM1) to Windows serialport.

/u1serialport

Maps guest serial port 1 (emulator debug output) to Windows serialport.

/u2serialport

Maps guest serial port 2 (emulator COM3) to Windows serialport.

/vfptrue|false

Specifies the presence of the Vector Floating Point coprocessor. Default is false.

/video<width>x<height>x<bit-depth>

Specifies screen size and bit-depth of the LCD window, where width, height, and bit-depth are decimals. Example: 640x480x16.

Note

You cannot specify both /skin and /video.

/vmid{GUID}

Specifies the VMID GUID to associate with the current instance of the emulator. Not common to pass in stand-alone scenarios.

If no {GUID} is present, one is silently created for the session.

/vmnamename

Specifies the window title. Note the following behavior:

  • If no /vmid switch is present but /skin is, then the skin supplies the window title.

  • If neither /vmid nor /skin is present, Device Emulator appears as the window title.

/z

Zooms the display (both skin and LCD window) to 2x normal size.

/speakerphone[n]

Specifies the presence of speakerphone, headset, and/or car kit. n is a bitmapped number between 0-7 that means:

  • 0 - none

  • 1 - carkit

  • 2 - headset

  • 3 - headset, carkit

  • 4 - speakerphone

  • 5 - speakerphone, carkit

  • 6 - speakerphone, headset

  • 7 - speakerphone, headset, carkit

Example

The following example starts the Windows Mobile 5.0 Pocket PC emulator:

Note

The emulator operating system image may be in a different folder on your computer.

DeviceEmulator.exe "c:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC
\Deviceemulation\0409\PPC_USA.BIN" /a /battery /batterycharge 40 
/cpucore ARMv5 /memsize 256 /s "d:\MyCustomEmulator.dess" /skin 
"c:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\Deviceemulation\
Pocket_pc\Pocket_PC.xml" /tooltips ON /vfp false 
/vmname "My Custom Emulator" /z /speakerphone 7

You can then select Save State and Exit from the File menu and start the emulator again from the saved state file by using the following command:

DeviceEmulator.exe /s "d:\MyCustomEmulator.dess"

The following example starts the device emulator from a device emulator configuration file. For more information, see Device Emulator Configuration Files.

DeviceEmulator.exe "@c:\My Emulator.decfg"

See Also

Other Resources

Device Emulator Reference