Converting APK apps to the BAR file format

QNX platforms include a command-line tool for converting APK apps to the BAR file format.

To repackage your app in the BAR file format so you can use it on the QNX platforms, you should use the blackberry-apkpackager command-line packaging tool. This tool is provided with the QNX platform.


Not all APIs are supported, so you may need to modify your app before you can run it on QNX platforms. The blackberry-apkpackager packaging tool provides a list of exceptions which you may need to address. There may be entries in the BAR file that you need to fix manually.

See the chapter "Compatibility and compliance", and the documentation included with the tools for more information.

Here's a short summary or what you need to do to repackage your app in the APK format to the BAR file format:

  1. Run blackberry-apkpackager to repackage your app.

    For example: blackberry-apkpackager myapp.apk

    This tool generates a list of exceptions, which you should review and address if necessary to ensure that your app is compatible with the platform.

    After addressing any exceptions, you have a compatible app in BAR file format.

    Note that you don't have to sign your BAR files for QNX platforms.

  2. Transfer this BAR file to the target and install it using the script.
  3. Test your app on your target. Even if the tools didn't identify any significant issues, you may need to make further changes. The debugger, adb, is included with the runtime. It may help you identify any remaining problems. See " Enabling the debugger (adb) " for more information.