If it uses QNX rather than Linux, of course it is going to be better than Android...
Meet the BlackBerry wizardry that created its 'better Android than Android'
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 …
-
-
Monday 25th November 2013 09:31 GMT Anonymous Coward
"If it uses QNX rather than Linux"
I don't see why the downvote. QNX is not Unix, it is a POSIX-compliant OS designed from the bottom up for reliability and efficient multitasking in machines that are relatively light on resources. As such, it should be a better fit for a mobile phone than Android, which is based on Linux, originally conceived as a Unix-like substitute in larger machines.
Personally I use a Q10 and so have no interest in running anything Android on it, but it's an impressive engineering achievement to get Android apps working properly on the Z10/Z30.
-
Monday 25th November 2013 16:08 GMT sorry, what?
Re: "If it uses QNX rather than Linux"
I feel compelled to say that, whilst what you say may be essentially correct, Linux started life long enough ago that many of the phones we have in our pockets are actually of a better spec in processor and memory terms than the devices on which Linux was run back in the day. The issue is efficiency and therefore reduced power usage and, I suspect, there won't be a huge amount of difference between the two (said in an uninformed and glib manner).
I have been an Android user for several years now. The thing that I have come to dislike is the way I feel spied on by Google and its continuous slurping of data. For third party apps I never accept certain permission combinations but for those core Googly ones (like gmail and maps) you're basically stuffed because Google can do whatever it wants. On the device or 'in the cloud'. Same applies to the Play Store itself.
Not to say that I'd switch to BB. Mainly because I can't see them surviving. And I hate the Apple premium, so that's a no. Windows Phone? Not a chance; I seriously dislike the UX. So I'm left wondering if there are any decent Android branches that improve the privacy side of things...
-
Monday 25th November 2013 19:41 GMT Richard Plinston
Re: "If it uses QNX rather than Linux"
> Linux, originally conceived as a Unix-like substitute in larger machines.
Linux originally ran on 80386 machines, which were considerably less powerful than even the most modest ARM phone.
It happens that Linux can scale from very small machines to supercomputers.
-
Monday 25th November 2013 23:36 GMT David 14
Re: "If it uses QNX rather than Linux"
"... Linux, originally conceived as a Unix-like substitute in larger machines"
Hmm, not sure what you reference as "larger machines". Larger than a cell phone, sure... but back in the 1992 timeframe, when I first started using Linux (and was forever grateful to the 1993 "slackware" release of the O/S making it as easy as downloading and writing only 55 x 1.44 MB floppy disks)... it was designed for "386" processors running in the 12 to 40MHz rating... something that is dwarfed by modern cell phones.
Linux has become a system used in larger server, for sure.... but it did not start that way!
-
-
-
-
-
Monday 25th November 2013 20:41 GMT DrXym
Re: "It doesn't mean that QNX is necessarily more secure"
"No, not necessarily, but given that RIM (as it was) put a lot of effort into security, and also made the decision to go with QNX, we might speculate that they knew what they were doing."
Of course they put a lot of effort into it. They OWN QNX and it's called eating their own dogfood. One must assume if they had used another kernel they would have put an equal amount of effort into that.
Second, being a microkernel isn't any more secure or safe than a monolithic kernel. Those things are orthogonal to the general architecture. There are security enhanced versions of Linux with EAL4+ certification for example. The kernel isn't even half the story either since it could be the most secure kernel in the world but if the application layer does stupid things then it doesn't really matter.
-
-
-
-
-
-
Monday 25th November 2013 09:38 GMT Mr Spigot
Well done guys, plenty of overtime coming up
I won't pretend to understand what they've achieved in any depth, but often the problem with hacks like this is that they are built on platform idiosyncrasies and have no resilience to future change. So at best they have a maintenance headache and at worst the house of cards comes tumbling down.
Why invest in the BB ecosystem on the hope it'll run android apps for the foreseeable future - just buy android!.
-
Monday 25th November 2013 12:46 GMT ElNumbre
Re: Well done guys, plenty of overtime coming up
Those were might thoughts exactly. Id imagine that every time Google update the Android API's, and particularly when they do a major release (Android 5 anyone) that the foundation of the House of Cards will be undermined extensively.
Id rather see them invest in porting their technology to Android or (shudder) Windows Phone. A 'powered by Android, secured by Blackberry' device could be a big seller in the corporate world.
-
-
Monday 25th November 2013 15:34 GMT Anonymous Coward
Re: Well done guys, plenty of overtime coming up
Google undoubtedly makes more $$ per BB user than per Android user, because the average Android user is so stinkin' cheap.
In fact, I'll bet Google is giving BB a hand on this project, and that the Chocolate factory is more than happy to see their own Android apps like Chrome, the Gmail app, Maps - work natively on the BB platform.
Google already has massive market share with Android - 2/3 of tablets and 4/5 of phones worldwide. They don't need much more market share, they need access to more eyeballs for their ads. BB can give them a few more eyeballs, and a few more lucrative ones at that.
-
Monday 25th November 2013 22:33 GMT John Smith 19
Re: Well done guys, plenty of overtime coming up
"Based on current form; given that Google have taken baby steps into phone production and that they have all those partners to keep sweet, I'd say that they'll make a point of breaking things for Blackberry on the next release."
The old MS strategy of "Windows ain't done will Lotus won't run?"
Surely not.
-
-
Tuesday 26th November 2013 00:32 GMT Anonymous Coward
Re: Well done guys, plenty of overtime coming up
The hack is at the syscall and POSIX layers, well below all the stuff that makes Android Android. These low-level interfaces don't churn much.
That said, outside the native extensions hack, the Android player needs to thunk a lot of Android services to BB10 equivalents, and this can be labour intensive to maintain through future gyrations of Android.
-
-
-
Monday 25th November 2013 19:22 GMT Charles 9
Re: Well done guys, plenty of overtime coming up
I would think it will start happening sooner than that. Android 4.4 KitKat introduces the new Android Runtime (ART). The big feature of ART is precompiling Dalvik apps upon installation. Seems a bit rough around the edges, but it definitely shows where they're going.
-
-
Monday 25th November 2013 16:10 GMT Anonymous Coward
Re: Well done guys, plenty of overtime coming up
Because most android devices are cheap feeling pieces of plastic. I've owned 3 of them, and they all felt like a kid's toy. I'd rather use an iphone instead of an android these days. I settled for the best though and decided on Blackberry 10 - and now I have a plethora of apps available. Awesome time to own a Blackberry!
-
-
-
Monday 25th November 2013 18:04 GMT Victor Cooper
I will soon
Use BB10 as an Android app launcher or Android as an Android app launcher? Hmm easy choice. I had a Q10 and loved the wonderful HUB and multitasker. Loved the phone but lost it. Replaced it with a Nexus 4 because I wanted a few Android apps that the Q10 was missing. But Android itself does not compare to the BB10 messaging experience with the HUB. Now that I can launch most Android apps from BB10, I ordered the Z30. So I am one who will own a BlackBerry. Can't wait to get it.
-
Monday 25th November 2013 10:16 GMT Anonymous Coward
Not surprising
*BSD has been doing this for years. Linux/MIPS was also able to do this with some SGI IRIX binaries, although from what I heard, it could only emulate a subset of IRIX 5.x syscalls.
WINE also does similar things to get Windows code to run on Linux and BSD… a PECOFF loader pulls the application into memory from the .exe file and any .dll's (since Linux only natively understands ELF and a.out) then the linker goes hunting for the Linux-native implementations of bits that are missing.
Still, good on them for giving it a go, hopefully it works out for them.
-
Tuesday 26th November 2013 17:35 GMT naw
Re: Not surprising
And IBMs AIX (Power Unix) did it for Linux with Lx86, and SCO Unix did it for AT&T Unix, I'm sure there's others - I'm not putting down BB's technical capability here, certainly it's beyond me to do the same, but I do wonder if they put a lot of effort into the wrong area. They now have to maintain compatibility with the Android Appstore, App Developers won't care about BB compatibility, so BB will have to make ALL of th effort and as Android develops that will become more and more difficult. IMO, they should have bit the bullet and gone down the Android (or Cyanogen or Replicant or some other Android Fork) and produce their own Android fork, but Hardened and Optimised for Business users with all the sort of back end services and integration that business users might want.
-
Monday 25th November 2013 10:19 GMT DrXym
The next step
Blackberry should just make an Android handset. It doesn't stop them from adding value add to their solution in terms of secure storage, remote wipe, a UI optimized for email, an app store with secure audited apps etc. But just running Android would do a lot to improve its chances in the market place.
-
-
Monday 25th November 2013 11:49 GMT DrXym
Re: The next step
Well yes, but of course Blackberry has been at this game a lot longer and has a reputation for it. They could trade off that reputation while still producing a device that benefits from being a true android handset.
Perhaps Google, Samsung and Blackberry should all part of the same initiative and differentiate at the UI level.
-
-
Monday 25th November 2013 17:25 GMT John Sanders
Re: The next step
Producing an Android handset running their customized BBRY platform should have been priority from day one.
I do appreciate the technical mastery of the QNX guys, but at the same time it is a colossal waste of time when you think they could have just tweaked Android to make their own BBRY Android and they wouldn't have had to resort to hacking tricks.
Like someone said in the thread, I bet this doesn't work to RIMs advantage and plays more like it did for OS/2 to run Windows apps.
-
Monday 25th November 2013 18:05 GMT Victor Cooper
Re: The next step
But I don't like the Android experience and absolutely love the Blackberry one. I can handle running some apps written for Android on the Blackberry platform but that is it. No there has to be others who prefer the superior user experience of the BB10 and would not want BB to be just another Android knock off. No thanks. I like the exclusivity of the brand no matter how small it is.
-
-
-
-
Monday 25th November 2013 12:15 GMT Anonymous Coward
Re: Security?
An alternative would be to run Linux in a VM and then Android on top of that. This would be in some ways cleaner, but would greatly increase the RAM requirements, since there'd be two separate full OSes running at the same time. Cleaving at the POSIX layer reduces duplication of OS resources.
As for security, the Android binary blob is no different from any other binary blob QNX runs in user space. (A 3rd party BB10 native app is as "blobby" to the company as an Android binary.) It doesn't increase the surface area for attack.
-
-
Tuesday 26th November 2013 00:10 GMT Bigboy1
Re: Security?
The android apps can be housed in a Secure container using blackberry "Balance". There is no inherent danger to using android apps. It is no different than accepting any other form of unsecured data, or any blackberry native app because they is don't have access to root.
This is coup pure and simple. There really is no reason to consider the Blackberry anything less than a "better android than android". Still the average consumer is going to just grab whatever phone he last saw on a tv commercial. That's why Blackberry is best to focus on Enterprise or a couple years and look for another chance to crack the wider consumer market.
-
-
Monday 25th November 2013 12:07 GMT hamoboy
This might be a lifeline, but nothing more
So in effect, the message Blackberry is giving to app vendors everywhere is "Write for Android, and you'll target us too". Thus removing any motivation for these developers to try and write native QNX apps. Even in Apple's darkest days before the iPhone, they never bundled Parallels or any such emulation software with their machines, they knew that that might have provided a short term gain, but long term it would have been a sign of surrender. Vendors don't want to targer a platform whose makers have surrendered.
-
Monday 25th November 2013 19:14 GMT Victor Cooper
Re: This might be a lifeline, but nothing more
I have owned a series of Macs since 2007. I would not own one for work today if it did not have VMware , Virtualbox or Parallels support. There are still many native apps that the Mac platform does not support. As big as apple is today, the Mac native app support is still pretty poor at least in the workplace. I don't agree with your argument.
-
Monday 25th November 2013 22:06 GMT hamoboy
Re: This might be a lifeline, but nothing more
But Apple never BUNDLED emulators with their machines. It was always an aftermarket purchase. In the same way, Blackberry should have made this something users could add on later, not something that comes with the phone. App now have negative incentive to make a native QNX port.
-
-
-
-
-
Monday 25th November 2013 13:48 GMT Dave 126
Re: All worthless thou.
>Go get a Nexus5 and save yourself the grief that will surely accompany BB10 ownership.
>>I have followed your advice and am still trying to work out where to insert my SD card. Also, I can no longer go two days between battery charges. How do I fix this?
Er, trade it in for an LG G2?
-
-
Monday 25th November 2013 19:14 GMT Victor Cooper
Re: All worthless thou.
Have a Nexus 4. No thanks to the Nexus 5. With the news that it can run apks directly I just ordered the Z30. Pinch gesture in the HUB to close out / open read mails, custom quick menu and the native Blackberry Express on the fly presentation tool are just 3 of many great features I am looking forward to. So no thanks again to the Nexus 5. My nexus 4 will be a more than adequate backup to my Z30 upgrade.
-
-
Monday 25th November 2013 18:32 GMT Nathan 6
So after Management has hit the Iceberge ...
So after management ran the ship headlong into an iceberg, and fled into their golden life rafts, its up to the engineers to save the company with "this cool hack"? At this point, the ship is halfway to the bottom, and no amount of hackery can save it.
Only thing that would have save them would be if they had build a Java API on top of QNX from the start, or just rolled their own Andriod OS 3-4 years ago. However, that would have required competent management.
Kinda reminds me of the whole JCPenny mess, in which a new CEO and his management team were given ~80 million in one year to save the company, and guess what, company is now way worse off. The JCP board would have been better of just setting 80 million dollars on fire or just given it to their employees.
-
Monday 25th November 2013 22:50 GMT John Smith 19
"one of Skype or Instagram even had self-modifying code"
Wow.
That would make one of them the third legitimate use for this technique I've heard of (I gather it's popular with malware writers, but apart from them it's not really clear who else). The othere 2 were the AT&T "Blit" bitmapped graphics terminal and the Apollo Guidance Computer.
The article does not give enough tech detail to understand what they've done. I'm getting (having nosed through Wikipedia)
1)Dalvik is a special JVM. It reads its own file format that is more compact than Java .class files.
2)RIM engineers have ported it.
3)But QNX <> Chrome <>Linux (IIRC Chrome has been formerly forked from Linux)
4)Their hack operates below the kernel function call level and operates right at the software interupt (SWI) instruction level (actual ARM op code) AFAIK a OS kernel call can have multiple SWI calls inside it.
5) But I'm b**gered if I know how.
So thumbs up for the hack, whatever it is.
Only time will tell however if the management manage to snatch defeat from the jaws of victory. :(
-
Monday 2nd December 2013 21:34 GMT Michael Wojcik
Re: "one of Skype or Instagram even had self-modifying code"
That would make one of them the third legitimate use for this technique I've heard of (I gather it's popular with malware writers, but apart from them it's not really clear who else).
Self-modifying code was quite common in mainframe applications at least into the mid-1980s. It was often used in assembly-language apps for things like patching, on-demand loading, memoization, etc. Some higher-level languages supported it directly, such as COBOL with its ALTER statement.
I've also seen it used in some performance-critical code, again back in the '80s. As CPU caches became more complex, there was a lot of discussion about their effects on self-modifying code.
Depending on what you consider "self-modifying code", you might also include some techniques that involve dynamically-generated code, such as GCC trampolines (which build code at runtime on the stack). That's not usually considered self-modification, though.
As for how the QNX technique works: it's really not that complex (or new - Andrew oversells it in the article). The interrupt handler looks at the parameters to determine whether it's a QNX syscall or a Linux syscall. In the latter case it probably jumps to a thunk that does the conversion. (The conversion could be done in the handler, but that'd be messy.) QNX and Linux syscalls are mostly equivalent, thanks to POSIX, so it's mostly a matter of massaging parameters.
-
-
-
Tuesday 26th November 2013 02:19 GMT Richard Plinston
> it stand to reason that by 4.5 or 5.0 ART will be default and all Blackberry's effort will seem rather pointless.
ART is open source too. BB can build their own version.
In any case ART does run Dalvik apps, it just starts them faster by running the 'JIT' compiler on installation rather than at app startup (plus other optimizations). The apps aren't any different so they will still run under Android Dalvik* and BB Dalvik.
* NOTE: there is no plan to obsolete every app** in the play store nor all pre-4.5 Andoid phones** and tablets just to make BB unhappy.
** cf Windows Mobile 6.x and Windows Phone 7 where they _did_ do that to their own developers, OEMs and customers.
-