Thursday, March 28, 2013

Covert .apk(Android) to .bar(Blackbery Z10) file



This post shows you 8 steps to convert an Android app (.apk) to Blackberry Z10,Q10 app (.bar).
Step 0 : download file apk2bar-HaTaX.zip from http://www.mediafire.com/?m5d990yhbu2c070
Unzip this file into apk2bar folder. This folder will contain:
+ apk2bar-HaTaX.bat –> convert .apk file to .bar file
+ signbar-HaTaX.bat –> used to sign .bar file
+ bin folder –> tools to get *.p12

Step 1: (download Android SDK)
Download Android SDK at http://developer.android.com/sdk/index.html?
Step 2: ( Install Android SDK)
Setup Android SDK and remember its path. Run SDK Manager. Click SDK platform in Android 2.3.3 (API10) as follows
How to convert APK (Android) to BAR (Playbook) ?
Step 3: ( Edit path in apk2bar-HaTaX.bat)
Using notepad to edit file apk2bar-HaTaX.bat to change the path "ANDROIDSDK=" to Android SDK installed in step 2.
How to convert APK (Android) to BAR (Playbook)
Note: remove “\” after android-sdk
Step 4 : (Testing) convert APK –> BAR
This step tests above steps. If you drag file *.APK into file apk2bar-HaTaX.bat and obtain file *.bar without errors, you have done correctly.
Step 5 : (Register to receive file *.csj  (not *.p12))
Go to website :https://www.blackberry.com/SignedKeys/ to register to receive file and go to https://www.blackberry.com/SignedKeys/ to register another file.
Note: in the input PIN part, you can input any characters but you must remember it.
After registering, you may need to wait about 2 hours to receive 2 files *.csj.
- First file client-PBDT-xxxxxxxx.csj (x: client number)
- Second file client-RDK-xxxxxxxx.csj (x: client number)

Step 6 : get file *.p12
Step 6.1 : Open cmd.exe and change to \apk2bar\bin (in step 0) and copy files *.csj into this folder
How to convert APK (Android) to BAR (Playbook)
Step 6.2 : In cmd, type:
blackberry-signer  -csksetup  -cskpass <create_a_password>
How to convert APK (Android) to BAR (Playbook)
If you already had key, an error will occur.
CSK file already exists. Use -cskdelete to delete first
Don’t use command cskdelete to delete unless you forgot pass. If you forgot pass, you can delete CSK file and request new CSJ file from RIM.
Step 6.3 : Next, input
blackberry-signer -register -csjpin <PIN>-cskpass <csk password from step 6.2><CSJ_file>
How to convert APK (Android) to BAR (Playbook)
Note: PIN is the PIN number in Step 5.
In Step 5, we register 2 keys because we will get errors if using only one key.
Step 6.4: Input
blackberry-keytool -genkeypair -keystore -storepass –dname "cn=" -alias author
How to convert APK (Android) to BAR (Playbook)
Step 7: Config file signbar-HaTax.bat
Using notepad to edit file signbar-HaTaX.bat. Only edit the first part of this file.
How to convert APK (Android) to BAR (Playbook)
SET DEVCERTFILE : the path to *.p12 file created in Step 6.4.
SET DEVCertPASS : pass to protect file *.p12 created in Step 6.4
SET CSKPASS : pass CSK created in step 6.4.


Step 8 : sign file bar
Step 8.1 : Drag file *.apk into file apk2bar-HaTaX.bat to create file *.BAR
Step 8.2 : Drag *.bar created in Step 8.1 to file signbar-HaTaX.bat to sign file *.bar.

Done!

No comments:

Post a Comment