Anbox is a container-based approach to boot a full Android system on a regular GNU/Linux system https://anbox.io
Find a file
2018-05-16 07:27:37 +02:00
.github Update ISSUE_TEMPLATE.md 2017-04-22 19:53:14 -07:00
android android: service: platform_service: Read rotation angle from parcel 2018-01-31 08:51:32 +00:00
cmake Import helper cmake script to find GMock and GTest on more modern systems 2017-04-26 19:57:15 +02:00
data Drop upstart/systemctl session jobs 2017-07-14 20:15:54 +02:00
debian Bump compat level to 9 and std-version to 4.1.3 2018-05-14 11:57:34 +02:00
docs emugl: import script for AOSP to generate encoding/decoding functions 2017-08-31 16:07:57 +02:00
external GLESv2Imp: fix bad return statement 2018-05-14 11:57:34 +02:00
kernel make the patch specific to kernel 4.15 and later 2018-02-12 11:17:06 +03:00
products Specify correct location for all files we're installing 2017-08-29 11:28:55 +02:00
scripts CMakeLists.txt: Default build type to RelWithDebInfo if none is defined 2018-05-14 12:03:50 +02:00
snap/gui Move snapcraft.yaml back to our toplevel directory 2017-04-12 19:09:14 +02:00
src emugl: limit set of extensions we expose to Android 2018-05-14 16:13:33 +02:00
tests Add test case for our restricted app manager 2017-07-07 10:33:57 +02:00
.clang-format Don't enforce column limit for our code style 2017-01-03 09:16:46 +01:00
.gitignore Merge cmake configured headers into one config.h.in 2017-08-28 15:09:09 +08:00
.travis.yml Add initial travis build configuration 2017-01-20 10:34:18 +01:00
Android.mk Implement audio support 2017-01-12 07:02:43 +01:00
AUTHORS Add List of authors 2017-04-05 07:23:41 +02:00
cmake_uninstall.cmake.in added uninstall target to cmake to allow make uninstall operation 2017-08-18 13:55:42 +02:00
CMakeLists.txt CMakeLists.txt: Default build type to RelWithDebInfo if none is defined 2018-05-14 12:03:50 +02:00
COPYING.GPL Add proper README and COPYING file 2016-06-20 09:37:16 +02:00
cross-compile-chroot.sh Drop armhf from the chroot setup script 2017-01-27 07:17:21 +01:00
README.md Update README.md 2017-12-09 23:36:57 +01:00
snapcraft.yaml snap build: prefer local android.img rather than always download 2017-07-28 09:50:20 +08:00

Snap Status Build Status

Anbox

Anbox is a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu. In other words: Anbox will let you run Android on your Linux system without the slowness of virtualization.

Overview

Anbox uses Linux namespaces (user, pid, uts, net, mount, ipc) to run a full Android system in a container and provide Android applications on any GNU/Linux-based platform.

The Android inside the container has no direct access to any hardware. All hardware access is going through the anbox daemon on the host. We're reusing what Android implemented within the QEMU-based emulator for OpenGL ES accelerated rendering. The Android system inside the container uses different pipes to communicate with the host system and sends all hardware access commands through these.

For more details have a look at the following documentation pages:

Anbox is currently suited for the desktop use case but can be used on mobile operating systems like Ubuntu Touch, Sailfish OS or Lune OS too. However as the mapping of Android applications is currently desktop specific this needs additional work to supported stacked window user interfaces too.

The Android runtime environment ships with a minimal customized Android system image based on the Android Open Source Project. The used image is currently based on Android 7.1.1

Installation

The installation process currently consists of a few steps which will add additional components to your host system. These include

  • Out-of-tree kernel modules for binder and ashmem as no distribution kernel ships both enabled.
  • A udev rule to set correct permissions for /dev/binder and /dev/ashmem
  • A upstart job which starts the Anbox session manager as part of a user session.

To make this process as easy as possible we have bundled the necessary steps in a snap (see https://snapcraft.io) called "anbox-installer". The installer will perform all necessary steps. You can install it on a system providing support for snaps by running

$ snap install --classic anbox-installer

Alternatively you can fetch the installer script via

$ wget https://raw.githubusercontent.com/anbox/anbox-installer/master/installer.sh -O anbox-installer

Please note that we don't support any possible Linux distribution out there yet. Please have a look at the following chapter to see a list of supported distributions.

To proceed the installation process simply called

$ anbox-installer

This will guide you through the installation process.

NOTE: Anbox is currently in a alpha development state. Don't expect a fully working system for a production system with all features you need. You will for sure see bugs and crashes. If you do so, please don't hestitate and report them!

NOTE: The Anbox snap currently comes completely unconfined and is because of this only available from the edge channel. Proper confinement is a thing we want to achieve in the future but due to the nature and complexity of Anbox this isn't a simple task.

Supported Linux Distributions

At the moment we officially support the following Linux distributions:

  • Ubuntu 16.04 (xenial)

Untested but likely to work:

  • Ubuntu 14.04 (trusty)
  • Ubuntu 16.10 (yakkety)
  • Ubuntu 17.04 (zesty)

Install and Run Android Applications

Build from source

Requirements

To build the Anbox runtime itself there is nothing special to know. We're using cmake as build system. A few build dependencies need to be present on your host system:

  • libdbus
  • google-mock
  • google-test
  • libboost
  • libboost-filesystem
  • libboost-log
  • libboost-iostreams
  • libboost-program-options
  • libboost-system
  • libboost-test
  • libboost-thread
  • libcap
  • libdbus-cpp
  • mesa (libegl1, libgles2)
  • glib-2.0
  • libsdl2
  • libprotobuf
  • protobuf-compiler
  • lxc

On an Ubuntu system you can install all build dependencies with the following command:

$ sudo apt install build-essential cmake cmake-data debhelper dbus google-mock \
    libboost-dev libboost-filesystem-dev libboost-log-dev libboost-iostreams-dev \
    libboost-program-options-dev libboost-system-dev libboost-test-dev \
    libboost-thread-dev libcap-dev libdbus-1-dev libdbus-cpp-dev libegl1-mesa-dev \
    libgles2-mesa-dev libglib2.0-dev libglm-dev libgtest-dev liblxc1 \
    libproperties-cpp-dev libprotobuf-dev libsdl2-dev libsdl2-image-dev lxc-dev \
    pkg-config protobuf-compiler 

We recommend Ubuntu 16.04 (xenial) with GCC 5.x as your build environment.

Build

Afterwards you can build Anbox with

$ git clone https://github.com/anbox/anbox.git
$ cd anbox
$ mkdir build
$ cd build
$ cmake ..
$ make

A simple

$ sudo make install

will install the necessary bits into your system.

If you want to build the anbox snap instead you can do this with the following steps:

$ mkdir android-images
$ cp /path/to/android.img android-images/android.img
$ snapcraft

The result will be a .snap file you can install on a system supporting snaps

$ snap install --dangerous --devmode anbox_1_amd64.snap

Run Anbox

Running Anbox from a local build requires a few more things you need to know about. Please have a look at the "Runtime Setup" documentation.

Documentation

You will find additional documentation for Anbox in the docs subdirectory of the project source.

Interesting things to have a look at

Reporting bugs

If you have found an issue with Anbox, please file a bug.

Get in Touch

If you want to get in contact with the developers please feel free to join the #anbox IRC channel on Freenode.

Anbox reuses code from other projects like the Android QEMU emulator. These projects are available in the external/ subdirectory with the licensing terms included.

The Anbox source itself, if not stated differently in the relevant source files, is licensed under the terms of the GPLv3 license.