Built for Business - Learn more about BlackBerry KEY2
  1. Matt Jude's Avatar
    Hi All,

    This is a nifty solution I came up with to alter a 'no-icon' or in most cases a background application, to install properly on BB10.. This may include process based apps, unlockers, add-ons, themes, but in general - APKs that look like this in the install screen (No-icon):
    HOW TO: Successfully install any 'no-icon' or background process APK without errors-img_20141124_085615.png

    This is a theme for the excellent file manager ES File Explorer. Normally one would get the above error message when trying to install it. This happens because there is no LAUNCHER ICON defined in the APK Manifest. BB10 needs this launcher icon in order to manage the app in the BB10 app manager AND providing the ability to unistall it from the BB10 launcher. In the following steps I'll show you how to modify the APK in order to successfully install it.

    In this example I will use the above APK file, ES Classic Theme. And for comparison another APK, Yatse Unlocker a paid XBMC Remote. You will need the following program to edit the manifest:

    APK Studio

    STEP ONE
    Open up APK Studio and click on Decompile APK:
    HOW TO: Successfully install any 'no-icon' or background process APK without errors-capture1.jpg

    STEP TWO
    In the side panel, double click on AndroidManifest.xml and you should be presented with something like this in the edit window:

    com.estrongs.android.pop.classic
    Code:
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.estrongs.android.pop.classic">
        <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"/>
    </manifest>
    or this (from Yatse Unlocker):
    org.leetzone.android.yatsewidgetunlocker
    Code:
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.leetzone.android.yatsewidgetunlocker">
        <permission android:name="org.leetzone.android.yatsewidgetunlocker.LICENSING" android:protectionLevel="signature"/>
        <uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
        <application android:icon="@drawable/ic_yatse_default" android:label="@string/app_name">
            <activity android:label="@string/app_name" android:name="org.leetzone.android.yatsewidgetunlocker.UnlockActivity"/>
            <meta-data android:name="com.florianmski.tracktoid.apiKey" android:value="[REDACTED]"/>
        </application>
    </manifest>
    If you're not familiar with xml what this basically defines is the universal package name, permissions, icon, label, authentication keys if any, and any instances of the applications part of the package. The above does not include <service> which you may see in other relevant apks, that would define a background process, much like the windows services you find in task manager.

    STEP THREE
    You may stumble upon some thing like this as in the first example:
    Code:
       <application android:..... />
    </manifest>
    This one-liner defines the application with no real 'activities' or 'processes'. This must be edited with the below code so we can include the required launcher icon as an app activity:
    Code:
       <application android:.....  >
    
       </application>
    </manifest>
    Take note in changing the "/>" to just a ">" and inserting "</application>" above "</manifest>".

    if you see the </application> already, such as in the second example in STEP TWO, you are good to go with the following edit...

    STEP FOUR - THE EDIT
    Add in the following just above the line </application>:
    Code:
            <activity android:name=".bblauncher">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.LAUNCHER"/>
                </intent-filter>
            </activity>
    This will add in the MAIN/LAUNCHER activity which is missing from the manifest (which causes the installation of the APK to fail on BB10).

    Take note: you can add a custom label for the launcher icon by adding android:label="STRING" straight after <activity , replacing STRING with your chosen label, you can even make it " " for a blank name.

    STEP FOUR - SAVE, BUILD, INSTALL
    Once you've done the above edit, first click save to amend the manifest and then click on build:
    HOW TO: Successfully install any 'no-icon' or background process APK without errors-capture.jpg

    You will see your build on the side panel as rebuilt.apk. Rename this and copy it over to your phone for installation. You may also convert it to a .bar for sideloading in sachesi as well if desired. Install the app and you will now see an icon next to the package name like so:
    HOW TO: Successfully install any 'no-icon' or background process APK without errors-img_20141124_110310.png

    You shouldn't have any issues installing this APK now. You may uninstall as per the usual method, from the BB launcher or from Android App Info. Since this app was NOT intended to be shown in a launcher, trying to launch it WILL fail - this icon is merely a dummy.

    I hope this guide was clear enough to help and if you have any troubles editing your manifest files please post the code for feedback. This is my first time posting a guide on CB so if you have anything to add to these instructions please let me know and I will edit accordingly.

    Thanks!

    Matt
    Last edited by Matt Jude; 11-24-14 at 03:46 PM.
    11-24-14 06:06 AM
  2. zocster's Avatar
    Thanks for this!
    11-24-14 09:17 AM
  3. LostOnThePianoRoll's Avatar
    I will wait till someone creates a batch or something for this. But you sir are a GENIUS! I've wanted to install an android video converter for a year.. I try it with every new update but the "codex" apk always fails.. I think I'll try this soon.

    Posted via CB10 on my Z10STL100-1/10.3.1.821
    11-24-14 09:40 AM
  4. Matt Jude's Avatar
    Heya,

    Post a store link to the apk and i'll patch it for you

    Posted via CB10
    11-24-14 09:45 AM
  5. LostOnThePianoRoll's Avatar
    I downloaded it from 1mobile and uploaded it on dropbox for you

    https://db.tt/In4R0wWW

    You will make me really happy if that works haha

    Posted via CB10 on my Z10STL100-1/10.3.1.821
    11-24-14 10:27 AM
  6. Matt Jude's Avatar
    Okay, i successfully patched it according to my procedure above and it installs perfectly on my Z30.

    DOWNLOAD: https://db.tt/LuWley3D
    LostOnThePianoRoll likes this.
    11-24-14 12:56 PM
  7. LostOnThePianoRoll's Avatar
    OMG it workedd!!
    You just turned the one last feature that I couldn't get to work on BlackBerry no matter what I tried into something doable. I can finally convert videos
    Thank you, wiz!!

    Posted via CB10 on my Z10STL100-1/10.3.1.821
    Matt Jude likes this.
    11-24-14 01:26 PM
  8. Matt Jude's Avatar
    Totally my pleasure =P
    11-24-14 01:28 PM
  9. Cobalt232's Avatar
    Nice tutorial. If you want the app or the service to have the original Icon you can add android:icon"@drawable/nameOfIcon" to the application tag. Replace nameOfIcon with the name of the app png file in folder res/drawable

    Example:

    <application android:icon"@drawable/ic_launcher" android:label="Appname" android:theme="@style/AppTheme .....

    You may also want to look at my patcher that fixes most of the problems in AndroidManifest (but not missing icons or launch intents).

    Link is in my signature.
    Matt Jude and Furell like this.
    11-25-14 04:23 PM
  10. lindaandjon's Avatar
    Should this work with paid apps to? It seems to say that in the text but I can't get it to work with OSMand+ Contour lines plug in. It fails to decompile it.
    07-04-15 04:17 AM
  11. Avneesh Asija's Avatar
    Hi! I tried decompiling a couple of apps but it shows - Failed to decompile. Any idea how to solve this?
    HOW TO: Successfully install any 'no-icon' or background process APK without errors-capture.jpg
    08-19-15 08:15 AM
  12. JakeSisko's Avatar
    Nice tutorial. Thank you. Just succeeded in installing the OsmAnd+ Contour Lines plugin on my Passport.

    It did not work by just following your steps, though. The app would still not install. I also had to sign the re-built apk. After that the app let itself install like a charm.
    12-26-15 06:30 PM
  13. xpnoiboix's Avatar
    Nice tutorial thx!

    Edit:
    Had this issue for some time now

    Posted via CB10
    12-28-15 05:20 PM
  14. lindaandjon's Avatar
    Jake - how did you get the contour lines to decompile?

    Posted via CB10
    01-25-16 05:23 AM
  15. JakeSisko's Avatar
    Jake - how did you get the contour lines to decompile?
    Jon,

    I bought the plugin through the Amazon app store and downloaded it onto the phone. At the stage when I was asked to install it I did not continue but grabbed the apk file from the download folder and copied it onto my computer. I think it was /mnt/sdcard/Android/data/com.amazon.venezia/files/apks. From there I just followed the steps described by Matt + the signing of the app in the end. I did not experience any difficulties. Used APKStudio d49d3de on Windows 7.
    01-26-16 01:20 PM
  16. lindaandjon's Avatar
    OK thanks

    Posted via CB10
    02-02-16 04:05 AM
  17. lindaandjon's Avatar
    I can do the decompile and have installed a keystore but cannot get it to Sign. It just returns an error -1 all the time, any idea what I'm doing wrong anyone please? or would anyone be kind enough to sign this app for me please?
    02-05-16 06:26 AM
  18. JakeSisko's Avatar
    Hi Jon, I signed the apk as described at the bottom of this page: developer .android. com/tools/publishing/app-signing.html. (I am not allowed to post links so I added some spaces in the URL) I did not get it to sign with apkstudio, either.

    Mind that the needed tool is not included in the standard Windows Java installation. You need the Java development kit.

    Posted via CB10
    02-16-16 07:21 AM
  19. lindaandjon's Avatar
    OK thanks Jake, i'll give that a go...

    Posted via CB10
    02-17-16 03:11 AM
  20. lindaandjon's Avatar
    Hi Jon, I signed the apk as described at the bottom of this page: developer .android. com/tools/publishing/app-signing.html. (I am not allowed to post links so I added some spaces in the URL) I did not get it to sign with apkstudio, either.

    Mind that the needed tool is not included in the standard Windows Java installation. You need the Java development kit.

    Posted via CB10
    I had tried that page and couldn't get that to work either. If I could get this working then I'd be perfectly happy with my Z30 for a long time to come. But I really would like contours as we cycle lots and they are pretty useful!
    02-18-16 08:46 AM
  21. Chris_R's Avatar
    I can't get this to work, using this method (am not a programmer..). Btw, I cannot see the rebuilt.apk but it seems to overwrite the existing file. In any case, I still can't install the file (I've purchased the contour lines).
    Anyone keen on "patching" this for me?
    08-12-16 04:26 PM
  22. Chris_R's Avatar
    No one? Maybe the thread is too old and obsolete in a few months' time anyway...

    Classic .2876
    08-16-16 01:40 AM
  23. crawfells's Avatar
    After lots of trial and error (mostly error) I decided to do a bit of investigation and learning about APKs and App signing etc, I managed to work out how to sign the app, and it finally worked!! Quite a big bit to leave out of the initial instructions, but thanks anyway as I would have had no idea what to modify the code to otherwise!

    For the signing part, that isn't included in the instructions: I downloaded the sign.jar / signapk.jar package and then just used the java -jar sign.jar "myapk.apk" command to sign it (if anyone wants to know how it's done).
    12-30-16 10:30 AM

Similar Threads

  1. Is BBM any more secure than texting?
    By HomeyJay in forum General BlackBerry Discussion
    Replies: 10
    Last Post: 11-25-14, 01:47 AM
  2. Replies: 1
    Last Post: 11-24-14, 09:47 AM
  3. Replies: 3
    Last Post: 11-24-14, 09:06 AM
  4. BT in early talks to purchase O2 or EE
    By CrackBerry News in forum CrackBerry.com News Discussion
    Replies: 0
    Last Post: 11-24-14, 06:00 AM
  5. Sharing Photos via Blutooth to ipad
    By drfever in forum BlackBerry 10 OS
    Replies: 2
    Last Post: 11-24-14, 05:56 AM
LINK TO POST COPIED TO CLIPBOARD