Anbox Could Be the Android-to-Linux Tool Devs Have Been Waiting For

The ability to run Android apps natively in a Linux desktop environment is a step closer to realization, thanks to Anbox, a new open source project.

Simon Fels, who is the lead software engineer at Canonical, last week debuted a pre-alpha release of the Anbox platform, which he has been working on independently since 2015.

“It was born out of the idea of putting Android into a simple container based on LXC and bridging relevant parts over to the host operating system while not allowing any access to real hardware or user data,” Fels wrote in an online post.

There were quite a few problems to solve on the way to a working version, but the project is now at a point where he’s ready to share it with a wider audience, he said.

Pent-Up Interest?

Anbox takes Linux namespaces — such as user, network and cgroup — to isolate the Android system from the host, Fels said.

For Open GL ES support, Anbox takes code parts from the Android emulator implementation to serialize the command stream and send it to the host, he noted. It is mapped over existing Open GL or Open GL ES implementations.

The source code is entirely open source, Fels added. Most features are licensed under the terms of the GPLv3, but a few are Apache 2.0., due to compatibility reasons.

In its current pre-alpha state, crashes and instability are expected, he said, but the next phase will deal with those issues and add additional features to improve integration with the host operating system.

There has been community interest in running Android apps on Linux systems for a long time, Fels told LinuxInsider. There have been several attempts, including Shashlik, but none of those earlier efforts were successful.

With Google launching an initiative to bring its Play store to Chrome, he said, there is a really good opportunity to use changes like freeform mode, which was added in Android 7, or multimonitor support, which is coming in Android 8.

Groups like UBports and the Sailfish OS community have been working toward using Anbox for delivery of Android applications on their mobile OSes, but Fels could not provide any specifics regarding those efforts.

Anbox’s Promise

There may be potential for Anbox to succeed where other attempts have fallen short.

“By making it possible to run mobile apps on a PC, you get to tap that rich application ecosystem,” noted Al Gillen, group vice president for software development and open source at IDC.

“This is in effect a virtualization and/or emulation system to provide an Android-like runtime environment for mobile apps,” he told LinuxInsider.

Anbox might help increase the size of the Android developer community, as the ability to create new apps will be easier, said Paul Teich, principal analyst at Tirias Research.

However, it will displace current tools for app developers that don’t need direct access to sensors, he pointed out.

“In this early phase, only input, audio and display interfaces are supported, as well as network access, so if developers need access to radios, accelerometers, cameras and other platform-specific hardware, for the time being they are better off staying with their current tools,” Teich told LinuxInsider.

The use of snaps and LXC containers is impressive, as they “make running Anbox so fluid,” he said.

Anbox should be one of the easier options for building mobile apps once interfaces are implemented for the major classes of sensors, said Teich.

It’s unlikely that Anbox will be a game-changer from the standpoint of applications, however, said Peter Christy, research director at 451 Research.

“Android applications, I think, are intended to run on smartphones — and I don’t think many people use Linux in that kind of form factor,” he told LinuxInsider.

Running Android apps on Linux would not be “as useful as enabling the apps to run in Windows or MacOS,” Christy said, “and even there the impact would be limited.”

David Jones is a freelance writer based in Essex County, New Jersey. He has written for Reuters, Bloomberg, Crain's New York Business and The New York Times.

Leave a Comment

Please sign in to post or reply to a comment. New users create a free account.

LinuxInsider Channels