Tuesday, 21 July 2015

Blackberry Runtime for Android: Amazing porting tool..!!

With the new Blackberry run-time for Android you can re-package your existing Android Apps and distribute it to another pool of smartphone users. Its simple, easy to use and supports almost everything(Yeah there are few limitations). For more details visit the page: Blackberry Run-time for Android apps

I  have summarized the whole process here. Hope it helps you guys to start porting your Android Apps for the Blackberry World.

Step1: Download the command line tool from Command-line tools for Windows
It will download a zip file. Unzip and copy it anywhere on your computer.

Step2: If you do not have a Blackberry Id create one here Create new Blackberry Id

Step3: After logging in your Blackberry account, you need to create a BlackBerry Id token. Refer to the link Create Blackberry ID token 

A file bbidtoken.csk will be generated and downloaded to your computer. Now check for a folder "Research In Motion" at the following location on your windows machine:

C:\Users\kthakur\AppData\Local\Research In Motion

 If you don't have one create the folder and copy the above downloaded csk file in this folder.

Step4: Generate author.p12 file. To generate this file open Command Prompt and navigate to the folder unzipped in step 1.



Execute the following command:


After executing this command your author.p12 file will show up beside your bbidtoken.csk.

Step5: Open apk packager.
Lets now open the apk Packager gui to convert an Android apk file to a Blackberry compatible bar file. A bar file is the one which will be installed on a blackberry simulator or device. Execute the following command in command Prompt:


When you execute this command a GUI will open:



 Browse and select your Android apk file, specify your target folder. Use advanced settings if you want to deploy your app on a Blackberry device. Turn on Development Mode and check Deploy. Use the Detect button to get author details and Deploy debug token.

When you click on detect a new window will open, which will automatically detect your connected blackberry device. Make sure you have development mode turned on in your phone under Settings..> Security and Privacy..> Development Mode. On the same screen you can see "Debug token not installed", to install the bar files on this device first we will have to install a debug token.

Click on Detect button next to author, a new window will open. Device displays the attached blackberry device, enter your blackberry phone password. Click on "Deploy Debug Token". It will prompt for "CSK password". On entering the password it will start deploying a debug token in your Blackberry device. On success you can see an installed debug token under  Settings..> Security and Privacy..> Development Mode in your phone.



Now close this window, and click on "Package" in the previous window. The porting/re-packaging process will start:


On completion a new window(below) will open to install the converted App into your blackberry device.

Its done..!!