Repackaging your Android applications

If you have checked the compatibility of your APK file, your next step for getting your Android app ready for a BlackBerry 10 device is to repackage the APK file into a format that is compatible with the BlackBerry 10 OS.

The apk2bar tool repackages the APK file to a BAR file, a package file that contains all of the resources that the application requires to run on a BlackBerry 10 device. The apk2bar tool accepts as an argument an APK file, or a folder that contains one or more APK files. If the folder contains multiple APK files, the tool iterates through them.

As part of the repackaging, the apk2bar tool generates the following files and adds them to the BAR file:



application icon

The application icon is used as the main point of entry to the application from the home screen of a BlackBerry 10 device. The apk2bar tool extracts the icon from the APK file and repackages it to a format that's appropriate for the BlackBerry 10 OS.

manifest file

This manifest file defines essential information about the application for the BlackBerry 10 OS. The apk2bar tool maps the attributes from the AndroidManifest.xml file included in the APK file to a manifest file.

The apk2bar tool can also run the apk2barVerifier tool, which tests the suitability of the APK file for repackaging, so that you can verify and repackage all at once. You can specify a warning level, so that APK files that generate a warning at the specified level or higher are not repackaged.

comments powered by Disqus