Ideas on running Android Apps on Linux – Part 1


Well, Android may be nice for certain tasks but I just prefer having a “real” GNU/linux distribution in front of me (as to why ‘real’ please consider using a search engine of your choice) BUT there are lots of usefull (and lots of not-so-usefull) apps out there which are running solely on Android and a few of them i’d like to use on my Laptop, PC, et cetera.

How is this possible?

To answer this question, we first need to understand the difference between Android and e.g. Ubuntu, Fedora, Arch (…). For a detailed reading I’ll just point you at Wikipedia entries for Android and Linux. Here is a wonderfull graphical overview by Shmuel Csaba Otto Traian (licensed under cc-by-sa-3.0)


Okay this doesn’t really answer anything but let’s just say that they share the same kernel base (for it’s greatest part) but on top the libraries and window managers and all this stuff is different.

(1)First Idea: Wine for Android

As far as I understand wine (please correct me if I’m wrong) it translates commands as they would be executed in windows to a command as it would be used in linux for the same purpose.

This would mean, that for each library in Android, an alternative on GNU/linux had to be found and every command possible translated so that an app could work correctly. Sounds like a huge amount of work!

(2) Second Idea: Android in LXC/LXD container

So far, this sounds for me (as a noob) like the best plan; on most distros, we can easily create a lxc container which shares the kernel with the host. A problem which might occur is that there may be android specific kernel patches. So the host kernel would need to provide their functionality. Don’t know whether that’s possible.

(3) Third Idea: Android in Virtual Machine

Okay, this is almost the same as the container with just a few important differences; no shared kernel so there shouldn’t be a problem with any specific code in either kernel. The downside might be performance.

Deciding into the wild

I think I made clear that I don’t know really much about all of this so it might sound like stealing fire from the gods but at least considering trying something like this is fun.

There is (or was?) at least one project which tried one of those solutions, namely the last one of running a stripped Android inside a VM with the wonderfull name of shashlik. This seems unfortunately not to be developed actively -.- however maybe there is some code or ideas we can reuse for our purposes.

Another example of some part of the above mentioned ideas implemented in the real world is the use of android parts inside a lxc container in ubuntu touch. (Rumour says that one developer of the UBports project, Marius Gripsgard is working on something like this, maybe I should get in contact further down the road).

The most important thing seems to be: decide/find out which parts of android are necessary to run apps and strip the OS around it. Afterwards we can still think about how to virtualize this or translate it into ‘real’ linux.

If you have any ideas or thoughts on this so far, comment below 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s