Managing Emulator Instances

The Tizen Studio provides emulators to run your application in a virtual environment.

In order to test the application in a variety of environments, you need a variety of emulators. The Tizen Studio provides the Emulator Manager to help you easily create and manage the emulator instances.

Basically, the Emulator Manager allows you to easily generate emulator instances from a pre-defined platform and template. In addition, you can define the settings of the virtual device, such as skin, resolution, and hardware devices.

The main features of the Emulator Manager are:

  • Defining a new emulator or hardware profile
  • Editing an existing emulator instance or hardware profile
  • Deleting an emulator instance or hardware profile
  • Starting and stopping the emulator

Accessing the Emulator Manager

If you do not have the Emulator Manager installed, you can install it using the Tizen Studio Package Manager.

There are 2 different ways to access the Emulator Manager:

  • Click the Emulator Manager icon on the desktop or in the Start menu.

    Table: Starting the Emulator Manager

    Ubuntu Windows® macOS
    Desktop > Applications > Emulator Manager:

    Shortcut Ubuntu

    Start > All Programs > Tizen Studio > Emulator Manager:

    Shortcut Windows

    Finder > Applications > Tizen Studio > Emulator Manager:

    Shortcut macOS

  • In the Tizen Studio, select Tools > Emulator Manager or click the Emulator Manager icon in the toolbar.

    Figure: Launch the Emulator Manager in the Tizen Studio

    Launch the Emulator Manager

Creating an Emulator Instance

The Emulator Manager can help you to select the recommended platform and template. When you need another device environment, you can edit the existing emulator instance, or create a new one with a more suitable platform and template. You can also create platforms and templates to suit your needs.

Figure: Emulator Manager

Emulator Manager

To create a new emulator instance:

  1. In the Emulator Manager, click Create.
  2. Select the platform (system image), and click Next.
  3. Select the template (device definition), and click Next.
  4. Change properties as needed, and click Finish.

    The emulator instance appears in the Emulator Manager.

    To view the detailed information, right-click the emulator to see a context menu.

    NoteTo run the application faster, switch on CPU VT and GPU. If CPU VT is disabled, check Increasing the Application Execution Speed for more information. If GPU is disabled, install the latest vendor-provided graphic driver.

Figure: Emulator Configuration dialog

Emulator Configuration dialog

Creating Platforms

To create an emulator, you have to first select the platform. You can create, modify, and delete a custom platform, and view the generated platforms. Most application developers do not need a custom platform, but it can be useful for a platform developer.

Figure: Platforms list

Platforms list

To create a custom platform:

  1. Click the create icon (Create icon).
  2. In the dialog box, select a base platform and platform image file.

    You can create a custom platform using a qcow2 or raw format image.

    Qcow2 is a platform image format that is released with the Tizen Studio. Using the Emulator Manager's "Export as" feature, you can also create a qcow2 image.

    A platform image of the development stage is in the raw format. If you try launching an emulator with a raw image, you can see the current state of this image. This can be useful for platform developers.

  3. Click OK to save your configuration and click Next.

    The newly created platform is added to the list with a settings icon.

Figure: Platform configuration

Platform configuration

Creating Templates

The Emulator Manager provides several device template types. A device template refers to, for example, the screen resolution and size, and the sensors in the device specification. You can make an emulator instanced based on the desired template.

Figure: Device templates

Device templates

You can create a new template from the beginning, or clone a template and change some properties.

  • To create a new template, click the create icon (Create icon) to open a dialog box. Click OK to save your settings.
  • To clone a new template, click the clone icon (Clone icon), make the appropriate changes, and click OK .

After configuring the template, click Next. The new device template is added to the list with a settings icon.

Figure: Template configuration

Template configuration

Managing the Emulator

In the Emulator Manager, you can edit, delete, reset, and export emulator instances:

  • To edit an emulator, click Edit, make the appropriate changes, and click Confirm.
  • To delete an emulator, click Delete.
  • To reset an emulator, right-click it and select Reset.
  • To export an emulator, right-click it and select Export As. Specify the new image file location.

    When you export the emulator instance, the same state as in the platform image is replicated.

Managing Platforms and Templates

To manage the template:

  • To modify a template, click the modify icon (Modify icon), make the appropriate changes, and click Confirm. You can only modify the custom device templates you have created.
  • To delete a template, click the delete icon (Delete icon). You can only delete the custom device templates you have created.

To manage the platforms:

  • To modify a custom platform, click the modify icon (Modify icon), make the appropriate changes, and click Confirm. You can only modify the custom platforms you have created.
  • To delete a custom platform, click the delete icon (Delete icon). You can only delete the custom platforms you have created.

Controlling the Emulator Manager from the Command Line

You can create, modify, delete, and list your VMs through the command line interface commands. The CLI binary is located in:

  • In Ubuntu:

    <TIZEN_STUDIO>/tools/emulator/bin/em-cli

  • In Windows:

    <TIZEN_STUDIO>\tools\emulator\bin\em-cli.bat

For more information, see the CLI help messages.

Figure: Emulator Manager command line

Emulator Manager command line

In the following figure, you can see the details of a specific command using the -h command option.

Figure: Emulator Manager command details

Emulator Manager command details

The following figure shows an example how to create and launch an emulator using the CLI.

Figure: Launching the emulator using the command line

Launching the emulator using the command line

In the create command, the –p option is the platform name. You can see the available platforms using the list -vm command.