1. WhiteSpir1t's Avatar
    *UPDATE: App crashes. too buggy, but i'll leave it here for anyone to try. it could be the issue with the android runtime on the blackberry 10. in the meantime, im waiting for new signature files from blackberry to redo an older version of this app.*

    Too many apk to bar request and conversion website only hosts old binaries. My first apk to bar conversion. Not for the faint of heart. If you're not comfortable with the Terminal, I'd suggest just downloading the app and move on and not mucking around with the command line interface.

    I got tired of looking for iHeartRadio so I went at it myself. Free to download if any of you want it.

    Things you'll need:

    1) apk2bar-HaTaX-1.1.zip from google. All documentation from converting apk -> bar and signing bar file is in the readme. Sideloading tool also included.
    2) an apk file you want to convert
    3) code signing keys from BlackBerry @ https://www.blackberry.com/SignedKeys/codesigning.html
    4) android SDK Tools grab @ Android SDK | Android Developers
    5) Playbook_Tools.zip yes google it.

    Though the author of apk2bar created 2 batch files to simplify conversion and signing process, it was made for Windows. Who uses Windows when you have a Mac?

    =================================
    Detail of apk to bar conversion on my Mac: 0 Failures!

    Go into bin folder of HaTaX package and issue the below commands:
    =================================
    Registering your 2 CSJ files from RIM:

    sh-3.2# ./blackberry-signer
    blackberry-signer version 1.4.0
    Copyright (C) 2010,2011 Research in Motion Limited
    This application signs and verifies BAR (BlackBerry Archive) files.
    Usage:
    blackberry-signer -register -storepass <password> -csjpin <csj-pin> [<options>] (<csj-file>)*
    blackberry-signer -storepass <password> [<options>] <bar-file> (<key-name>)+
    blackberry-signer -verify [<options>] <bar-file>

    blackberry-signer -csksetup -cskpass <csk-password> [<options>]
    blackberry-signer -cskdelete [<options>]
    Where:
    <password> - password for CSK file and keystore
    <csj-file> - input CSJ file for registration
    <csj-pin> - PIN associated with CSJ file(s)
    <bar-file> - input/output BAR file
    <key-name> - optional list of keys e.g. RDK, PBDT, AUTHOR
    <csk-password> - password for CSK file

    <options> are:
    -incrementPackageVersion - increments the Package-Version before signing
    -incrementApplicationVersion - increments the Application-Version before signing
    -keystore <file> - file containing developer certificate
    -signedbar <file> - name of signed bar file
    -verbose - verbose output when signing/verifying
    -certs - display certificates when verbose and verifying
    -proxyhost <host> - proxy host
    -proxyport <port> - port number for connecting to the proxy host
    -proxyusername <username> - username for the proxy host (optional)
    -proxypassword <password> - password for the proxy host (optional)

    Examples:
    Registers a new account with RIM using the CSJ files received and CSJ PIN '746398'
    If running for the first time, a new encrypted CSK file and a new encrypted developer
    certificate is created with password 'rocket11'.
    blackberry-signer -register -storepass rocket11 -csjpin 746398 client-RDK-7364904417.csj client-PBDT-7364904417.csj

    Sign the file 'application.bar' using the password 'rocket11' to retrieve the CSK file
    and developer certificate.
    blackberry-signer -storepass rocket11 application.bar

    Verifies the 'application.bar' is properly signed.
    blackberry-signer -verify application.bar
    sh-3.2# ./blackberry-signer -register -csjpin 00000000 -storepass xxxxxxxxxx /Users/ThongBanger/Downloads/client-RDK-1111111.csj /Users/ThongBanger/Downloads/client-PBDT-1111111.csj
    Info: CSK file created.
    Info: Developer certificate created in /var/root/Library/Research In Motion/author.p12
    Info: Successfully registered with server.
    Info: Successfully registered with server.
    ================================================== =============
    Converting your Bar:

    sh-3.2# ./apk2bar

    apk2bar is a tool to verify & convert apk files to bar files.

    Usage :
    apk2bar <apk file/folder> [<black list file>] [<Android SDK path>] [-t <bar folder>][-w[1-5]] [-m] [-rv]

    Where:
    <apk file/folder> - the relative or absolute path of an apk file or a folder containing apk files

    [<blacklist file>] - optional path to a custom blacklist file; If specified along with the -w[<l>] option will force re-verification

    [<Android SDK path>] - the path of Android SDK; If not specified mut set %ANDROID_HOME% system env variable

    [-t <bar folder>] - optional target folder where the bar(s) will be generated; Otherwise will be the apk source folder

    [-w[1-5]] - if specified, will filter bar generation only for warnings under this level [1..5];-w with no level specified means -w5

    [-a <author name>] - Package-Author name for the bar files otherwise will use %USERNAME%

    [-d [<debug-token file>]] - set Application-Development-Mode: true with optional debug-token file to re-use Package-Author /Id from

    [-m] - use custom manifest files from the source apk folder, e.g. Helloworld.apk to use Helloworld.MF
    [-rv] - re-verify against the blacklist before generating the bar(s) regardless of context

    [-etr (default) |-etl | -etn] - Entry-Point-Name -truncate-right (default), -truncate-left or no-truncation

    [-cg | -cm] - set Application-Category: core.games | core.media

    [-R] - find .apk files recursively

    sh-3.2# ./apk2bar ./iHeartRadio_v4.6.2_U8815.apk /Users/ThongBanger/Documents/BlackBerry10/apk2bar/adt-bundle-mac-x86_64-20130219/sdk -t .
    [BarGenerator]
    [BarGenerator] Start packaging iHeartRadio_v4.6.2_U8815.apk
    [BarGenerator] iHeartRadio_v4.6.2_U8815.apk ............................ succeeded
    [BarGenerator] Summary: Total Apk files # 1; succeeded: 1; skipped: 0; failed: 0
    ================================================== =================
    Signing Your Bar:

    sh-3.2# ./batchbar-signer
    Usage:
    batchbar-signer <bar-dir>|<bar-file> <dev cert path> <dev cert password> [<csk password>][-t <target signed bar(s) dir>]

    Where:
    <bar-dir>|<bar-file>
    A directory containing source bars or a single .bar file
    <dev cert path>
    The developer certificate store path (*.p12)
    <dev cert password>
    The developer certificate store password
    [<csk password>]
    Optional csk password for RIM Key Signing or same as the store pass
    [-t <target signed bar(s) dir>]
    Optional target directory for signed bar(s)
    If omitted, the source dir will be the target
    logFile:log/BatchBarSigner_20130423_153747.log
    sh-3.2# ./batchbar-signer ./iHeartRadio_v4.6.2_U8815.bar /author.p12 xxxxxxxxxx xxxxxxxxxx
    logFile:/Users/ThongBanger/Documents/BlackBerry10/apk2bar/bin/./log/BatchBarSigner_20130423_153953.log
    cp: /Users/ThongBanger/Documents/BlackBerry10/apk2bar/lib/EccpressoJDK15ECC.jar:/Users/ThongBanger/Documents/BlackBerry10/apk2bar/lib/EccpressoAll.jar:/Users/ThongBanger/Documents/BlackBerry10/apk2bar/lib/BarPackager.jar:/Users/ThongBanger/Documents/BlackBerry10/apk2bar/lib/BarSigner.jar
    [iHeartRadio_v4.6.2_U8815.bar] Signed

    Total signed bars#: 1 Failed#: 0
    sh-3.2#
    ================================================== ==================
    SIDELOAD YOUR BAR:

    -Generate rsa key without quotes:

    "ssh-keygen -b 4096 -t rsa"

    -Turn on Developer Mode in Settings and establish a BlackBerry connect link to device with command without quotes:

    "blackberry-connect YOUR_DEVICEIP -password YOUR_DEVICE_PASSWD -sshPublicKey id_rsa.pub"

    -Now go inside the Playbook_Tools directory and sideload the bar! (without quotes)

    "java -Xmx512M -jar BarDeploy.jar -installApp -device DEVICE_IP -password DEVICE_PASSWORD appname.bar"
    Attached Files
    Last edited by WhiteSpir1t; 04-23-13 at 04:52 PM.
    YYZ_AKS likes this.
    04-23-13 03:48 PM
  2. YYZ_AKS's Avatar
    good looking out op
    04-23-13 04:34 PM
  3. DawnMills's Avatar
    How's it working? Are you happy with the results?
    04-23-13 04:36 PM
  4. WhiteSpir1t's Avatar
    How's it working? Are you happy with the results?
    Just sideloaded it. Too damn buggy. It played once and now it crashes and forces to close. Nonetheless, this is the down and dirty way to sign. As soon as I get the new signature files from BlackBerry, I'll convert the older versions of iHeartRadio and see how those run. It may be that the new version requires new Android runtime on BlackBerry 10.

    UPDATE** nothing works. Bahhhh humbug!
    Last edited by WhiteSpir1t; 04-25-13 at 01:45 AM.
    04-23-13 04:50 PM
  5. travisredpath's Avatar
    Although informative about the conversion process you could have just searched for one of the other threads about iHeartRadio instead of making a new one. They are using a native aac decoder library so the app will never be able to play any audio and will just crash when it tries without modification by iHeart.
    04-23-13 08:05 PM
  6. Bla1ze's Avatar
    LOL @ ThongBanger.
    04-23-13 08:09 PM
  7. WhiteSpir1t's Avatar
    Although informative about the conversion process you could have just searched for one of the other threads about iHeartRadio instead of making a new one. They are using a native aac decoder library so the app will never be able to play any audio and will just crash when it tries without modification by iHeart.
    That's good to know after all these million years :/

    How is it that other radio apps are able to stream AAC without a problem on the Z10?
    04-25-13 01:43 AM
  8. travisredpath's Avatar
    How is it that other radio apps are able to stream AAC without a problem on the Z10?
    If they're native apps than this issue isn't there, they can use native code. Android ports could use something like JAAD to do aac decoding which would work on BB10 although I don't know what the performance loss would be like.
    04-25-13 10:09 AM

Similar Threads

  1. Replies: 3
    Last Post: 04-28-15, 09:50 PM
  2. Put App Title When Requesting .apk to .bar Conversions
    By bluetroll in forum PlayBook Apps & Games
    Replies: 4
    Last Post: 07-06-14, 03:20 PM
  3. Help with converting APK to BAR
    By jcool13 in forum PlayBook Apps & Games
    Replies: 6
    Last Post: 10-11-13, 12:48 PM
  4. APK to BAR conversion request
    By mysticpoo in forum PlayBook Apps & Games
    Replies: 31
    Last Post: 07-17-13, 10:46 PM
  5. Replies: 2
    Last Post: 02-21-12, 01:33 PM
LINK TO POST COPIED TO CLIPBOARD