Deploy to a device

Before you begin:

  • Make sure you have requested a debug token signing file (client-PBDT-xxxxx.csj) and registered it. If you haven’t requested and registered code signing keys, see Set up for signing.
  • Make sure that your BlackBerry PlayBook tablet is on the same network as your computer. You might want to disconnect from VPN connections to avoid connection problems.

To deploy your application to the BlackBerry PlayBook tablet you first must package it with the debug token information.

When you run an unsigned application using a debug token, you can avoid:
  • changing the version number of your application
  • accessing the internet
  • exporting a release build of your application

Debug tokens are valid for 30 days. When a debug token expires, the BlackBerry PlayBook OS no longer allows unsigned apps that rely on that token to run. You are limited to a total of 100 device PINs across all of your debug tokens that are currently active. If you create debug tokens that address 100 PINs, you must wait for some of your debug tokens to expire before you create more.

Create a debug token

  1. At a command prompt, navigate to blackberry-tablet-sdk\bin in your BlackBerry PlayBook OS SDK folder.
  2. Create a debug token for your device by using the following syntax and values for the command line options:
    blackberry-debugtokenrequest -storepass <KeystorePassword> 
        -devicepin <device PIN> <debug_token_file_name.bar>
    If you have mutliple devices you wish to test on, list their PINs in a file, and use the following command:
     blackberry-debugtokenrequest -storepass <KeystorePassword> 
        -devicepinlist <device_PIN_list_file> <debug_token_file_name.bar>
    
Option Value
KeystorePassword The password you defined when you created your developer certificate.
device PIN The PIN of the BlackBerry device on which you want to install this debug token.
device_PIN_list_file

The name of a file containing the PINs of the BlackBerry devices on which you want to install this debug token. For example, a sample <device_PIN_list_file> called device_PINs.txt might look this:

12G34H56
2K672HVP
221Q2958

You would specify it like this:

-devicepinlist device_PINs.txt
debug_token_file_name.bar

The file name of the debug token you want to create. The debug token file must end with .bar. If you specify the name of an existing file, the blackberry-debugtokenrequest tool deletes the file before the tool creates the debug token.

If you specify a path that does not include a file name, the blackberry-debugtokenrequest tool deletes the directory you specify and does not create a debug token.

You can now distribute or install the debug token you created.

Install a debug token

  1. On the home screen of the BlackBerry PlayBook tablet, tap the Settings icon to open the System Settings screen.
  2. In the list of options, select Security and Privacy.
  3. In the list of security options, select Development Mode to view the Development IP Address.
  4. At a command prompt, navigate to blackberry-tablet-sdk\bin in your BlackBerry PlayBook OS SDK folder.
  5. Type the following command:
    blackberry-deploy -installDebugToken <path to debug token> 
        -device <Development Address> -password <device password>

    After the command executes, the result::success message displays indicating that you successfully installed the debug token.

Make the debug token available to the packager

  1. In the BlackBerry WebWorks SDK for BlackBerry Tablet OS installation folder, navigate to the bbwp\bin folder.
  2. Using a text editor, open the bbwp.properties file.
  3. Add the path to the debug token file by using <debug_token> tags.
    <debug_token>path to debug token file</debug_token>

Example: bbwp.properties file with path to debug token file

<?xml version="1.0" encoding="UTF-8"?>
<wcp>
<additional>-quiet</additional>
<java>C:\Program Files\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.1.0\jre</java>
<wcp_template>AirAppTemplates</wcp_template>
<air_template>AirAppTemplates</air_template>
<tablet_sdk>C:\Program Files\Research In Motion\BlackBerry WebWorks SDK for TabletOS 2.1.0\bbwp\blackberry-tablet-sdk</tablet_sdk>
<extension_repository>ext</extension_repository>
<debug_token>C:\my_debug_token.bar</debug_token>
</wcp>

You can now load your debug-enabled application on a BlackBerry PlayBook tablet without having to sign it.

Packaging your application with a debug token

To enable your unsigned application to run using a debug token, include the -d parameter when you package your application. This parameter packages your app in developer mode, which causes it to use the debug token that you installed on the device previously.

Debug token information is used only if both of the following are true:
  • There is a <debug_token> element in bbwp.properties and it contains the full pathname of a valid debug token file.
  • Signing is NOT specified (i.e., no -gcsk and no -gp12 specified) when you package your application.
  1. At a command prompt, navigate to the installation folder for the BlackBerry PlayBook OS SDK.
  2. Package the app by using the following syntax:
    bbwp [drive:][path]archive -d [-o dir]

    Windows example:

    bbwp C:\myapp\myarchive.zip -d -o C:\myapp\output

    Mac OS example:

    ./bbwp ~/myapp/myarchive.zip -d -o ~/myapp/output

    During the packaging process, the BlackBerry WebWorks Packager displays multiple messages, and indicates a successful packaging process if the application archive contains no errors.

  3. If successful, this process creates a .bar file in the folder specified by the -o parameter. If no -o parameter is specified, the .bar file is created in a subfolder named bin that's located in the same folder location as the archive file.

Deploying your application to a BlackBerry PlayBook tablet

  1. Turn on Development Mode on your BlackBerry PlayBook tablet.
  2. Obtain the IP address of your BlackBerry PlayBook tablet.
  3. At a command prompt, navigate to the blackberry-tablet-sdk/bin folder for the BlackBerry WebWorks SDK.
  4. Deploy the application using the following syntax:
    blackberry-deploy -installApp -password <device password> -device <IP_address> -package <BAR file path>

    Example:

    blackberry-deploy -installApp -password secretpw -device 192.0.2.1 -package myApp.bar
    where the device password is secretpw, the IP address is 192.0.2.1, and the .bar file name is myApp.bar.

Last modified: 2013-08-14