Repackaging with the BlackBerry APK Packager tool

The BlackBerry APK Packager repackages your .apk file as a BlackBerry 10 compatible .bar file. During the repackaging process, the BlackBerry APK Packager performs a compatibility test on your .apk file to determine how compatible your repackaged Android app is with the BlackBerry 10 OS. You can specify a warning level to stop the repackaging process for your .apk file when it generates a warning at the specified level or higher. These warnings are all saved in a .wrn file that's located in the target folder location that you specified.

The packager wizard can also sign your .bar file so it can be distributed through the BlackBerry World storefront.

The BlackBerry APK Packager wizard.

The repackaging process

The BlackBerry APK Packager creates a .bar file that contains all of the resources that your Android app needs to run on a BlackBerry 10 device.

To repackage an .apk file as a .bar file:

  1. Go to where you extracted the BlackBerry Command-line tool files.
  2. Start the BlackBerry APK Packager.exe application.
    The BlackBerry APK Packager wizard.
  3. Browse to an .apk file.
  4. Enter the path, or Browse, to a target folder where you want to save the generated repackaging files.
  5. Select the Sign check box.
  6. Select the Deploy check box.
    The BlackBerry APK Packager dialog box with repackaging results.
  7. Click Package.
  8. When the repackaging operation has successfully completed, a BlackBerry Deploy dialog box appears. Select your device, and enter your device password.
    The BlackBerry Deploy wizard.
  9. Click Install to deploy the generated .bar file onto the selected BlackBerry 10 device.

The BlackBerry APK Packager generates a number of files, which it adds to your app's .bar file. The following table shows the files with a description for each file:



app icon

The app icon, which is used as the main point of entry to the app from the home screen of a BlackBerry 10 device. The BlackBerry APK Packager extracts the icon from the .apk file, and repackages it using a format that's compatible with the BlackBerry 10 OS.

manifest file

The manifest file defines and provides essential information about the app to the BlackBerry 10 OS. The BlackBerry APK Packager maps the attributes from the AndroidManifest.xml file included in the .apk file, to a manifest file.

The BlackBerry APK Packager also generates a .wrn file that contains the results of the compatibility test that the packager ran before it repackaged your .apk file. This file and the .bar file should be in the same folder that you set as the target folder.

Customizing your repackaging options

You can use the Advanced Settings in the BlackBerry APK Packager dialog box to customize your app with the following repackaging options:

  • Specify a minimum device OS version for your app.
  • Choose a custom icon for your app.
  • Add a custom manifest file.
  • Specify an Android configuration file.
  • Specify a Launchable Activity Index for the app.
  • Select a custom Author and Author ID using the BlackBerry Debug Token Request dialog box.
The BlackBerry APK Packager wizard.

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

comments powered by Disqus