Revealed: The amazing BlackBerry wizardry that created its 'better Android than Android'
- >>> 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 AMLike 21 - Bla1zeCB OGInteresting 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.
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 AMLike 4 - 11-25-13 05:19 AMLike 10
-
- 11-25-13 07:05 AMLike 3
- BlackBerry's Engineering talent has never really been in question... well, except in roles that start with a capital "C".
Posted via CB1011-25-13 07:17 AMLike 0 - 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.
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 PMLike 0 - 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.
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 PMLike 12 -
-
- Let's have a clean discussion where both sides discuss and we listeners end up learning a lot from the conversation.
Posted via CB1011-25-13 03:09 PMLike 3 - 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 PMLike 0
- Bla1zeCB OGHello 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.
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.
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.
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 PMLike 10 -
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.
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.
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. :P11-25-13 06:16 PMLike 0 -
...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 PMLike 0 - 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 CB1011-25-13 06:46 PMLike 5 - Holy crap what a pissing match this thread has turned into...
Posted via CB10Bor Navas and ShalokShalom like this.11-25-13 07:22 PMLike 2 - CrackberrykillsThe CBKWorks... 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-26-13 01:06 AMLike 0 - 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 CB1011-26-13 01:07 AMLike 0
- Forum
- Popular at CrackBerry
- General BlackBerry News, Discussion & Rumors
- BBRY
Revealed: The amazing BlackBerry wizardry that created its 'better Android than Android'
« Large CDN bank delays BES10 implementation and rollout of BB10 devices
|
Blackberry hit 10 year low today »
Similar Threads
-
(article) The German Government Might Give An Unexpected Boost To BlackBerry
By toc610 in forum General BlackBerry News, Discussion & RumorsReplies: 8Last Post: 12-03-13, 10:50 AM -
[FR] 01net 2014 High Tech awards : BlackBerry Z10
By Superfly_FR in forum General BlackBerry News, Discussion & RumorsReplies: 8Last Post: 11-25-13, 11:33 AM -
Android apps working on the official OS 10.2 ON Q5!
By Bugatti Veyron1 in forum BlackBerry Q5Replies: 1Last Post: 11-25-13, 04:17 AM -
Device switch for blackberry ?
By PaulPaul49 in forum BlackBerry 10 OSReplies: 1Last Post: 11-25-13, 02:45 AM
LINK TO POST COPIED TO CLIPBOARD