Commit graph

325 commits

Author SHA1 Message Date
Lee Jones
1c7eef1fd3 anbox: qemu: qemud_message_processor: Handle multiple 'cat'ed messages
It is possible for more than one message to be delivered concurrently.
When this happens, messages are concatenated together (end-to-end).
Current code errors out if the total received data is larger than the
known header_size (4) + the body size (reported in the header).
However, when >=2 messages arrive at the same time, the total received
data will be far greater than this.

The current code base actually handles multiple messages perfectly
already, so all we need to do is remove the early return and
everything "just works".

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-11-17 12:24:20 +00:00
Simon Fels
067201baba emugl: generate GL ES/EGL function prototypes at build type from entries files
This will make the *.entries files the the authoritative place to
define additional GL function prototypes. All generated header
files are now placed inside the build directory so that nobody
will ever try to touch them again.
2017-08-31 15:40:22 +02:00
王振华 (WANG Zhenhua)
f203a75010 Merge cmake configured headers into one config.h.in
This looks better than leave cmake *.in everywhere in the tree.
Also fix typo according to review comments of PR 425.
2017-08-28 15:09:09 +08:00
王振华 (WANG Zhenhua)
202b556bea Configure default resource and data directories from CMake
As anbox is expected to installed in two ways (`snap` or `make install`),
it should be enough to get `snap` ENV or configure by cmake.
2017-08-28 10:47:34 +08:00
王振华 (WANG Zhenhua)
7a8f1efab9 Compatible resource directory determination
Previously, the resource directory is generated from `SNAP` if set,
`/usr/share/anbox` is used otherwise. This cannot work with binaries
installed via `make install` since the loading screen is mostly at
`/usr/local/share/anbox/ui/loading-screen.png`.

With this patch, anbox can get correct resource directory when it's
installed without snap.
2017-08-25 14:50:38 +08:00
Simon Fels
17f6c8cd8b Merge pull request #422 from morphis/f/various-fixes
Fix various problems with the session manager startup process
2017-08-24 12:57:55 +02:00
Simon Fels
0e740f0c6b cmds: directly start appmgr in single window mode 2017-08-24 10:30:50 +02:00
Simon Fels
8237c963ed bridge: use five second timeout for all RPC
Before we were waiting forever for a reply which never occured in some
cases due to errors when processing incoming protobuf messages we now
abort the RPC call after a timeout of five seconds to keep operational.
2017-08-24 08:41:59 +02:00
Simon Fels
f76c039415 dbus: use a larger timeout for launch API calls 2017-08-24 08:41:59 +02:00
Simon Fels
e9cd1b7b66 emugl: correct locking when we draw a new frame 2017-08-24 08:41:59 +02:00
Simon Fels
4b344ad204 emugl: print EGL error when eglMakeCurrent fails 2017-08-24 08:41:59 +02:00
Simon Fels
05fb78e5bf logger: use syslog for output when we don't have a controlling tty 2017-08-24 08:41:59 +02:00
Simon Fels
579d28865b cmds: apply proper daemonization handling for forked session manager 2017-08-24 08:41:59 +02:00
Simon Fels
07b32235ea Don't force host GL driver on nvidia platforms anymore
Using the host GL driver is already the default so need to special case
this for nvidia.
2017-08-24 08:41:59 +02:00
Simon Fels
6b3295f8a8 Only attempt to create a renderer when we don't have one already 2017-08-24 08:41:59 +02:00
Simon Fels
b7173ac94a Print out example launch intent when executed without any argument 2017-08-24 08:41:59 +02:00
Alfonso Sánchez-Beato
1e884a12f7 Remove traces in AdbMessageProcessor 2017-08-23 11:10:30 +02:00
Alfonso Sánchez-Beato
427354d691 Remove now unneeded timer in AdbMessageProcessor 2017-08-23 11:08:38 +02:00
Alfonso Sánchez-Beato
bc13125585 Avoid crashes on AdbMessageProcessor destruction 2017-08-23 11:08:33 +02:00
Alfonso Sánchez-Beato
5c7ac4f885 Release resources on disconnection 2017-08-23 11:08:23 +02:00
Simon Fels
b4710c1572 cmds: select host as the default GL ES driver 2017-08-16 10:26:19 +02:00
Simon Fels
ca59f27c23 Merge pull request #354 from morphis/f/squashfuse-mount-support
Add support for rootfs mounts via squashfuse
2017-07-12 12:16:14 +02:00
Simon Fels
f6e421a089 Add support to mount rootfs image via squashfuse 2017-07-12 09:28:59 +02:00
Simon Fels
aecf88fb2d Pass optional additonal user data to mount syscall 2017-07-12 09:28:56 +02:00
Simon Fels
7cfef55e2d Allow a mount entry to be construct with just the mounted path 2017-07-12 09:28:53 +02:00
Simon Fels
ac2181d92b Add simple helper function to find program in PATH 2017-07-12 09:28:49 +02:00
Shengjing Zhu
63022b1604 Remove duplicated suffix on version string
In CMakeLists.txt, it already defines:

