Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
anbox
提交
205be644
A
anbox
项目概览
openeuler
/
anbox
通知
24
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
anbox
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
205be644
编写于
5月 25, 2018
作者:
S
Simon Fels
提交者:
GitHub
5月 25, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into basic-touch
上级
3f4ab577
107d52de
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
115 addition
and
6 deletion
+115
-6
README.md
README.md
+1
-1
docs/install.md
docs/install.md
+106
-0
scripts/gen-emugl-entries.py
scripts/gen-emugl-entries.py
+1
-1
src/anbox/rpc/channel.cpp
src/anbox/rpc/channel.cpp
+1
-0
src/anbox/rpc/constants.h
src/anbox/rpc/constants.h
+1
-1
src/anbox/rpc/message_processor.cpp
src/anbox/rpc/message_processor.cpp
+5
-3
未找到文件。
README.md
浏览文件 @
205be644
...
...
@@ -75,7 +75,7 @@ $ anbox-installer
This will guide you through the installation process.
**NOTE:**
Anbox is currently in a
**
pre-
alpha development state**
. Don't expect a
**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!
...
...
docs/install.md
0 → 100644
浏览文件 @
205be644
# Install Anbox
To install Anbox your system need to support
[
snaps
](
https://snapcraft.io
)
. We
do not officially support any other distribution method of Anbox at the moment
but there are community made packages for various distributions (e.g. Arch Linux).
However please keep in mind that the Anbox project can give not support them
and its solely in the responsibility of the community packager to keep up with
upstream development and update the packaging to any new changes. Please feel
free to report still any bugs you encounter as they may not be related to the
packaging.
If you don't know about snaps yet head over to
[
snapcraft.io
](
https://snapcraft.io/
)
to get an introduction of what snaps are, how to install support for them on your
distribution and how to use them.
The installation of Anbox consists of two steps.
1.
Install necessary kernel modules
2.
Install the Anbox snap
In order to support the mandatory kernel subsystems ashmem and binder for the
Android container you have to install two
[
DKMS
](
https://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support
)
based kernel modules. The source for the kernel modules is maintained by the
Anbox project
[
here
](
https://github.com/anbox/anbox/tree/master/kernel
)
.
At the moment we only have packages prepared for Ubuntu in a PPA on Launchpad.
If you want to help to get the packages in your favorite distribution please
come and talk to us or submit a PR with the distribution specific packaging.
The second step will install the Anbox snap from the store and will give you
everything you need to run the full Anbox experience.
## Install necessary kernel modules
In order to add the PPA to your Ubuntu system please run the following commands:
```
$ sudo add-apt-repository ppa:morphis/anbox-support
$ sudo apt update
$ sudo apt install anbox-modules-dkms
```
These will add the PPA to your system and install the
`anbox-modules-dkms`
package which contains the ashmem and binder kernel modules. They will be
automatically rebuild everytime the kernel packages on your system update.
After you installed the
`anbox-modules-dkms`
package you have to manually
load the kernel modules. The next time your system starts they will be
automatically loaded.
```
$ sudo modprobe ashmem_linux
$ sudo modprobe binder_linux
```
Now you should have two new nodes in your systems
`/dev`
directory:
```
$ ls -1 /dev/{ashmem,binder}
/dev/ashmem
/dev/binder
```
## Install the Anbox snap
Installing the Anbox snap is very simple:
```
$ snap install --devmode --beta anbox
```
If you didn't logged into the Ubuntu Store yet, the
`snap`
command will
ask you to use
`sudo snap ...`
in order to install the snap:
```
$ sudo snap install --devmode --beta anbox
```
At the moment we require the use of
`--devmode`
as the Anbox snap is not
yet fully confined. Work has started with the upstream
`snapd`
project to
get support for full confinement.
As a side effect of using
`--devmode`
the snap will not automatically update.
In order to update to a newer version you can run:
```
$ snap refresh --beta --devmode anbox
```
Information about the currently available versions of the snap is available
via:
```
$ snap info anbox
```
## Available snap channels
Currently we only use the beta and edge channels for the Anbox snap. The edge
channel tracks the latest development is always synced with the state of the
master branch on github. The beta channel is updated less frequently to provide
a more stable and bug free experience.
Once proper confinement for the Anbox snap exists we will also start using the
candidate and stable channels.
scripts/gen-emugl-entries.py
浏览文件 @
205be644
#!/usr/bin/env python
#!/usr/bin/env python
2
# Copyright 2015 The Android Open Source Project
#
...
...
src/anbox/rpc/channel.cpp
浏览文件 @
205be644
...
...
@@ -74,6 +74,7 @@ void Channel::send_message(const std::uint8_t &type,
google
::
protobuf
::
MessageLite
const
&
message
)
{
const
size_t
size
=
message
.
ByteSize
();
const
unsigned
char
header_bytes
[
header_size
]
=
{
static_cast
<
unsigned
char
>
((
size
>>
16
)
&
0xff
),
static_cast
<
unsigned
char
>
((
size
>>
8
)
&
0xff
),
static_cast
<
unsigned
char
>
((
size
>>
0
)
&
0xff
),
type
,
};
...
...
src/anbox/rpc/constants.h
浏览文件 @
205be644
...
...
@@ -20,7 +20,7 @@
namespace
anbox
{
namespace
rpc
{
static
constexpr
const
long
header_size
{
3
};
static
constexpr
const
long
header_size
{
4
};
static
constexpr
unsigned
int
const
serialization_buffer_size
{
2048
};
enum
MessageType
{
...
...
src/anbox/rpc/message_processor.cpp
浏览文件 @
205be644
...
...
@@ -47,9 +47,10 @@ bool MessageProcessor::process_data(const std::vector<std::uint8_t> &data) {
while
(
buffer_
.
size
()
>
0
)
{
const
auto
high
=
buffer_
[
0
];
const
auto
low
=
buffer_
[
1
];
size_t
const
message_size
=
(
high
<<
8
)
+
low
;
const
auto
message_type
=
buffer_
[
2
];
const
auto
medium
=
buffer_
[
1
];
const
auto
low
=
buffer_
[
2
];
size_t
const
message_size
=
(
high
<<
16
)
+
(
medium
<<
8
)
+
low
;
const
auto
message_type
=
buffer_
[
3
];
// If we don't have yet all bytes for a new message return and wait
// until we have all.
...
...
@@ -101,6 +102,7 @@ void MessageProcessor::send_response(::google::protobuf::uint32 id,
const
size_t
size
=
send_response_buffer
.
size
();
const
unsigned
char
header_bytes
[
header_size
]
=
{
static_cast
<
unsigned
char
>
((
size
>>
16
)
&
0xff
),
static_cast
<
unsigned
char
>
((
size
>>
8
)
&
0xff
),
static_cast
<
unsigned
char
>
((
size
>>
0
)
&
0xff
),
MessageType
::
response
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录