Tools to help make the APK -> BAR process easier
- Well guys, I made some batch files to simplify the loading of BAR files before and now I'm back with some more batch files to streamline the APK to BAR conversion process, and the signing process.
Grab this ZIP file and extract it to the root of your C drive. You should end up with a folder structure like so "C:\apk2bar" that has my "apk2bar-HaTaX.bat" and "signbar-HaTaX.bat" in there.(apk2bar-HaTaX.zip)
If this is your first time dipping your toes into this, all you need besides this file is the Android SDK to get started. And if you plan on sharing these BAR files with others, you should go get yourself some signing keys pronto, they take a few days to get sometimes. That means yes, the Blackberry command line converter and signing tools are in this ZIP file and you don't need to go grab those again.
I don't need to go into detail twice for this, I included a "README" file in the zip that outlines the steps you need to take, so I'll just post the contents of it here:
Code:Hello fellow BlackBerry lovers!!! 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. 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. signbar-HaTaX.bat - This batch file signs the BAR file created by apk2bar-HaTaX.bat. First, make sure you've gone through the steps to get your signing keys from RIM. Start that process at this URL: https://www.blackberry.com/SignedKeys/ Second, get those keys activated and create a working p12 certificate file. Follow the steps at this URL if you need help: http://docs.blackberry.com/en/developers/deliverables/27280/Configure_app_signing_from_cmd_line_1463563_11.jsp 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 created these passwords when you went through step 2 above) 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. Good luck!
Let me know what you think and how it works for you! I'll consider putting together OSX / Linux shell scripts for this if there's enough demand as well.
EDITS:
New version 1.2 posted on 12-17-2011
This version supports multiple files at once, now you can select multiple files to have converted or signed and it will process them one by one. I know, something that would have been more useful a while ago, but better late then never!!
New version 1.1 posted on 11-1-2011
This version now supports long file names in paths and APK names.
Problems with APKs in a root folder of a drive fixed (C:\ for example).
Some additional tweaks to ensure the correct file is passed.
Default output of APK left up to apk2bar application now, they WILL be placed where the original APK was located
Previous versions available:
1.1 - Download apk2bar-HaTaX-1.1.zip
1.0 - Download apk2bar-HaTaX-1.0.zipLast edited by HaTaX; 12-17-11 at 03:46 AM.
10-20-11 01:37 AMLike 73 - D@mn, you is fast papped...
Hopefully this will help the people out that aren't so familiar with the whole process. Only ugly part is getting the signing keys and following the registration instructions to get a working .p12 file. Not much I can do to work around that...
Other then that, it should make the process a lot faster for those that are just testing and dumping these APKs like candy.Blaby likes this.10-20-11 01:41 AMLike 1 - I did notice one small thing, don't have your APKs in the root folder of a drive. It chops the last "\" off and it doesn't have a proper output path then. I'll fix this soon and post up a new link, but for now just put it in "C:\Temp" or something before dragging it over.10-20-11 04:03 AMLike 0
-
- For those of you having issues with this, if you are using Windows Vista or Windows 7 Microsoft changed the behavior of allowing drag and drop on batch files. Dropping the apk file on the .bat file will not work. You will have to open a command prompt and run it from there with the path to the apk file as an argument to the apk2bar-HaTax.bat file. I just confirmed that this does work.erhan8 likes this.10-20-11 09:58 AMLike 1
- For those of you having issues with this, if you are using Windows Vista or Windows 7 Microsoft changed the behavior of allowing drag and drop on batch files. Dropping the apk file on the .bat file will not work. You will have to open a command prompt and run it from there with the path to the apk file as an argument to the apk2bar-HaTax.bat file. I just confirmed that this does work.john1210 likes this.10-20-11 10:05 AMLike 1
- I have not tested on Windows XP. Howerver I am on Windows 7 and dragging the file on top of the bat file was giving me the same issues. I just opened a command prompt and changed directory to where the apk2bar-HaTax.bat file was and ran apk2bar-HaTax.bat {path to apk file} and it worked just fine. Same with the signapk bat file as well. All worked just fine so it is definately not something in the batch file that is not working just how windows is handling the drop.10-20-11 10:34 AMLike 3
- I have not tested on Windows XP. Howerver I am on Windows 7 and dragging the file on top of the bat file was giving me the same issues. I just opened a command prompt and changed directory to where the apk2bar-HaTax.bat file was and ran apk2bar-HaTax.bat {path to apk file} and it worked just fine. Same with the signapk bat file as well. All worked just fine so it is definately not something in the batch file that is not working just how windows is handling the drop.compgen25 likes this.10-20-11 10:44 AMLike 1
-
I do believe you must sign the app to make it work on the OS. You can get free signing keys from RIM to do this. The only way to use unsigned apps is with a debug token which you would get from RIM when you get your signing keys. So either way you will have to get signing keys.10-20-11 11:42 AMLike 0
- Forum
- BlackBerry PlayBook Forums
- PlayBook Apps & Games
Tools to help make the APK -> BAR process easier
LINK TO POST COPIED TO CLIPBOARD