if (ANBOX_VERSION_SUFFIX)
    set(ANBOX_VERSION "${ANBOX_VERSION}-${ANBOX_VERSION_SUFFIX}")
endif()

So there's no need to add suffix again in code

Signed-off-by: Shengjing Zhu <i@zhsj.me>
2017-07-11 19:41:06 +08:00
Simon Fels
00ea7d9641 Merge pull request #349 from morphis/f/fix-comp-errors-armhf
Fix compilation errors on armhf
2017-07-10 21:41:23 +02:00
Simon Fels
79b598be13 Merge pull request #346 from morphis/f/allow-use-of-system-dbus
Allow the use of the system dbus service
2017-07-10 21:40:58 +02:00
Simon Fels
41c0390e42 Fix compilation errors on armhf 2017-07-10 09:59:54 +02:00
Simon Fels
43244baa11 Add argument for launch command to use system dbus 2017-07-10 09:56:51 +02:00
Simon Fels
15a27ec8b6 Add command line option to use system dbus 2017-07-10 09:56:40 +02:00
Simon Fels
6a30bfaece Create correct application manager based on if we're single window or not 2017-07-07 10:26:43 +02:00
Simon Fels
c2e5bec26d Only use multi window manager when platform supports 2017-07-07 10:26:43 +02:00
Simon Fels
fa2c5f2088 Add simple header to wrap SDL headers and ignore any compiler warnings 2017-06-20 07:26:58 +02:00
Simon Fels
66688167df Move sdl platform into anbox/platform/sdl 2017-06-19 21:33:57 +02:00
Simon Fels
db7d18d01c Introduce platform concept instead of having different policies 2017-06-19 21:20:47 +02:00
Simon Fels
91a338ae27 Merge pull request #311 from morphis/f/check-for-valid-launch-intent
Ensure that we have an valid intent before we launch it
2017-06-07 07:49:32 +02:00
Simon Fels
edd8960009 Ensure that we have an valid intent before we launch it 2017-06-07 07:28:48 +02:00
Simon Fels
dc21069ae1 Rework versioning to include git rev in snap version 2017-06-03 14:02:04 +02:00
Eddie Ringle
552d30cfb4 Fix build with GCC 7.1
From the Porting to GCC 7[1] page:

> Several C++ Standard Library headers have been changed to no longer include
> the `<functional>` header. As such, C++ programs that used components defined
> in `<functional>` without explicitly including that header will no longer
> compile.

> Previously components such as std::bind and std::function were
> implicitly defined after including unrelated headers such as `<memory>`,
> `<future>`, `<mutex>`, and `<regex>`.
> Correct code should `#include <functional>` to define them.

[1]: https://gcc.gnu.org/gcc-7/porting_to.html

Signed-off-by: Eddie Ringle <eddie@ringle.io>
2017-05-29 18:58:39 -05:00
Simon Fels
7e031d3cd9 Merge pull request #296 from morphis/f/correct-screen-dimensions
Correct screen dimensions
2017-05-27 18:35:33 +02:00
Simon Fels
5e1e08b5eb Correct incorrect vertical/horizontal to width/height assignment 2017-05-27 18:11:43 +02:00
Simon Fels
bc4ce254d1 Migrate permissions of /data correctly for existing installations 2017-05-27 18:05:23 +02:00
Simon Fels
e82afd1eee Merge pull request #286 from morphis/f/correct-permissions-for-ip-conf
Correct permissions for Android IP configuration directory to prevent failing container start
2017-05-23 08:50:12 +02:00
Simon Fels
c08b795494 Assign current owner to the IP configuration dir
If we don't assign the unprivileged user as owner the container
will fail to start as the Android services wont be able to write
anything into the created directory hierarchy.
2017-05-23 08:31:54 +02:00
Simon Fels
d03a32b014 Create container data directory on startup if it doesn't exist 2017-05-23 08:30:00 +02:00
Simon Fels
190d8690d3 If launched with debug severity allow our subprocess to write to stdout/stderr 2017-05-23 08:29:41 +02:00
Simon Fels
09abf17f3f Merge pull request #254 from morphis/f/fix-ptr-references
Fix cyclic reference between PlatformPolicy and WindowManager and rework DisplayManager
2017-05-23 07:31:38 +02:00
Simon Fels
b5d0404cfe Merge pull request #262 from morphis/f/emugl-cleanup
Correct emugl includes and move to std::{mutex,shared_ptr} where possible
2017-05-23 07:31:25 +02:00