01 March, 2014

Is a WINE-like Android app shim coming to Chrome OS?

UPDATE 9/12/2014: Now this all but confirms it. Now that four Android apps are finally available for installation on Chromebooks, I tried installing one of them. Then, I fired up the chrome://extensions page, and here it is:

According to Google, this is exactly what I saw coming: a Chrome extension that uses NaCl to emulate the entire Android runtime stack. While it isn't exactly built into Chrome OS's core, everything else about it, including how seamless of a compatibility layer this is, is literally just what I envisioned.

UPDATE 6/25/2014: Three changes since this was first posted. A, Google literally just unveiled Android apps working on Chrome OS in this fashion, natively, alongside Chrome and web apps, at I/O this morning, in literally THE EXACT SAME seamless way that I envisioned when I wrote this post back in March after delving through the naclports code, B, this is really important as far as this leak's credibility is concerned, the BuildBot for a NaCl version of Bionic appears to have been taken down since this was first posted, and C, ART has completely replaced Dalvik as Android's run-time of choice as per the developer preview of the 'L' release, still yet to be officially code-named ― itself a radical departure from how Google usually did it in the past, and for solving fragmentation, well, it's kind of a good thing, so yeah, discard any claims about Dalvik since we all know Dalvik is dead. Anyhow, I was right, wasn't I? Skeptics, remember that Android and Chrome OS are both Google's own operating systems we're talking about here:

Original post continues below.

The debate about whether or not Android and Chrome OS will converge into one platform has indeed been a heated one. Google, of course, has indeed hinted at that possibility even before Chrome OS was unveiled and open-sourced back in November 2009: Eric Schmidt is quoted in saying that the platforms "may converge over time," and they of course couldn't look more alike, at least from an appearance standpoint. But there is indeed more work to do, as there's a whole catalog of apps to consider. While Chrome apps do indeed work on Android and iOS, not to mention Windows, Mac, and Linux, all at once, the same is NOT true for Android apps trying to run on Chrome OS: they just won't run. For now, anyway.

However, that may be about to change: As the good old Johan Heinstedt pointed out, Google may in fact be using the all-powerful Native Client to bring Android NDK (but not SDK, at least not at the moment) apps to Chrome in such a way that they behave like Chrome apps. How can you tell? Because the latest developer builds of naclports (the Linux/GNU core libraries that are being ported to run in the Native Client sandbox) not only include GNU core libraries, but also the unthinkable:

What you see there is Bionic. Whereas Dalvik and ART happen to be responsible for the majority of Android apps that use Java code being able to run on Android, Bionic is responsible for all the NDK code. It provides all the necessary C and C++ core functionality to allow apps written in native code to run easily alongside the Java apps, and the fact that Google happens to be porting it to Native Client sure says something about a possible convergence. This is probably why KitKat turned out to be Android 4.4 instead of 5.0: because the amount of API breakage in KitKat pales in comparison to what moving everything into a NaCl-embedded library shim would entail.

Now if Dalvik and ART are next, then we all know what's coming: You would be able to run (and possibly even develop) Android apps on a Chromebook. Then, of course, since the Android home screen happens to be an app in itself, Google could just use NaCl to run the Google Now Launcher as if it were a mobile Chrome app, and, boom! You've got a Chromephone waiting for you.