DEVELOPERS BLOG

BlackBerry Priv Emulator

ANNOUNCEMENTS / 11.13.15 / Mark Sohm

priv_emulator

You can add a skin to the Android™ Virtual Device (AVD) Manager in the Android Studio SDK so that you can emulate the look and feel of a BlackBerry PRIV.  This allows you to simulate the hardware keys on the PRIV, including the power, volume up, volume down and the physical keyboard.

Before you begin, make sure you have installed the most recent version of the Android Studio and Android SDK that matches the version of Android on PRIV (as of writing 5.1.1 API 22).  Once you have that installed, download the PRIV skin files available in the knowledge base article: BlackBerry PRIV Emulator

The following steps are also mirrored in the knowledge base article above.

Place the skin for PRIV in the SDK
Download the PRIV.zip archive, and extract the PRIV folder to <path to your local sdk>platformsandroid-xxskins, where xx is the platform version.

Set up the emulator in Android Studio – AVD Manager

  1. On the Android Studio toolbar, click AVD Manager.
  2. Click + Create Virtual Device > Import Hardware Profiles.
  3. Import <path to your local sdk>platformsandriod-xxskinsPRIVdevice.xml, where xx is the platform version.
  4. Confirm that the new device “PRIV” appears in the devices list. Press the Refresh button to refresh the list for PRIV to appear.  It might be necessary to close Select Hardware (cancel), and click Create Virtual Device again in order to refresh the list.
  5. Select PRIV and then click Next.

emulator

  1. Select x86_64 (assuming you are using a 64-bit operating system) and then click Next.

emulator2

  1. Click Show Advanced Settings to show all settings. In the Android Virtual Device (AVD) window, configure the following emulator settings to your preferred values:
  • Android Virtual Device (AVD) Name
  • Startup scale and orientation
  • Camera orientation
  • Network characteristics
  1. Ensure Show Advanced Settings is selected, and set the following emulator preferences:
  • Memory and storage limits (we suggest increasing RAM to 3 GB and VM heap to 128 MB)
  • For skin, select PRIV

emulator3

  1. Click Finish
  2. Launch the emulator.

emulator4

Mark Sohm

About Mark Sohm

Senior Technical Solutions Manager on the Solution Architects team.

Mark Sohm joined BlackBerry in 2003 and currently works as a Senior Technical Solutions Manager on the Solutions Architects team. Mark Sohm has been helping developers create applications using BlackBerry technologies for over 15 years, starting way back with the very first BlackBerry JDK on BlackBerry OS 3.6 through to BlackBerry 10 and now Android with BlackBerry Dynamics and Android Enterprise.