Welcome to the CrackBerry Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Page 1 of 18 123411 ... LastLast
Results 1 to 25 of 450
Like Tree47Likes
  1. HaTaX's Avatar
    CrackBerry Master

    Posts
    1,433 Posts
    Thread AuthorThread Author   #1  

    Default Tools to help make the APK -> BAR process easier (UPDATED)

    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!
    So basically just follow those steps to get setup and you'll be on your way to converting and signing your very own Android app.

    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.zip
    Last edited by HaTaX; 12-17-2011 at 04:46 AM.
    Thanked by 72:
    + Show/Hide list of the thanked
    00stryder (12-17-2011),  33497746 (01-01-2012),  afool622 (01-05-2012),  aleem.114 (01-24-2012),  amablek (08-05-2012),  baysed408 (02-28-2012),  bbhybridchris (10-30-2011),  bedpan (12-24-2011),  bioberry (12-31-2011),  bklyneddie (11-01-2011),  bluemax413 (10-20-2011),  bluetroll (02-25-2012),  Bulldawg (02-02-2012),  calvinw1000 (12-30-2012),  cuong205a (12-17-2012),  currentuser (12-19-2011),  daniekl (10-22-2011),  Deathcommand (02-17-2012),  dimm0k (02-23-2012),  djrobinn (10-28-2011),  DOCTOREVIL8 (06-28-2013),  elhsupra (01-12-2012),  emanxp (11-24-2011),  fbloise (12-25-2011),  jeffcrn (11-19-2011),  gnasher666 (10-21-2011),  Guyzer (11-15-2011),  hjkimbrian (03-03-2012),  Iatogenicx (02-24-2012),  irsan (10-20-2011),  irvc.666 (03-07-2012),  jerryburst (03-04-2012),  jon2003 (12-19-2011),  TomCanuck (10-22-2011),  kewlbuddy (01-03-2012),  kn0ff (03-20-2012),  lwaysluking (10-20-2011),  mackie313 (12-06-2011),  Megacharge (12-29-2011),  ministry_of_sound (03-04-2012),  misdeismo (10-20-2011),  Mojoski (10-20-2011),  morfy50 (10-26-2011),  flyingsolid (07-06-2013),  murrayegger (12-22-2012),  NooRoticX (12-27-2011),  pixieloulou (12-04-2011),  plotters07 (05-31-2013),  PowderJockey (03-10-2012),  q649 (10-23-2011),  quorry (03-04-2012),  rafa32gr (12-29-2011),  rais.aslam (10-27-2011),  SlcCorrado (11-07-2011),  Suavechef (10-20-2011),  Somvang1 (10-21-2011),  SoUnCool (10-20-2011),  spid4me (11-19-2011),  strikeIII (10-20-2011),  StringThing (11-29-2011),  supraking (10-21-2011),  Technosnob (02-25-2012),  the.abyzz (10-21-2011),  thetnaung (10-21-2011),  The_Original_Modifier (10-30-2011),  tofo17 (10-20-2011),  Vanderchoac (11-16-2011),  VishRS (02-06-2012),  xShrimp (02-28-2012),  Yosaki (10-21-2011) 
  2. papped's Avatar
    CrackBerry Genius of Geniuses

    Posts
    15,960 Posts
    Global Posts
    17,207 Global Posts
    #2  

    Default

    Awesome.... let the mass apk conversions commence

    Sent from Tapatalk on my Playbook
  3. HaTaX's Avatar
    CrackBerry Master

    Posts
    1,433 Posts
    Thread AuthorThread Author   #3  

    Default

    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.
  4. snakeshea's Avatar
    CrackBerry Newbie

    Posts
    3 Posts
    #4  

    Default

    Amazing!! thank you very much and trying on it now~
  5. papped's Avatar
    CrackBerry Genius of Geniuses

    Posts
    15,960 Posts
    Global Posts
    17,207 Global Posts
    #5  

    Default

    Was just luck actually, lol. Just happened to look at the post right after you made it.

    Sent from Tapatalk on my Playbook
  6. snakeshea's Avatar
    CrackBerry Newbie

    Posts
    3 Posts
    #6  

    Default

    jut try it and seem like not working on my computer. it took 5sec and show me "exiting" but nothing come out to the folder. did i make something wrong?
  7. HaTaX's Avatar
    CrackBerry Master

    Posts
    1,433 Posts
    Thread AuthorThread Author   #7  

    Default

    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.
  8. snakeshea's Avatar
    CrackBerry Newbie

    Posts
    3 Posts
    #8  

    Default

    I put the apk file to some folder and drag it again still nothing happen, may be i should wait for your new link and check it out again. Thank you very much~
  9. T-Joker's Avatar
    CrackBerry User

    Posts
    91 Posts
    #9  

    Default

    I cant find my DEVCERTPASS or CSKPASS password anywhere. Anyway I can retrieve it from my current environment?! I use Flash Builder.

    Very stupid question, do you have to sign the file after the conversion, or is it suppose to work without signing?
  10. Gossieur's Avatar
    CrackBerry Newbie

    Posts
    9 Posts
    #10  

    Default

    Quote Originally Posted by snakeshea View Post
    jut try it and seem like not working on my computer. it took 5sec and show me "exiting" but nothing come out to the folder. did i make something wrong?
    Same here ...
  11. tofo17's Avatar
    CrackBerry Abuser

    Posts
    141 Posts
    Global Posts
    149 Global Posts
    #11  

    Default

    Quote Originally Posted by Gossieur View Post
    Same here ...
    Same with me HataX, I get the "Starting to Convert", "Using Android SDK located at", and "Created BAR file will be placed in" messages followed by "Exiting" but nothing is created.

    Tried a few APKs to be sure.
  12. DangerMouseUK's Avatar
    CrackBerry Addict

    Posts
    840 Posts
    Global Posts
    859 Global Posts
    PIN
    Ask Me
    #12  

    Default

    Same here as well, exiting with nothing created, nothing in log either.
  13. nimrodity's Avatar
    CrackBerry Abuser

    Posts
    386 Posts
    Global Posts
    395 Global Posts
    #13  

    Default

    me too,no file was created
  14. compgen25's Avatar
    CrackBerry Abuser

    Posts
    105 Posts
    Global Posts
    109 Global Posts
    #14  

    Default

    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.
  15. Gossieur's Avatar
    CrackBerry Newbie

    Posts
    9 Posts
    #15  

    Default

    Quote Originally Posted by compgen25 View Post
    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.
    I'm not sure this is the issue, since I have it on Windows XP aswell ...
    john1210 likes this.
  16. Gossieur's Avatar
    CrackBerry Newbie

    Posts
    9 Posts
    #16  

    Default

    Quote Originally Posted by Gossieur View Post
    I'm not sure this is the issue, since I have it on Windows XP aswell ...
    Could you please give me an example of the syntax ??
    I have tried your suggestion but keep getting an error
  17. nimrodity's Avatar
    CrackBerry Abuser

    Posts
    386 Posts
    Global Posts
    395 Global Posts
    #17  

    Default

    trie with command prompt,nothing happened
  18. compgen25's Avatar
    CrackBerry Abuser

    Posts
    105 Posts
    Global Posts
    109 Global Posts
    #18  

    Default

    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.
    Thanked by 3:
    Gossieur (10-20-2011),  nimrodity (10-20-2011),  Vanderchoac (11-16-2011) 
    Gossieur likes this.
  19. Gossieur's Avatar
    CrackBerry Newbie

    Posts
    9 Posts
    #19  

    Default

    Quote Originally Posted by Gossieur View Post
    I'm not sure this is the issue, since I have it on Windows XP aswell ...
    This is the error I get ...
    Attached Thumbnails Attached Thumbnails Tools to help make the APK -> BAR process easier-img-20111020-00104.jpg  
  20. Gossieur's Avatar
    CrackBerry Newbie

    Posts
    9 Posts
    #20  

    Default

    Quote Originally Posted by compgen25 View Post
    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.
    You are a genius !! Got it working ! Thx a lot !!!
    Thanked by:
    compgen25 (10-20-2011) 
  21. compgen25's Avatar
    CrackBerry Abuser

    Posts
    105 Posts
    Global Posts
    109 Global Posts
    #21  

    Default

    Based on that error it appears you are using the full tools from Blackberry and not the tools that HaTax provided. If that is the case I am not sure as I was using HaTax's attached zip file and instructions on the repackage.
  22. nimrodity's Avatar
    CrackBerry Abuser

    Posts
    386 Posts
    Global Posts
    395 Global Posts
    #22  

    Default

    ok the converting worked now,but can i test the bar without signing.
    I dont have the signing keys,does it work without?
  23. Gossieur's Avatar
    CrackBerry Newbie

    Posts
    9 Posts
    #23  

    Default

    Quote Originally Posted by nimrodity View Post
    ok the converting worked now,but can i test the bar without signing.
    I dont have the signing keys,does it work without?
    Well, in my case it didn't ... waiting for a follu up on your question
  24. nimrodity's Avatar
    CrackBerry Abuser

    Posts
    386 Posts
    Global Posts
    395 Global Posts
    #24  

    Default

    i just signed up for the keys,hope it be soon so i can try signing my bars
  25. compgen25's Avatar
    CrackBerry Abuser

    Posts
    105 Posts
    Global Posts
    109 Global Posts
    #25  

    Default

    Quote Originally Posted by nimrodity View Post
    ok the converting worked now,but can i test the bar without signing.
    I dont have the signing keys,does it work without?

    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.
Page 1 of 18 123411 ... LastLast

Posting Permissions