2014年9月22日月曜日

Hack runs Android apps on Windows, Mac, and Linux computers

If you remember, about a week ago, Google gave Chrome OS the ability to run Android apps through the "App Runtime for Chrome." The release came with a lot of limitations—it only worked with certain apps and only worked on Chrome OS. But a developer by the name of "Vladikoff" has slowly been stripping away these limits. First he figured out how to load any app on Chrome OS, instead of just the four that are officially supported. Now he's made an even bigger breakthrough and gotten Android apps to work on any desktop OS that Chrome runs on. You can now run Android apps on Windows, Mac, and Linux.

The hack depends on App Runtime for Chrome (ARC), which is built using Native Client, a Google project that allows Chrome to run native code safely within a web browser. While ARC was only officially released as an extension on Chrome OS, Native Client extensions are meant to be cross-platform. The main barrier to entry is obtaining ARC Chrome Web Store, which flags desktop versions of Chrome as "incompatible."

Vladikoff made a custom version of ARC, called ARChon, that can be sideloaded simply by dragging the file onto Chrome. It should get Android apps up and running on any platform running the desktop version of Chrome 37 and up. The hard part is getting Android apps that are compatible with it. ARC doesn't run raw Android app packages (APKs)—they need to be converted into a Chrome extension—but Vladikoff has a tool called "chromeos-apk" that will take care of that, too.

Everything is done through Chrome's extension APIs. Google's original runtime is an extension, ARChon is an extension, and all the apps are extensions. This makes the install process a little complicated. You'll have to enable "developer mode" on Chrome and install a bunch of unpacked extensions. Instructions are in Vladikoff's tools, and there is a whole new subreddit, called/r/chromeapks, that will get you up and running and even has some pre-converted APKs to try out.

We managed to get a few Android apps running in Mac OS X; while it is a cludgy hack, it's definitely impressive. So what is it actually like to use? Crashy. It's really fast, but the lack of Google Services running in the background means a lot of apps don't work. Twitter, for instance, would frequently crash due to the lack of Google Play Services. Google's runtime for Chrome is also still in beta for a reason, and the fact that there are only four officially sanctioned apps means there is probably more work to do on Google's side, too.

The hack is a tantalizing peek into a potential future for Google, one where it turns Android into a universal runtime that works not only on Android phones, tablets, and Chrome OS devices, but on any desktop computer with Chrome installed. Native Client has always felt like Google's attempt at creating a universal runtime, and it's hard to believe that this all works by coincidence.

While this hack is buggy and crashy, at its core it works. Apps turn on and load up, and, other than some missing dependencies, they work well. It's enough to make you imagine a future when all the problems get worked out, and Google opens the floodgates on the Play Store, putting 1.3 million Android apps onto nearly every platform.