A few days ago, I posted about a student project at a Russian University that aims to run two or more instances of Android at the same time on a single device. It's a technology called virtualization, and we already use it on web servers and developer machines everywhere.

At first glance, the idea sounds interesting, but seems to lack practical uses for the majority of people. Sure, some developers will save a few hours on testing, and industrious users might want to run the latest CyanogenMod nightly ROM alongside their daily driver, but this kind of stuff doesn't really appeal to your neighbors or parents. The fact is, this technology has been mostly a tool of a few high-tech fields and power users.

Thanks to the smartphone revolution, though, many nascent and fringe technologies have turned into mainstream necessities. There was a time when speech recognition, natural language interpreters, gesture detection, short range radio (e.g. Bluetooth and NFC), and countless other innovations were thought to have little value for regular people. The full range of possibilities are only starting to emerge, and many great ideas are already out there.

What Is Virtualization?

Virtualization is basically about creating an abstraction between an operating system and the hardware it's running on. This is done using a thing called the hypervisor, which creates and manages containers for the OS to live in and provides access to hardware as needed. The purpose is to have two or more operating systems running at once, and to effectively control resources like the processor, memory, and storage.

5656
Image Source: Intel

Besides Tech-y Stuff, What Can We Do With This?

Samsung, Blackberry, and a few others have been touting their efforts in the BYOD (Bring Your Own Device) movement, promising that everybody can have profiles for work and home while keeping them separate. Here's the catch: none of them are close to getting it right, and most are pretty terrible for the employee and not very secure for the business. This is where completely separating environments would be great; corporations can create and install a tested and locked down version of Android in one instance while employees are free to customize their own instance without interference or risk. In this arrangement, even rooting one side will not violate the other, and privacy is maintained for both the employee and the business. By creating tightly contained environments, most of the attack vectors for malicious software won't even exist to be exploited.

Virtualization also offers a gateway for running different operating systems without many of the challenges associated with porting. We probably aren't going to see copies of Windows Phone or iOS right away, but they will come in time. You won't even have to miss out on platform exclusives like Infinity Blade or Tentacles (formerly limited to Windows Phone). I won't pretend there aren't any legal implications or licensing restrictions, but companies like Microsoft will probably consider making their platforms installable if it might raise distribution numbers. This would also give a fighting chance to new entrants like Ubuntu and BlackBerry 10, which relatively few people are willing to take a risk on.

However, the greatest benefits of running other operating systems won't come from competing phone platforms, it will be in the form of full blown desktop software. Wait... What? Ok, I'm not exactly talking about firing up Windows 8 and Photoshop on your HTC One to tweak a few pictures on that little screen. Instead, try to imagine walking up to a monitor, plugging in your phone, and instantly creating a complete desktop-like experience. Yeah, a truly portable workstation with all of your software, data, and customizations living in a single pocket-sized device. In case you haven't been paying attention, this stuff is Nirvana to power users, but everybody will want it. We aren't just talking about virtualizing Android, this is about breaking the ties between mobile devices and the software they are running.

This is far from being a new concept. Canonical hyped it with Ubuntu for Android, and ASUS has been playing at the idea for the last couple of years with its Padfone, Transformer tablets, and the AiO. Many people even expect Google to make Chrome OS a background feature of Android, building on the idea of Motorola's Webtop.

lapdock500_lg
(pictured: Motorola Lapdock 500 Pro)

What Stands In The Way Of This Awesomeness?

It might come as a surprise that hardware is not much of an issue here. As the video from Parallels demonstrates, a two-year-old Galaxy S II is capable of running two copies of Android with hardly a stutter. Current devices are driving 1080p screens at 50-60 frames per second without breaking a sweat, thanks to significantly faster multicore CPUs and larger pools of memory.

Unfortunately, there are some software roadblocks between us and virtual goodness. First, it just needs to be said, mobile operating systems are still very young and haven't really been optimized for this environment. Even Android, which is built on Linux and has some support for virtualization baked in, has some of its own quirks. Many platforms were not built with this use case in mind, and some will require custom modifications to run well.

Before I get to the biggest problem, I should give one more bit of technical background. The aforementioned hypervisor comes in two flavors, native and hosted. Native virtualization is a lot like a custom recovery, it requires flashing hardware-specific software, but can be very efficient and flexible. On the other hand, the hosted approach works by loading a hypervisor within an already booted operating system. While the latter is easier to achieve, it is less efficient, less secure, and suffers some of the limitations of the host OS. Ideally, we really want the former, but that's where the problems start. Just to get things up and running for native operation, we must have drivers built into the hypervisor and an unlocked bootloader on the device. Obviously, these needs conflict quite a bit with the current environment and the interests of cellular providers and OEMs.

Fortunately, there is a natural solution to these problems. Rather than attempting to sell a confusing product line to end users with the potential to brick countless devices, virtualization companies can license their software directly to OEMs to be bundled as stock software. This fix might have a few side-effects, especially giving companies like HTC and Samsung an opportunity to lock in stock firmware. However, I won't mind that if it could make 3rd-party ROMs an officially supported feature. Who cares if you have to keep a Sense UI or TouchWiz ROM installed if you don't have to terminate your warranty to put CyanogenMod on there, too? Should anything go wrong, you will always have stock software to fall back on. Best of both worlds? I think so.

When Can I Have This On My Phone?

Again, you might be surprised to find out that we could be hearing a lot more about virtual machines and Android very soon. So far, we've only seen an early stage of what Parallels might have to offer, but it is not the only developer working on virtualization. VMWare, another strong company in the field, is also building its own solution. In fact, the developers have had an Android-based virtual machine working for more than a year, as mentioned in this video series from Feb 2012. (Jump to 11:10 if the video doesn't queue up properly in your browser.)

Hardware makers are also gearing up to add features where they see fit. Starting with the Cortex-A15, ARM is adding Virtualization Extensions to the architecture, which will offer a performance increase comparable to that of hardware accelerated graphics. In case you're wondering, the Cortex-A15 cores are already shipping and can be found in the Exynos 5 (Nexus 10 and the international Galaxy S4), Tegra 4 (but not the 4i), and OMAP 5 processors. Of course, we can't forget that Intel is just returning to the market. There isn't a lot to talk about yet, but the processor giant will be including VT-x in the upcoming Atom Z2580, which is rumored to be headed for some ZTE phones in the next few months. Even though the ARM architecture has a massive lead in the mobile world, the processors are quickly evolving to become more like desktop and server components, in which Intel has decades of R&D. This may be the battleground in which we finally see the x86 architecture taking a stand.

Conclusion (a.k.a. Take My Money)

If you, dear reader, can't tell that I'm excited by the promise of running two copies of Android at once, you obviously haven't been paying attention. This stuff is cool, I mean, really, really freakin' awesome! With all of the investment going into virtualization by the major chip manufacturers, there must be others that think it will be the way forward. We're not just looking at a neat new feature for a few people; this is an enabling technology, something that will ultimately change how we use the little computer you currently talk and text on.

The bits and pieces we can see now are just the calm before the storm. As virtual machines are improved and refined on our smartphones, our entire perspective on technology may change as we finally and truly become mobile.