Ask / Submit

Running Android in lxc container?

asked 2015-09-04 21:33:36 +0300

peerchemist gravatar image

updated 2015-09-05 00:32:30 +0300

Have Jolla engineers considered running Android in lxc container? It seems Cannonical is trying something like that for their "Ubuntu Touch" OS. Information on the Internet is sparse and seems to be limited to few smaller projects. Still interesting to take a look.

Benefits of this approach would obviously be:

  • better isolation of Sailfish and Android, as well as ability to fine tune and tweak "meeting points" where two OS's would be able to interact

  • Jolla would be able to apply AppArmour on the whole Android container;

  • Snapshoting Android rootfs via lxc/btrfs integration (to enable rolling back after some malicious program is installed or just something random went wrong)

  • Run multiple Android versions on Sailfish

Info links:

edit retag flag offensive close delete

3 Answers

Sort by » oldest newest most voted

answered 2015-09-05 00:30:24 +0300

Philippe De Swert gravatar image

Well go ahead and give it a try! Containers should run on the phone. As here:

edit flag offensive delete publish link more

answered 2017-04-12 08:42:22 +0300

netvandal gravatar image

Anbox was just released:

It's interesting but it require the loading of some kernel modules that make everything more complicated for dev outside jolla itself.

edit flag offensive delete publish link more


we've probably already got the modules for ashmem and binder installed and working, so its just the container things and it should JustWorkTM

Its fairly similar to what SFDroid is on ported devices really

r0kk3rz ( 2017-04-12 11:53:31 +0300 )edit

Any HowTo make it work with jolla1?

alexxy ( 2017-10-14 23:45:57 +0300 )edit

answered 2015-09-05 11:35:45 +0300

t-lo gravatar image

As @Philippe De Swert already mentioned - recent SailfishOS versions (>= 1.1.6) support containers out of the box, with systemd-nspawn ( being used for container supervision (instead of lxc).

The thing that's missing is the actual Android container image(s). For now, Condroid seems to be more of an empty shell. As soon as an image becomes available though basically every Jolla owner can start integrating, then using it.

edit flag offensive delete publish link more


BTW has anyone tried to run a full distro on a systemd-nspawn container and have the desktop render on the screen as an app?

ApB ( 2015-09-05 12:17:36 +0300 )edit

systemd-nspawn can not be used in such way. You will not be able to see the Desktop of such guest OS.

peerchemist ( 2015-09-05 12:25:04 +0300 )edit

I've seen people launch compositors inside compositors (wayland) so i thought it might be possible. And there is a section in the arch wiki on how to launch X but obviously this doesn't apply on the phone.

ApB ( 2015-09-05 12:39:50 +0300 )edit

@ApB "full distro" yes (Fedora 22 Cloud Image), but I didn't try a graphical desktop yet. A selection of Fedora ARM images is available here: In theory, any ARM image of a distro running systemd it should work straight away; it does not need to be a "container" image. Sailfish's systemd-nspawn will tell the image's systemd that it's containerized, which should cause the image to do the Right Things.

@peerchemist I'm not entirely sure this is true - maybe it can be fixed by granting the appropriate permissions. I'm sure though it can be worked around, e.g. by having the container serve VNC, and usung a native Jolla VNC client to connect to the container's desktop, for a start.

t-lo ( 2015-09-05 12:45:07 +0300 )edit

@t-lo If you try could you give a heads up. Post here a how to or whatever. ;)

ApB ( 2015-09-05 13:19:48 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2015-09-04 21:33:36 +0300

Seen: 2,710 times

Last updated: Apr 12 '17