This article is more than 1 year old

How many Android containers can you fit on your VM?

The Register speaks to Canonical about running the OS in the cloud

Interview Developers targeting Android are spoiled for choice with their platforms.

There are a variety of options available for running Android application development environments these days. Even Microsoft has promised that its upcoming Windows 11 will eventually be able to run the apps on the desktop and has long since supported the mobile OS via its Your Phone app, even while smothering its ailing Windows Phone with a cuddly Android pillow.

For Canonical, however, Anbox remains a cloud product, according to Simon Fels, engineering manager and is therefore unlikely to feature in any desktop version of the company's Ubuntu distribution any time soon, although with September's announcement it will now cheerfully scale from the heights of the cloud down to a single Virtual Machine via the Appliance version.

"The software which is running is pretty much identical," Fels explains, regarding the differences in the Appliance version of Anbox Cloud. Instead the goal is to make it easier for developers to get started: "We wanted to allow people to directly dive in and do something with the Android containers without having to spend time on setting up infrastructure, deploying things and so on."

The result is something relatively agnostic. While much was made of the AWS Marketplace at launch, Fels tells us there was little to stop an Ubuntu Advantage subscriber from firing up Anbox Cloud pretty much anywhere: "We have a lot of people doing that already."

As for Anbox itself, Fels kicked off a GitHub repo some years ago with a view to running Android in containers. "Canonical," he says, "was investing heavily into Ubuntu Touch as a smartphone operating system, where we were trying to solve the app availability problem to get more applications onto [it] which Anbox was one approach."

Canonical stepped back from Ubuntu Touch, but, as Fels puts it, they "saw customer interest" in the idea of running Android applications in the cloud ("primarily for cloud gaming," Fels noted) and Anbox Cloud got under way.

Fels is keen to emphasise that the inhouse Anbox Cloud was a different beast to the open-source project. "Anbox Cloud is an independent code base, not sharing code with the open source Anbox project on GitHub and is not available under an open source license," he says.

It "has a lot more features… it has more graphics support and is highly optimised specifically for high density." In this case, cramming as many Android instances onto a machine as possible.

"They both have the same origin in the original prototype I did years ago, so share similar names and ideas but the Anbox Cloud code is much further developed and has a different target use case (desktop vs cloud)."

As for Android itself, it's pretty much unchanged, although Fels notes the instances don't pass every single one of the conformance tests. "Out of those we don't pass," he says, "there are ones which just don't apply for cloud-based instances as the CTS [Compatibility Test Suite] was designed with physical devices in mind and others which our containerization prevents.

"Then there is still a small number where we have bugs to be fixed pending. "Generally," he adds, "we're compatible with standard Android." As long as there are no Google Play dependencies, of course.

As for resource usage, the instances could, from a technical perspective, consume whatever is available. However, "we have resource allocations for each of the containers to just ensure that a single one cannot overtake the entire machine." The containers are also isolated from one another.

Going forward, with the vast majority of Android applications running on Arm hardware, "physical Arm is absolutely a topic for us," says Fels. Sure, Android will run happily enough on x86 silicon, but Arm tends to be where it's at. "The problem we're trying to solve," he adds, "is not just a software problem, it's also a hardware problem.

"As Android is primarily an Arm platform, having somebody providing a competitive Arm service is absolutely needed.

"We're working very closely with Ampere Computing," he continues, "and supporting their Altra chip family by default. Generally, we run on any Arm platform certified for Ubuntu, including AWS Graviton which the Anbox Cloud Appliance is available on within the AWS Marketplace."

As for what the service will be used for, Fels points to developers adopting it as a first entry point "who have an idea and want to see if it's good."

Then there are those who are pondering how they might make use of Android in the cloud and, we suppose, lift and shift apps away from devices.

The team is also pondering a long-term servicing option. Not in the Ubuntu five-to-10-years meaning of the phrase, "more in the sense that we would like to have a longer release period for an individual release as we are releasing a new minor version every three months."

Fels adds that the containers themselves are not forced to update. They are, however, ephemeral and require the state to be preserved.

And the Android updates themselves? "We are not a Google partner so we don't receive those patches up front. So we usually publish an update to a patch release for Anbox Cloud at the middle of each month." ®

More about


Send us news

Other stories you might like