Wednesday, November 30, 2011

Converting apk to bar for Blackberry Playbook Android Player


IMG_00000018

Got a Blackberry Playbook for this thanksgiving. I had a great time with this little device so far. Since the lacking of apps from app world, I’ve been signing up for the 2.0 beta almost immediately I got the tablet. I’ve been trying to convert Android apk files to playbook compatible bar files using the wonderful apk2bar from crackberry. Here I want to expand the instruction on software preparation a little as the one on crackberry is lacking details. It took me a whole day to figure everything out.

Basicly you need to use two programs from the apk2bar. apk2bar-HaTaX.bat for converting apk to bar. And signbar-HaTaX.bat to sign the converted bar. Here is the original instruction:
 
“I've made a few batch files before to make things easier, and here
is the latest installment to simplify the two step process to porting
Android APKs over to the Android Player on the BlackBerry Playbook.

apk2bar-HaTaX.bat -

This batch file processes the APK and converts it to a loadable BAR file.
It will place the BAR file in the same directory the APK file was in.

First things first, go get your Android SDK downloaded from here:

http://developer.android.com/sdk/index.html

When running the installer, remember where you installed the SDK!
You're going to need that path in a future step, I installed to
"C:\android-sdk" to keep things simple and clean.”


image

“Second, get that SDK installed and download the "SDK Platform" from the
"Android 2.3.3 (API10)" list in the Android SDK Manager tree.

Third, setup the apk2bar-HaTaX.bat file by opening it up in notepad and make
sure the "ANDROIDSDK=" line has the correct path to the installed SDK.

You're set at this point! Just drag an APK onto the batch file in windows
explorer and it should start working it's magic. If the file isn't
compatible you'll see that listed in the output at the end.”
This process is pretty straightforward. The Android Player supports upto Android 2.3 apps only,
the 3.0 tablet apps definitely won’t work.
For windows 7 users, you need to

put the *.apk files under the same apk2bar folder, drag and drop onto the apk2bar-HaTaX.bat,
otherwise it’s not gonna work.
signbar-HaTaX.bat -

This batch file signs the BAR file created by apk2bar-HaTaX.bat.


This second process is way too simple. So instead of using the instruction, I’ll be writing mine here (actually partially translated from a Chinese site). You need to install a bunch of software here.

1. Apply for code signing key HERE. After a while, you will get two *.csj files in two separate emails, and they are different. One starts with client-RDK, one starts with client-PBDK.

2. Install Java JDK HERE.

3. Install BlackBerry Tablet OS SDK for AIR HERE.

4. Install Adobe Flash Builder 4.5.

5. Generating p12 certificate using Flash Builder.



image



SNAGHTMLfa4230c



In preference, expand Flash Builder until Signing. You should see the Register button (I’ve already registered).



p12 certificate reg1



Here you specify the path for your two *.csj files you received in the emails. The CSJ Pin is the “Signing Key” when you apply for the keys. Give a new password to CSK password and remember it. After all done, you should see Signing as registered just as pictured on previous screenshot.



Then you click Create Certificate to generate your unique p12 certification.



p12 certificate reg2



Here you assign your certificate path, author is your name, keystore password is the CSK passwork you created from the previous step. Now you are all set. The last step is to follow the original instruction:
"Third, setup the signbar-HaTaX.bat file by opening it up in notepad and
make sure the 3 lines are properly filled out. You should know where
your .p12 file is, and the passwords for both the .p12 and the CSK password.

You're set again! Just drag a BAR file made with apk2bar-HaTaX.bat

onto the batch file in windows explorer and you will get a signed BAR file
ready to be loaded on any Playbook running OS 2.0 with developer mode on.”
You can also check the crackberry forum or this site for a list of compatible apps. 
I have some success but it’s really a hit or miss.

No comments:

Post a Comment

Post a Comment