You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14

On this page

Overview

A BAR file (extension: .bar) is an archive containing all the files required to install a BlackBerry 10 application. BAR files can be installed directly on a device without going through BlackBerry World or BES deployment through a procedure known as "sideloading". This article explains how to sideload an application on any BlackBerry 10 device.

Sideloading an application requires the following:

  • a Windows PC or a Mac
  • the application's BAR file, saved on the PC/Mac
  • a BlackBerry 10 device
  • a USB cable compatible with the device (usually, a Micro-B USB cable)

Developer mode

Sideloading applications requires enabling Development Mode on your BlackBerry 10 device. If your device was provided by your employer, Development Mode may be forbidden by corporate policy: in that case, you will not be able to sideload applications.

Installing the required software on your PC/Mac

The procedure requires the following software to be installed on your PC/Mac:

  • Oracle Java; this is required for running the installation tool
  • BlackBerry Link; this is required for connecting to your BlackBerry 10 device from your PC/Mac via USB cable

Downloading the BlackBerry Native SDK tools for your PC/Mac

The installation tool is part of the BlackBerry Native SDK. The Native SDK can either be downloaded as a stand-alone software or (if you have already installed it) from the Momentics development environment.

Downloading the Native SDK from Momentics
  • Open Momentics
  • Click the "Help" → "Update API levels..." menu. This opens the "API levels" window, with a list of all installed and available SDKs
  • Open the "Gold" tab
  • If the window shows the message "There are no Gold API levels installed", you need to install one of the available SDKs:
    • Scroll down to the "Available:" section
    • Click the "Install" button for the Native SDK with the highest version number
    • Wait for the selected SDK to be downloaded and installed
  • Open the Momentics installation directory:
    • (on Windows) Momentics is installed by default in C:\bbndk: open it. If you installed it in a different directory, right click the Momentics icon on the Desktop or Start menu, and click "Open file location"
    • (on Mac) Open the Applications directory, and Ctrl-click on the Momentics application. Click the "Show package contents..." menu
  • If a Native SDK was correctly installed, you should have one or more directories named host_10_x_y_z, where x.y.z is the version of the SDK
  • Choose the directory with the highest version number, for example host_10_3_1_29. In the rest of this document, this directory will be referred to as host_10_x_y_z
Downloading the Native SDK tools for Windows
Downloading the Native SDK tools for Mac
  • Download http://downloads.blackberry.com/upr/developers/update/bbndk/ndktargetrepo_10.3.1.995/packages/bbndk.macosx.tools.10.3.1.12.tar.gz
  • We'll assume the file was downloaded to your Downloads directory with the name bbndk.macosx.tools.10.3.1.12.tar.gz
  • Open the Terminal application (it's under Applications → Utilities)
  • In Terminal:
    • type the command cd ~/Downloads and press Enter⏎
    • type the command tar xf bbndk.macosx.tools.10.3.1.12.tar.gz and press Enter⏎. This could take a while
  • When the last command terminates, you should have a directory named host_10_3_1_12 in your Downloads directory. In the rest of this document, this directory will be referred to as host_10_x_y_z

Preparing your BlackBerry 10 device

Developer mode

Sideloading applications requires enabling Development Mode on your BlackBerry 10 device. If your device was provided by your employer, Development Mode may be forbidden by corporate policy: in that case, you will not be able to sideload applications.

The BlackBerry 10 device needs to be prepared to enable sideloading of applications:

  • Open the Settings application
  • In the Settings application, navigate back to the main screen if necessary, and then to Security and Privacy
  • From Security and Privacy, navigate to Development Mode
  • Enable Development Mode; enter the device password for confirmation
  • Note down the IP address of the device: it should be in the form of 169.254.x.y (usually, 169.254.0.1)

Installing the application

Once everything's ready on the device and your PC/Mac, we can proceed with the installation:

  • Connect the device to your PC/Mac with the USB cable
  • (on Windows) Press Windows+R; this should open the Run window. Type cmd in the text box and press Enter⏎. This should open a command window
  • (on Mac) Open Applications → Utilities → Terminal. This should open a command window
  • enter the command cd <full path to the host_10_x_y_z directory> and press Enter⏎. To easily enter the full path to the host_10_x_y_z directory, you can drag and drop it on the command window
  • (on Windows) enter the command cd win32\x86\usr\bin and press Enter⏎
  • (on Mac) enter the command cd darwin/x86/usr/bin and press Enter⏎
  • enter the command blackberry-deploy -installApp -device 169.254.x.y -password <device password> <full path to the BAR file> (where 169.254.x.y is the IP address of the device), and press Enter⏎. To easily enter the full path of the BAR file, you can drag and drop it on the command window
  • If successful, the command should print output similar to the following:
Info: Application-Development-Mode is false, sync disabled
Info: Sending request: INSTALL
Info: Action: Install
Info: File size: 3277221
Info: Installing ...
Info: Processing 3277221 bytes
Info: Progress 6%...
Info: Progress 11%...
Info: Progress 16%...
Info: Progress 100%...
Info: Progress 100%...
actual_dname::com.privatewave.svoip.demo.gYABgIOlC5Mm_YdgsYtIT58APtU
actual_id::gYABgIOlC5Mm_YdgsYtIT58APtU
actual_version::1.0.0.1
result::success
  • If everything went right, the application is now installed on your BlackBerry 10 device
  • No labels