Six PhD students at Columbia University‘s Department of Computer Science have developed Cider, an OS compatibility architecture capable of running iOS apps on Android. Rather than using a strict virtual machine, they achieved the feat by running domestic and foreign binaries on the same device.
They leverage binary compatibility techniques such as compile-time code adaptation and diplomatic functions. This means Cider can copy the libraries and frameworks it needs and convince an app’s code that it is running on Apple’s XNU kernel rather than Android’s Linux kernel.
A video of the Cider proof-of-concept shows off their work – a Nexus 7 (2012) with Cider can run iOS apps such as Yelp and Apple iBooks:
The performance is less than stellar, but this is to be expected given the extra cost of diplomatic function calls and a currently incomplete OpenGL ES implementation. Nevertheless, using an OS compatibility layer for native execution of iOS apps on Android is an impressive feat.
Here’s the paper’s abstract:
We present Cider, an operating system compatibility architecture that can run applications built for different mobile ecosystems, iOS or Android, together on the same smartphone or tablet. Cider enhances the domestic operating system, Android, of a device with kernel-managed, per-thread personas to mimic the application binary interface of a foreign operating system, iOS, enabling it to run unmodified foreign binaries.
This is accomplished using a novel combination of binary compatibility techniques including two new mechanisms: compile-time code adaptation, and diplomatic functions. Compile-time code adaptation enables existing unmodified foreign source code to be reused in the domestic kernel, reducing implementation effort required to support multiple binary interfaces for executing domestic and foreign applications.
Diplomatic functions leverage per-thread personas, and allow foreign applications to use domestic libraries to access proprietary software and hardware interfaces. We have built a Cider prototype, and demonstrate that it imposes modest performance overhead and runs unmodified iOS and Android applications together on a Google Nexus tablet running the latest version of Android.
The last part is particularly important: Android apps still function on the device even with the OS abstraction layer. The team says it did not encounter any fundamental limitations regarding its approach that would result in compatibility problems between the two operating systems.
That being said, this is still a prototype, and the implementation is incomplete. The group notes that smartphones and tablets have many features that apps expect to be able to use (GPS, cameras, cell phone radio, Bluetooth, and so on). Cider doesn’t support for these, and iOS apps that require them will fail to function unless they provide a fallback code path (Yelp is given as an example of an app that continues to work as if the device’s location services are turned off). The good news is that the six students plan to continue their research and will keep developing Cider.
You can read the full research project for yourself here: Cider: Native Execution of iOS Apps on Android (PDF). It is authored by Jeremy Andrus, Alexander Van’t Hof, Naser AlDuaij, Christoffer Dall, Nicolas Viennot, and Jason Nieh.
Top Image Credit: Jung Yeon-Je/Getty Images
Get the TNW newsletter
Get the most important tech news in your inbox each week.