Sunday, October 26, 2014

Setting up environment for converting an apk(android packager) to bar(blackberry archive)

Prerequisites:

Download Blackberry command line tools for android from

Steps to install an android apk into blackberry :

  1. Create/Register for a bbid on developer.blackberry.com/codesigning
  2. Generate keystore
<blackberry-dev-tools>/bin/blackberry-keytool -genkeypair -storepass <bb id store passwd> -author <author_name>
  1. Download the debug token and place it in ~/Library/Research\ In\ Motion/
  2. Create a debug token for device
<blackberry-dev-tools>/bin/blackberry-debugtokenrequest -storepass <bbid account pass> -devicepin <devicepin> <path of the debug token to be created with .bar extension>
  1. Install debug token
<blackberry-dev-tools>/bin/blackberry-deploy -installDebugToken <debug token path> -device <device ip> -password <device password>
  1. Creating bar from apk
<blackberry-dev-tools>/bin/blackberry-apkpackager <path of apk> -t <destination folder of bar>
  1. Signing bar
<blackberry-dev-tools>/bin/blackberry-signer -proxyhost <proxy host> -proxyport <port> -proxyusername <username> -proxypassword <password> -bbidtoken <bb token with .csk extension> -storepass <bbid account storepass> <path of bar>
  1. Installing app

<blackberry-dev-tools>/bin/blackberry-deploy -installApp -device <deviceip> -package <path of signed bar file> -password <device password>