Port an Android APK to Blackberry QNX (10.2)

I came across a few articles on porting Android APKs to Blackberry QNX, but was disappointed with the writing style and format (specifically that the page I found forced you through adf.ly, which I block with Ghostery).

Preparing the environment:
1) Download Android SDK, and expand into c:\android_sdk\
2) Run c:\android_sdk\SDKManager.exe and download the four default items (at least [android version]/SDK Platform)
3) Create a Blackberry ID and obtain a CSK (let’s use CSK_password as the password) and save it to the proper directory as noted on the site (Windows 7: “%homepath%\AppData\Local\Research In Motion”)
4) Download Command-line Tools for Android from Blackberry. Expand the Command-line tools to “C:\Program Files (x86)\Research In Motion\blackberry.tools.SDK”

Porting the APK:
This example I will port WhisperSystem’s RedPhone while awaiting them to officially port it (which might never happen).
1) Having obtained the application ID, by searching play.google.com to obtain the ID portion of the URL (ex: for TextSecure to ID is org.thoughtcrime.securesms)), obtain the APK you wish to port and save it to “C:\Program Files (x86)\Research In Motion\blackberry.tools.SDK\bin\APKs\”
2) Check the APK for compatibility:

cd "C:\Program Files (x86)\Research In Motion\blackberry.tools.SDK\bin"
apk2barVerifier .\APKs\org.thoughtcrime.redphone.apk c:\android_sdk\sdk

You may run into problems with the app if you see anything above warning level.
3) Convert the APK:

cd "C:\Program Files (x86)\Research In Motion\blackberry.tools.SDK\bin"
apk2bar .\APKs\org.thoughtcrime.redphone.apk c:\android_sdk\sdk -a [something that signifies you as an author]

4) Generate a p12 certificate:
This only needs to be done once.

cd "C:\Program Files (x86)\Research In Motion\blackberry.tools.SDK\bin"
blackberry-keytool -genkeypair -keystore rim_apk_port.p12 -storepass STORE_password -dname "cn=[something that signifies you as an author]" -alias author

5) Have RIM sign your BAR:

cd "C:\Program Files (x86)\Research In Motion\blackberry.tools.SDK\bin"
blackberry-signer -verbose -cskpass CSK_password -keystore rim_apk_port.p12 -storepass STORE_password .\APKs\org.thoughtcrime.redphone.bar RDK

6) Sign the BAR yourself:

cd "C:\Program Files (x86)\Research In Motion\blackberry.tools.SDK\bin"
blackberry-signer -verbose -keystore rim_apk_port.p12 -storepass STORE_password .\APKs\org.thoughtcrime.redphone.bar author

The Device Simulator:
You can test if the ported app will run generally. RedPhone and TextSecure will have /some/ trouble running as there is no SMS service (which you can work around).

1) Download and install VMware Player Free
2) Download and install blackberry 10 device simulator.
3) Start the Blackberry 10 Simulator VMX.
4) Start the controller to obtain the IP of the Blackberry device.
5) Install the BAR to the simulator:

cd "C:\Program Files (x86)\Research In Motion\blackberry.tools.SDK\bin"
blackberry-deploy -installApp -device [device IP] -package .\APKs\org.thoughtcrime.redphone.bar

Note that on your device, you may need to use `-password `


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: