BlackBerry 10: A better Android than Android?

The QNX operating system that runs at the core of BlackBerry 10 devices can run Android applications. But does that undermine native development for the aspiring smartphone platform?
Written by Jason Perlow, Senior Contributing Writer

Last week, BlackBerry (formerly Research In Motion) made an announcement that its BlackBerry 10 App World has reached the 100,000 app milestone.

While I applaud the sheer numbers of apps that their developers have been able to seed the store with in such a short period of time for the Z10's US carrier launch, BlackBerry, untill very recently, has not been forthcoming as to what kind of apps they were.

On Tuesday, it was confirmed that approximately 20 percent of the applications in the BlackBerry 10 App world were in fact, re-packaged Android apps.



Back in Q1 2011, RIM had finally confirmed what had been rumored for months: That its then-new PlayBook tablet, which runs on the same fundamental QNX operating system that BlackBerry 10 uses, would be able to run Android applications in addition to Adobe Air, HTML5, and native C/C++ QNX apps.

A "Better Android than Android", if you may. 

The more I wrap my head around the whole thing, the more I begin to feel like I've seen this happen before.

In fact, it was 20 years ago. The vendor who last tried to do this was ... IBM, with its OS/2 2.0 Operating System.

This is going to open up old wounds for me, and I'll probably catch some flak at work for this as well, but considering that this war between Microsoft and IBM is long over, I'm going to do this anyway.

For the most part, in 1992, IBM succeeded in creating a "Better DOS than DOS and a better Windows than Windows" with OS/2.

It was a full 32-bit OS, and could take advantage of much larger amounts of memory, which DOS and Windows 3.0 could not. It could pre-emptively multitask, whereas Microsoft's DOS and Windows 3.0 could not.

It could protect native OS/2 applications in discrete sections of memory, whereas DOS and Windows 3.0 could not.

It could also run DOS and Windows 3.0 applications in their own protected, separate regions of memory, which DOS and Windows ... could not.

It was the first PC operating system to ship with Windows virtualization included in the OS. It was amazingly ahead of its time, in that respect.

OS/2 ran DOS and Windows 3.0 applications so well, in fact, that IBM had a very hard time getting third-party developers to write native OS/2 Presentation Manager applications.

Indeed, there were a few little gotchas with OS/2's Windows compatibility: It had problems for a time running Windows Enhanced Mode apps, and there were also issues with special types of device drivers, called VxDs.

Eventually, IBM was able to resolve most of these compatibility issues in future versions of OS/2. But it was always a constant battle to keep up with Microsoft's changes. And when Microsoft released Windows NT 3.1 in 1993, most of the perceived advantages that OS/2 had were no longer considered exclusive by the computer industry.

Today, you recognize Windows NT as Windows 8, Windows 7, and Windows XP. And Windows 2000 before it.

BlackBerry is facing a very similar situation with its new mobile OS. Indeed, as I have written before, the QNX OS as it is implemented on BlackBerry's hardware is extremely impressive, resilient, and sophisticated.

This is to be expected of a mature, embedded real-time OS, which QNX is. For everything that distinguishes them, iOS, Android, and even Windows 8 and Windows Phone 8 are not RTOSes.

As a matter of fact, I believe it to be a superior operating system in a number of respects architecturally to both iOS and Android. I have been testing a Z10 for a few weeks now on AT&T, and I think it's a fun device, with some interesting differentiators that set it apart from those two platforms, as well as Microsoft's Windows Phone 8, which I also use, and like a great deal.

However, despite BlackBerry's RTOS DNA, there is a great deal of risk associated with attempting to leverage a competitor's ecosystem as opposed to being an active participant in it.

Originally, I had hoped that BlackBerry went the Virtualization route as opposed to a native Dalvik VM port/binary emulation layer to implement Android compatibility, which is how it actually went about it.

Ideally, for BlackBerry 10, I would have liked to have seen a full Android 4.x stack running inside a mobile hypervisor, such as OKL4 or Red Bend's VLX.

This would have required no "porting" work on RIM's behalf. Instead, an actual copy of Android, with a complete Linux kernel, could be run as a "Guest" OS within QNX. But it was not to be.

This is not to say that this approach would not have its own number of risks associated with it. The hypervisor would have to be very performance optimized, and near-native Android performance would be expected by BlackBerry 10's end users, or the compatibility mode would not have much value.

To make Android NDK apps work, hypervisor-based virtualization would have been the only effective way to accomplish true binary compatibility. But as BlackBerry 10 uses just the Dalvik part of Android, it can't run NDK apps. Those applications have to be ported using the native C/C++QNX SDK instead.

It should be noted that BlackBerry's Android 2.3.3 API implementation already has a number of other programmatic limitations in addition to the NDK.

Regardless of the way BlackBerry eventually chose to implement Android apps in its new mobile OS, there is the issue of whether Android compatibility will have the same "cooling effect" on its native C++ development environment as well as on the Adobe Air apps that IBM's Windows 3.0 compatibility had on OS/2.

There is another potential problem, and it isn't a small concern.

There is always the possibility that Google could implement architectural and code changes in its Dalvik VM as part of the Android Open Source Project in the future that could break BlackBerry's Dalvik implementation and cause serious compatibility issues with apps written to future versions of the Android API.

Should this occur, BlackBerry would need to re-port Google's Dalvik to QNX, on an ongoing basis, in order to keep up with the changes. The level of effort involved would not be insignificant, much like IBM had to keep OS/2's Windows compatibility in check.

Amazon's Kindle Fire also runs Android apps, and the company maintains its own app store. But the Kindle Fire is an Android device, based on actual AOSP code and Linux, whereas BlackBerry 10 emulates Android and runs a QNX kernel and userland libraries.

So the Kindle Fire will never have compatibility issues with Android, providing that Amazon always uses the latest AOSP stack.

Still, BlackBerry might not actually care what developers target their apps to, whether it's Android 2.3 Dalvik APIs, QNX C++ native, Adobe Air/Flash, or Java.

Oh, and then there's the WebWorks platform SDK as well. BlackBerry 10 is a literal smorgasbord of multi-vendor API's, probably the richest of all the mobile OSes currently available.

The big question is whether BlackBerry 10 will do all of them well. Will consumers "get it" and will developers bother to make enough native QNX apps to really showcase the platform?

I mean, if you're gonna buy a phone to run Android apps, why not just buy a Samsung S 4 that sports superior hardware in virtually every respect to the Z10?

Only time will tell.

Will BlackBerry 10's Android compatibility be a blessing, or a curse? Talk back and let me know.

Disclaimer: The postings and opinions on this site are my own and do not represent Microsoft's positions, strategies, or opinions.

Editorial standards