Share via


Use an emulator to simulate assigned access (Handheld 8.1)

7/17/2014

This topic demonstrates how to use Assigned Access on a Windows Embedded 8.1 Handheld emulator. Assigned Access is a core feature of Windows Embedded 8.1 Handheld that enables OEMs to develop lockdown and custom layout experiences on Handheld devices such as customizing the start screen, settings, apps, and buttons.

Before you can use the Handheld 8.1 emulator that is included with the Handheld 8.1 SDK, you must meet the following requirements:

Required Hardware

  • 64-bit motherboard with Second Level Address Translation (SLAT) support. This is necessary to run the emulator.
  • 8 GB of free disk space.

Required Software

  • Windows 8.1 Professional or higher 64-bit operating system.
  • Visual Studio 2013 with Update 2 or later. Visual Studio 2013 Update 2 is available here. Visual Studio 2013 with Update 2 also contains the Windows Phone 8.1 SDK, which you will need.
  • Windows Embedded 8.1 Handheld SDK, available here.

Overview of tasks

  • Create a virtual SD card
  • Create and run an application
  • Add the virtual SD card to the emulator
  • Run the settings app
  • Revert lockdown settings

Create a virtual SD card

  1. Create a wehlockdown.xml file that specifies which applications and settings will be available on the device. For instructions about how to create a wehlockdown.xml file, see Lockdown settings

    Warning

    Ensure that you include Settings(<Application productId="{5B04B775-356B-4AA0-AAF8-6491FFEA5601}" />) in the <Apps> list, and Microsoft.CompanyAccount (<System name="Microsoft.CompanyAccount" />) in the <Settings> list, so that the Workplace application will be available to re-provision the device after you lockdown the device. Otherwise, you must reset the emulator to a clean state.

  2. Create a directory on your development computer that you are running Visual Studio 2013 on and place your wehlockdown.xml file in it. This directory and its contents will be used to represent a SD card on the emulator.

Create and run an application

  1. Open Visual Studio 2013.

  2. Create a new project by clicking File > New > Project.

  3. Create a Hub App in the project. In the New Project dialog box, open Visual C++ > Store Apps > Hub App (or any of the other Windows Phone App template types). Name the project SampleApp, choose a location for the project, and then click OK.

    New Windows Phone Application

  4. Add capabilities to the app package manifest file as required. If you are only going to apply a wehlockdown.xml file to the image then you do not need to add any additional capabilities. If you are going to use the lockdown APIs in your sample application, add the ID_CAP_ENTERPRISE_SHARED_DATA capability.

    Important

    The Windows.Embedded.DeviceLockdown namespace APIs require the ID_CAP_ENTERPRISE_SHARED_DATA capability, which allows you to use a standard enterprise certificate. This capability is not available to standard 3rd party developers where the certificate is provided through Visual Studio.
    At this time, the Visual Studio 2013 designer does not provide a checkbox for including ID_CAP_ENTERPRISE_SHARED_DATA in the app package manifest. You must manually include ID_CAP_ENTERPRISE_SHARED_DATA in your manifest file. For instructions about how to manually update your manifest file, see Add capabilities.

  5. Open Configuration Manager by clicking Build > Configuration Manager.

  6. Verify that the Active solution platform dropdown is set to Win32 and close Configuration Manager.

    Configuration Manager

  7. Build the project by clicking Build > Build Solution to build the project.

  8. Select a Handheld 8.1 image by using the target device drop-down list on the standard toolbar.

    Target the handheld emulator

  9. Deploy the application by pressing F5.

    Note

    If Hyper-V is not running, you will be prompted to turn it on. You may also be prompted to provide elevated privileges.

  10. The emulator appears and the application installs and runs.

Add the virtual SD card to the emulator

  1. Once the emulator is running, in the emulator toolbar click the additional tools (>>) button and select SD Card in the Additional Tools tab.

  2. In Local folder, enter the path to the folder you created that contains your wehlockdown.xml file and then click Insert SD card.

    Phone emulator additional tools menu

A message will appear on the emulator indicating that a SD card has been found. Dismiss the message by tapping No.

Run the settings app

  1. On the emulator, navigate to Settings and activate the Workplace application. Scroll to the bottom of the screen and tap Apply to apply the contents of the wehlockdown.xml file to your device.

    Workplace settings application

  2. After a message appears stating that the settings have been applied, restart the emulator by tapping Restart. The emulator will restart with the settings, button behavior, and applications that you specified in your wehlockdown.xml file.

Revert lockdown settings

To revert the emulator to its pre-lockdown state, either close and restart the emulator, or revert the emulator to the default checkpoint.

To revert the emulator to the default checkpoint, in the emulator toolbar click the additional tools (>>) button and select Checkpoints. In the Checkpoints list, select the Default Windows Phone Emulator Checkpoint and click Restore.

The emulator checkpoint dialog

You can experiment with various wehlockdown.xml settings and can reset the emulator at any time to reapply the settings by following the steps in this topic.

See Also

Concepts

Develop Applications (Handheld 8.1)
Switch between handheld profiles programmatically