Sunday, April 15, 2012

Android as a Virtual Machine


As I read the news of phones that will our will not be getting Ice Cream Sandwich, it gets me thinking about the possibility of running Android as a virtual machine (VM) on top of the hardware. The advantage of this would be that it would take the hardware drivers out of the equation when looking at upgrading a phone. By isolating the OS from the true drivers of the phone or tablet one standard ROM could work on all phones running this technology. Even older phones could be upgraded to run Android this way. I see this as the fastest way to eliminate fragmentation.
I work with virtual machines all day long. The best part of them is that they can be moved from server to server even if the physical hardware is different. Virtualization separates the OS from the physical hardware and uses a set of drivers that are common among all of the hosts. Your virtual machine sees the same drivers no matter what is underneath the VM. You could run the same OS build on a LG phone or a HTC tablet and the drivers that are needed to make the image run are being presented to the guest Android OS as a generic set of devices. On servers for instance, Windows drivers that are run in a VM are industry standard drivers for the video, network cards and disk controllers. Windows has all of the drivers that a VM needs with just a standard install. No need to go track down that latest video or network card drivers. Underneath the VM at the host level, the virtualization kernel translates the virtual driver commands in a manner that the physical hardware the computer is using can understand.  It is the equivalent of being able to somehow use Chevy parts on your Ford car.  Miraculously, it all works very well and the technology keeps getting better.

Now imagine if your phone booted and ran only the virtual host launcher as part of the kernel. Then you could (in theory) run one of many ROM images. Hardware manufacturers could create one image that would run on all of their phones. The hacking community could create a launcher in which you could pick a ROM to boot and allow you to run multiple ROMs from a menu.  These ROMs would look much like they do now. They could be a single file that has all of the OS and data inside of it. If you moved that data file to another phone all of your settings and information would come along with it. The ROM could boot on a new phone just as simply as adding it to your SD card and pointing the boot loader to it. As you go from phone to phone or carrier to carrier the images you have could be transferred to allow you to always be able to get to that image. You can try out various ROMs without losing all of your data each time you switch. Even snapshot backups could be taken to revert back to a specific point in time.

By moving to that model the Android platform would be transformed. Fragmentation would be a thing of the past. When a manufacturer would update one ROM all of their phones could run it. We wouldn't have to wait for each model to be upgraded. One set of hardware drivers would be used for every phone on the market. There could still be limitations on letting old phones not run ROMs after a certain point, but upgrades would be so much easier. The carriers wouldn't have to support all of the different hardware models the way they do now. The phone or tablet would need to be able to boot the loader and the rest should work. If it is not working the support team would have you download another ROM image to see if it is the hardware or the image is bad.

VMware has developed this technology for allowing users run a business VM on their personal phone. I think this is just a few steps away from running any rom on a phone or booting straight into a rom. When the hypervisor is included in the kernel, the performance will be better and integration with the hardware becomes seamless. Monday through Friday you could run a stable ROM provided by your company while at night and weekends you boot into a personal ROM. If you want to try out an experimental ROM load it up and if it crashes too much just reboot back to a working image.

I am not a developer and I don't know what other limitations there are to make this a reality. What I do know is that on many of the computer based virtual machine hosts run Linux based operating systems at their core. Android has that core which I am certain is capable. Once this is created the whole face of the Android community would change rapidly. The days of bricking phones would all but vanish. You don't have to brick your phone because you are not changing the low level software components anymore.  Even novice users would be able to boot these images and understand to switch they just reboot. You could create an image and modify it to your liking. You then copy the image to your tablet device then you have the same image on both devices.  It might even be possible to load a ROM onto a SD card and move the card from device to device and keep all of your settings and changes with you no matter which device you are using.

Let's hope that someone further develops this type of virtualization technology soon. It will make the current fragmentation that we face go away. Manufacturers could still add their apps and skinning on phones but allow us to choose what works best for each one of us.

No comments:

Post a Comment