README.md 3.4 KB
Newer Older
S
Simon Fels 已提交
1 2
# Anbox

S
Simon Fels 已提交
3 4
Anbox is container based approach to boot a full Android system on a
regular Linux system like Ubuntu.
S
Simon Fels 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

## 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 platform.

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

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

 * Android Hardware OpenGLES emulation design overview
   (https://goo.gl/O2Yi6x)
 * Android Qemu fast pipes (https://goo.gl/jl4GeS)
 * The Android "qemud" multiplexing daemon (https://goo.gl/DeYa5J)
 * Android Qemud services (https://goo.gl/W8Lx6t)

27 28
## Installation

29 30 31 32 33 34 35 36 37 38 39 40
As first step you need to install additional kernel drivers for the
Android binder and ashmem subsystems. Those drivers are packaged as
a DKMS package for Ubuntu 16.04 already. You can install them from
a ppa with the following commands:

```
 $ sudo apt install software-properties-common
 $ sudo add-apt-repository ppa:morphis/anbox-support
 $ sudo apt update
 $ sudo apt install anbox-modules-dkms
```

41 42 43 44 45 46
Anbox is available as a snap in the public Ubuntu Store. Currently it
is only available in the edge channel and requires to be installed in
devmode as we don't have proper confinement for it in place yet.

Anbox can be installed from the Ubuntu Store with

S
Simon Fels 已提交
47
```
48
$ snap install --edge --devmode anbox
S
Simon Fels 已提交
49 50
```

51 52 53

Afterwards run it with

S
Simon Fels 已提交
54
```
55
$ anbox
S
Simon Fels 已提交
56
```
57 58 59 60 61 62 63 64

After the first installation the container management service needs
a few minutes to setup the container the first time before it is
available.

Applications can be launched via the launch subcommand of the anbox
binary. For example

65
```
66
$ anbox launch --package com.android.settings
67
```
68

S
Simon Fels 已提交
69 70 71 72 73
When installed as snap there will be also a desktop launcher available
which will directly start the application viewer activity to give
an overview of available Android applications and allows to start
them.

74 75 76 77 78
## Build from source

To build the Anbox runtime itself there is nothing special to know
about. We're using cmake as build system.

79
```
80 81 82 83
$ mkdir build
$ cd build
$ cmake ..
$ make
84
```
85 86 87

That will build the whole stack. A simple

88
```
89
$ make install
90
```
91 92 93

will install the necessary bits into your system.

S
Simon Fels 已提交
94 95
## Copyright and Licensing

S
Simon Fels 已提交
96 97
Anbox reuses code from other projects like the Android Qemu emulator.
These projects are available in the external/ subdirectory with the
S
Simon Fels 已提交
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
licensing terms included.

The anbox source itself (in src/) is licensed under the terms of
the GPLv3 license:

Copyright (C) 2016 Simon Fels <morphis@gravedo.de>

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3, as published
by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranties of
MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program.  If not, see <http://www.gnu.org/licenses/>.