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 10 device 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 10 device 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 10 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 dependencies\tools\bin in your BlackBerry 10 WebWorks 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> <>
    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> <>
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.

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:


You would specify it like this:

-devicepinlist device_PINs.txt

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 10 device, 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 dependencies\tools\bin in your BlackBerry 10 WebWorks SDK folder.
  5. Type the following command:
    blackberry-deploy -installDebugToken <path to debug token> 
        -device <Development IP 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. Create a copy of your debug token .bar file and name it
  2. Move the file to the root of the BlackBerry 10 WebWorks SDK installation folder.

You can now load your debug-enabled application on your BlackBerry 10 device 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.

  1. At a command prompt, navigate to the installation folder for the BlackBerry 10 WebWorks SDK.
  2. Package the app by using the following syntax:
    bbwp [drive:][path]archive -d [-o dir]

    Windows example:

    bbwp C:\myapp\ -d -o C:\myapp\output

    Mac OS example:

    ./bbwp ~/myapp/ -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 .bar files in the simulator and device folders in the folder specified by the -o parameter. If no -o parameter is specified, the .bar files are created in the simulator and device subfolders in the folder you ran the bbwp command.

Deploying your application to a BlackBerry 10 device

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


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

Last modified: 2014-03-10

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus