1. MHans's Avatar
    >>> Source: Revealed: The amazing BlackBerry wizardry that created its 'better Android than Android' • The Register <<<

    Exclusive Some remarkable technical wizardry lies behind BlackBerry�s Android coup. When it was launched in January, BlackBerry�s new OS was brand new BlackBerry 10 and largely app-less. But today it can execute Android apps at impressive speed. How did they do it? Thanks to some helpful inside knowledge, The Register will reveal it all.

    Android runs Java applications on a JVM called Dalvik, which runs on a Linux kernel. As it's open source, Dalvik was straightforward to port to QNX, the sophisticated embedded Unix that RIM acquired in 2010, and which powered its PlayBook tablet (released the same year).

    RIM promised that this Android Player would also appear on its first QNX-based phones. But not all apps could run, and there was an insurmountable stumbling block in the way. Android apps may also call native extensions, which are ARM Linux binary libraries. And there was no way of running these on the phones - so the apps couldn�t run either.

    At first, RIM�s engineers attempted to support native extensions by making BB10 another build target for extensions developers. They would choose BB10 as a target at compile time. But this required persuasion. And unless the developer bought into the idea, Android apps that called these Linux ARM extensions wouldn�t run. Even then, the BlackBerry system could not allow side-loading of native apps. It didn�t look like the Android Player would ever be truly worthwhile.
    'Binary blobs'? No probs

    But one or two RIM engineers were convinced they could bridge this gap between native QNX and Linux code. They would attempt to run the Linux extensions natively on QNX, without recompilation or pre-processing. Nobody was quite sure it would work - one source says he was �90 per cent sure� - but management supported the gamble, and the team set about their work in the summer of 2012.

    While Linux and QNX are �Unix like�, that hardly helped. The Linux extensions looked like �binary blobs�, so the RIM engineers couldn�t be sure what was code and what was data. Which meant they couldn�t inspect and patch the Linux libraries on the fly, something called opcode substitution. It also ruled out pre-processing.

    "We had to let the SWIs trigger live and discern whether it came from a Linux binary or a QNX binary at runtime, without sacrificing performance of QNX code," a source familiar with the work told us:

    �Our work used a wide, labour-intensive component: dynamic cross linking, validating and shimming of the Linux APIs on QNX, and a really deep and tricky hack: catching syscalls in apps that bypassed libs, or had libs statically linked.�

    "Linux and QNX used the same ARM SWI instruction, but passed the syscall number in different registers.�

    Surprisingly, perhaps, gaming applications proved the easiest to get running smoothly. There were more hurdles, however.

    "Skype and Instagram were much more insinuated into Android services and required a lot more work. I believe one of Skype or Instagram even had self-modifying code as part of its security obfuscation, which would have killed any strategy that involved translating the binaries,� our source told us.

    Nevertheless the team could demonstrate unmodified Skype, Instagram and Angry Birds Android apps to management and got the green light to productise their work. In BB 10.2.1, which is currently in beta testing, we can start to see the benefits.

    As I wrote here (incorrectly assuming that the Android runtime uses hardware acceleration - it doesn�t) modern BlackBerry machines will be able run Android apps in place without side-loading. Users can download Instagram and it works. The miracle of compatibility is thanks to the extensions support.

    It�s an ambitious �hack� - in the old-school sense of the word, an ingenious piece of wizardry - that has thrown BlackBerry a lifeline. And just when it needs it. Here�s hoping it�s a reminder to BlackBerry�s new management to appreciate the talent of its engineers. �
    11-25-13 04:05 AM
  2. Bla1ze's Avatar
    Interesting piece. Most of it is accurate but some of it just plain wrong.

    As I wrote here (incorrectly assuming that the Android runtime uses hardware acceleration - it doesn’t) modern BlackBerry machines will be able run Android apps in place without side-loading. Users can download Instagram and it works. The miracle of compatibility is thanks to the extensions support.
    Fool is talking about the splendors of 10.2.1 and doesn't know that hardware acceleration was brought with 10.2+? Smh.

    Also not sure why it's an 'exclusive' lol. Nothing they've done has been a secret and nothing that article says hasn't been documented already across numerous blogs including the BlackBerry Developer Blog itself., maybe they just have exclusive quotes or something.
    11-25-13 04:12 AM
  3. BB10user07's Avatar
    One thing is for sure, bb engineering talent is top class and second to none.

    Posted via CB10
    11-25-13 05:19 AM
  4. parthokarki's Avatar
    Thumbs up!!

    Posted via CB10
    11-25-13 05:26 AM
  5. Shanerredflag's Avatar
    Smell test...is this good news???
    Yes, yes it is
    Thx for sharing.

    Posted via CB10
    11-25-13 07:05 AM
  6. AnimalPak200's Avatar
    BlackBerry's Engineering talent has never really been in question... well, except in roles that start with a capital "C".

    Posted via CB10
    11-25-13 07:17 AM
  7. dusdal's Avatar
    We're very fortunate to be able to keep this talent in Canada.

    Posted via CB10
    11-25-13 01:32 PM
  8. Dunt Dunt Dunt's Avatar
    As I wrote here (incorrectly assuming that the Android runtime uses hardware acceleration - it doesn’t) modern BlackBerry machines will be able run Android apps in place without side-loading. Users can download Instagram and it works. The miracle of compatibility is thanks to the extensions support.
    Works... Yes. Works as well as it should... NO. Can not send pictures from within other BlackBerry apps and when searching for pictures, I don't get thumbnails, so you have to know the files name you are looking for.

    But there is a lot of potential here... just don't expect that a version 10.2.1.1055 is going to change anything for average consumers. Maybe 10.3 will (along with better hardware) (along with marketing) (along with carriers actually carrying devices)....
    11-25-13 01:55 PM
  9. AndrewOrlowski's Avatar
    Hello everyone. I'm a BB10 user and I wrote the article at The Register.

    Interesting piece. Most of it is accurate but some of it just plain wrong.


    Fool is talking about the splendors of 10.2.1 and doesn't know that hardware acceleration was brought with 10.2+? Smh.

    Also not sure why it's an 'exclusive' lol. Nothing they've done has been a secret and nothing that article says hasn't been documented already across numerous blogs including the BlackBerry Developer Blog itself., maybe they just have exclusive quotes or something.
    Sorry Bla1ze, you've been misled about hardware acceleration. The article is accurate, it describes a very cool hack that allows native Linux extensions to run on QNX in 10.2.x. This which in turn increases compatibility so it allows the .apks to be run without conversion, . BlackBerry hasn't talked about this yet.

    Oh. And calling reporters "fools" who research and write stuff like this doesn't make you look cool. I hope you're not representative of the CrackBerry community.
    11-25-13 02:41 PM
  10. m1a1mg's Avatar
    This should be fun.
    Shanerredflag and 00stryder like this.
    11-25-13 02:44 PM
  11. thevizer's Avatar
    *grabs popcorn bowl*

    Posted via CB10
    Shanerredflag likes this.
    11-25-13 02:49 PM
  12. portal's Avatar
    Let's have a clean discussion where both sides discuss and we listeners end up learning a lot from the conversation.

    Posted via CB10
    11-25-13 03:09 PM
  13. Dunt Dunt Dunt's Avatar
    Comments for the article are interesting.... someone always brings up the PlayBook and will this help us get BB10 on the PlayBook?
    11-25-13 03:27 PM
  14. Bla1ze's Avatar
    Hello everyone. I'm a BB10 user and I wrote the article at The Register.



    Sorry Bla1ze, you've been misled about hardware acceleration. The article is accurate, it describes a very cool hack that allows native Linux extensions to run on QNX in 10.2.x. This which in turn increases compatibility so it allows the .apks to be run without conversion, . BlackBerry hasn't talked about this yet.

    Could have fooled me. You are correct in saying that your description of it has never been outlined but again, the information of its existence has been known for quite some time. As far back as June if not longer.

    Prepare Yourself, an Android Runtime Update is Coming! «BlackBerry Developer Blog

    The Android Runtime team has been hard at work this year, bringing many new improvements to the runtime, such as support for Jelly Bean 4.2.2, hardware acceleration and performance updates. The team is continuing the quest to improve the overall compatibility of the runtime and add support for many highly requested features and APIs.
    http://developer.blackberry.com/andr...ase_notes.html

    Hardware acceleration Support

    Android applications built for API level 14 can access hardware acceleration by default. Hardware acceleration can improve the performance and smoothness of an app.
    https://developer.blackberry.com/android/tools/roadmap/

    Revealed: The amazing BlackBerry wizardry that created its 'better Android than Android'-screen-shot-2013-11-25-5.55.55-pm.png
    http://crackberry.com/talking-os-102...system-builder

    That said, the deeper integration between BlackBerry 10 and Android in 10.2.1 is garnering a massive amount of attention from users, as with this update BlackBerry 10 owners can now install Android .apk files (actual Android apps) directly onto their phone.
    Q5. What are the requirements to get started with installing Android .apk files on my phone?
    A5. Pretty straight forward here. You'll need a BlackBerry 10 phone (Z10, Z30, Q10, Q5, etc.) and BlackBerry OS version 10.2.1 or higher.
    You were saying?

    I enjoyed your article and appreciate the outlining of how it was all done but other than the exact breakdown explanation of it all, there wasn't anything relatively unknown in the article. Anyone who has actually been paying attention to the BlackBerry space, especially developers, has already known this and if you researched it as much as you imply to of have then surely you would have come across the developer blogs covering it, the developer documentation covering it and likely even CrackBerry's own interview with Alec Saunders outlining it.

    But I digress, I'm not looking to have some sort epenis battle with you over it all, I have better things to do with my time and the information stands for itself. Anyone who genuinely cares can see that for themselves. I also apologize for calling you a 'fool, even though I didn't quite mean it to be a 'nasty' term.

    11-25-13 03:50 PM
  15. szlevi's Avatar
    Interesting piece. Most of it is accurate but some of it just plain wrong.


    Fool is talking about
    That was pretty uncalled for... even if he is, why the jerk response, seriously?
    Justam likes this.
    11-25-13 06:10 PM
  16. szlevi's Avatar
    Hello everyone. I'm a BB10 user and I wrote the article at The Register.
    Hi,

    how about approving my post, sitting there with the same correction about HW acceleration, since the afternoon...?

    Sorry Bla1ze, you've been misled about hardware acceleration. The article is accurate, it describes a very cool hack that allows native Linux extensions to run on QNX in 10.2.x. This which in turn increases compatibility so it allows the .apks to be run without conversion, . BlackBerry hasn't talked about this yet.
    Well, it was clearly posted in the June beta of 10.2, see my roadmap link in the waiting post...

    Oh. And calling reporters "fools" who research and write stuff like this doesn't make you look cool.
    I agree, it was a jerk move but...

    I hope you're not representative of the CrackBerry community.
    ...pleahhhhse, c'm,oooon, really?
    As an El Reg regular I read more than enough "freetards" and all that stupid name-calling from you in every other piece of yours, mostly without even giving us, commentariat, a chance to react... stop acting like you are not a giant hammer half the time. :P
    11-25-13 06:16 PM
  17. szlevi's Avatar
    I've posted the same thing in the afternoon but considering he's in the UK it was probably way too late for him to approve...

    ...that being said I think you should hold your horses with the name calling, at least with press folks who are BB10-friendly, let alone actual users - there are not too many left with such an open-minded approach toward BB, they are a rare species nowadays...
    11-25-13 06:20 PM
  18. allisos's Avatar
    It's sad that negative BlackBerry articles get negative reactions here, and positive BlackBerry articles get negative reactions here....

    Perhaps the community should have some "in the locker room" discussion, so that the soap opera plays out behind closed doors, and the readers can benefit from shared information without the rhetoric. After all, why is it bad that information that may be old, gets re-posted?? Don't you want good news being shared continuously? Spread the good side of the brand and all?

    Posted via CB10
    11-25-13 06:46 PM
  19. app_Developer's Avatar
    Isn't this just lxrun? Did they rewrite lxrun from scratch? I don't understand.


    Sent from my iPhone 5S using Tapatalk
    11-25-13 06:50 PM
  20. GooberNS's Avatar
    Holy crap what a pissing match this thread has turned into...

    Posted via CB10
    Bor Navas and ShalokShalom like this.
    11-25-13 07:22 PM
  21. BCITMike's Avatar
    @ reporter : please clarify the hardware acceleration support expected, given the road map said it was there months ago.
    Reading your article, lots of people will remember seeing the road map months back and call shenanigans on you.

    Posted via CB10
    11-25-13 07:39 PM
  22. Bla1ze's Avatar
    That was pretty uncalled for... even if he is, why the jerk response, seriously?
    I already apologized.
    bspence87 likes this.
    11-26-13 12:30 AM
  23. Crackberrykills's Avatar
    Works... Yes. Works as well as it should... NO. Can not send pictures from within other BlackBerry apps and when searching for pictures, I don't get thumbnails, so you have to know the files name you are looking for.

    But there is a lot of potential here... just don't expect that a version 10.2.1.1055 is going to change anything for average consumers. Maybe 10.3 will (along with better hardware) (along with marketing) (along with carriers actually carrying devices)....
    I don't have that problem with Insta. Strange.
    11-26-13 01:06 AM
  24. MHans's Avatar
    Agreed. As a BB 10 user, most of the information's given in the article are interesting for me. For developers this might be updated long ago in the tech blogs. But for a normal user i think these information's are still vital and i cannot see any harm in re-posting it.

    It's sad that negative BlackBerry articles get negative reactions here, and positive BlackBerry articles get negative reactions here....

    Perhaps the community should have some "in the locker room" discussion, so that the soap opera plays out behind closed doors, and the readers can benefit from shared information without the rhetoric. After all, why is it bad that information that may be old, gets re-posted?? Don't you want good news being shared continuously? Spread the good side of the brand and all?

    Posted via CB10
    11-26-13 01:07 AM
  25. MHans's Avatar
    By the way, welcome to CB community :-) I hope you will enjoy the forum since you are BB10 user.

    Hello everyone. I'm a BB10 user and I wrote the article at The Register.
    ghundiraj likes this.
    11-26-13 01:09 AM
169 123 ...

Similar Threads

  1. (article) The German Government Might Give An Unexpected Boost To BlackBerry
    By toc610 in forum General BlackBerry News, Discussion & Rumors
    Replies: 8
    Last Post: 12-03-13, 10:50 AM
  2. [FR] 01net 2014 High Tech awards : BlackBerry Z10
    By Superfly_FR in forum General BlackBerry News, Discussion & Rumors
    Replies: 8
    Last Post: 11-25-13, 11:33 AM
  3. Android apps working on the official OS 10.2 ON Q5!
    By Bugatti Veyron1 in forum BlackBerry Q5
    Replies: 1
    Last Post: 11-25-13, 04:17 AM
  4. Device switch for blackberry ?
    By PaulPaul49 in forum BlackBerry 10 OS
    Replies: 1
    Last Post: 11-25-13, 02:45 AM
LINK TO POST COPIED TO CLIPBOARD