README.md 6.2 KB
Newer Older
1 2 3
[![Snap Status](https://build.snapcraft.io/badge/anbox/anbox.svg)](https://build.snapcraft.io/user/anbox/anbox)
[![Build Status](https://travis-ci.org/anbox/anbox.svg?branch=master)](https://travis-ci.org/anbox/anbox)

S
Simon Fels 已提交
4 5
# Anbox

H
hub2git 已提交
6
Anbox is a container-based approach to boot a full Android system on a
S
Simon Fels 已提交
7 8 9
regular GNU/Linux system like Ubuntu. In other words: Anbox will let
you run Android on your Linux system without the slowness of
virtualization.
S
Simon Fels 已提交
10 11 12 13 14

## 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
J
Jonathan 已提交
15
any GNU/Linux-based platform.
S
Simon Fels 已提交
16

17 18
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
J
Jonathan 已提交
19 20
reusing what Android implemented within the QEMU-based emulator for OpenGL
ES accelerated rendering. The Android system inside the container uses
21 22
different pipes to communicate with the host system and sends all hardware
access commands through these.
S
Simon Fels 已提交
23 24 25

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

D
Dan Wiechert 已提交
26 27 28 29
 * [Android Hardware OpenGL ES emulation design overview](https://android.googlesource.com/platform/external/qemu/+/emu-master-dev/android/android-emugl/DESIGN)
 * [Android QEMU fast pipes](https://android.googlesource.com/platform/external/qemu/+/emu-master-dev/android/docs/ANDROID-QEMU-PIPE.TXT)
 * [The Android "qemud" multiplexing daemon](https://android.googlesource.com/platform/external/qemu/+/emu-master-dev/android/docs/ANDROID-QEMUD.TXT)
 * [Android qemud services](https://android.googlesource.com/platform/external/qemu/+/emu-master-dev/android/docs/ANDROID-QEMUD-SERVICES.TXT)
30 31 32 33 34 35 36 37 38

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](https://source.android.com/).
The used image is currently based on Android 7.1.1
S
Simon Fels 已提交
39

40 41
## Installation

42
See our [installation instructions](docs/install.md) for details.
43 44

## Supported Linux Distributions
45

46 47 48
At the moment we officially support the following Linux distributions:

 * Ubuntu 16.04 (xenial)
S
Simon Fels 已提交
49
 * Ubuntu 18.04 (bionic)
50

S
Simon Fels 已提交
51 52
However all other distributions supporting snap packages should work as
well as long as they provide the mandatory kernel modules (see kernel/).
53 54

## Install and Run Android Applications
S
Simon Fels 已提交
55

56 57
TBD

58 59
## Build from source

W
WANG Zhenhua 已提交
60 61
### Requirements

62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
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
S
Simon Fels 已提交
78
 * libsystemd
79 80 81 82
 * mesa (libegl1, libgles2)
 * libsdl2
 * libprotobuf
 * protobuf-compiler
83
 * lxc (>= 3.0)
T
twwang 已提交
84 85
 * libasound

86 87 88 89 90 91 92 93

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 \
S
Simon Fels 已提交
94
    libboost-thread-dev libcap-dev libsystemd-dev libegl1-mesa-dev \
C
Cameron Nemo 已提交
95
    libgles2-mesa-dev libglm-dev libgtest-dev liblxc1 \
M
Matlink 已提交
96
    libproperties-cpp-dev libprotobuf-dev libsdl2-dev libsdl2-image-dev lxc-dev \
T
twwang 已提交
97
    pkg-config protobuf-compiler libasound2-dev
98
```
99
We recommend Ubuntu 18.04 (bionic) with **GCC 7.x** as your build environment.
W
WANG Zhenhua 已提交
100 101 102


### Build
103 104

Afterwards you can build Anbox with
105

106
```
S
Scott Edwards 已提交
107 108
$ git clone https://github.com/anbox/anbox.git
$ cd anbox
109 110 111 112
$ mkdir build
$ cd build
$ cmake ..
$ make
113
```
114

115
A simple
116

117
```
S
Scott Edwards 已提交
118
$ sudo make install
119
```
120 121 122

will install the necessary bits into your system.

123 124 125 126 127 128 129 130 131 132 133 134 135 136
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
```
S
Simon Fels 已提交
137

138
## Run Anbox
S
Simon Fels 已提交
139

140 141 142
Running Anbox from a local build requires a few more things you need to know
about. Please have a look at the ["Runtime Setup"](docs/runtime-setup.md)
documentation.
S
Simon Fels 已提交
143

J
Jonathan 已提交
144
## Documentation
S
Simon Fels 已提交
145

146 147 148 149 150 151 152
You will find additional documentation for Anbox in the *docs* subdirectory
of the project source.

Interesting things to have a look at

 * [Runtime Setup](docs/runtime-setup.md)
 * [Build Android image](docs/build-android.md)
T
twwang 已提交
153 154 155 156 157 158 159 160 161 162 163 164 165
 ```
 android 目前修改的代码仓库:
 repository1名称:https://gitee.com/src-openeuler/platform_hardware_libhardware_legacy
 repository2名称:https://gitee.com/src-openeuler/platform_hardware_ril
 repository3名称:https://gitee.com/src-openeuler/platform_frameworks_base
 repository4名称:https://gitee.com/src-openeuler/platform_frameworks_native
 repository5名称:https://gitee.com/src-openeuler/platform_frameworks_opt_net_wifi
 repository6名称:https://gitee.com/src-openeuler/platform_system_core
 repository7名称:https://gitee.com/src-openeuler/platform_packages_apps_DeskClock
 repository8名称:https://gitee.com/src-openeuler/platform_build
 repository9名称:https://gitee.com/src-openeuler/platform_manifests

 ```
166
 * [Generate Android emugl source](docs/generate-emugl-source.md)
R
rongwang 已提交
167
 * [Apply SDL patch](docs/apply_SDL_patch.md)
W
wang rong 已提交
168
 * [Release notes](docs/release-notes/anbox-release-notes.md)
169 170 171 172 173 174 175 176

## Reporting bugs

If you have found an issue with Anbox, please [file a bug](https://github.com/anbox/anbox/issues/new).

## Get in Touch

If you want to get in contact with the developers please feel free to join the
J
Jonathan 已提交
177
*#anbox* IRC channel on [Freenode](https://freenode.net/).
178 179

## Copyright and Licensing
S
Simon Fels 已提交
180

181 182 183
Anbox reuses code from other projects like the Android QEMU emulator. These
projects are available in the external/ subdirectory with the licensing terms
included.
S
Simon Fels 已提交
184

J
Jonathan 已提交
185
The Anbox source itself, if not stated differently in the relevant source files,
186
is licensed under the terms of the GPLv3 license.