Commit graph

305 commits

Author SHA1 Message Date
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
Bernhard Rosenkränzer
f26252d1fc Fix build with clang
Fixes building anbox with clang 4.0 -- removes unused declarations,
makes sure a template is visible at first instantiation, makes sure
exception declarations match between headers and implementations

Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
2017-05-18 17:56:49 +02:00
Stephan Bergmann
b10f16428a Make dependency on properties-cpp explicit
...so its include files are found even in a non-default location
2017-05-17 11:08:10 +02:00
Simon Fels
e04dd4bcf6 Merge pull request #241 from lag-linaro/master
cmds: session_manager: Provide an option to use any container
2017-05-15 11:52:40 +02:00
Simon Fels
4fde30b7b6 Correct emugl includes and move to std::{mutex,shared_ptr} where possible 2017-05-14 21:06:07 +02:00
Simon Fels
56ed59334f Don't try to connect to host adb when timer is aborted 2017-05-14 13:02:41 +02:00
Simon Fels
62ce199dbc Use std::unique_lock for mutex operations 2017-05-14 13:02:41 +02:00
Simon Fels
183c02d2d0 Make adb message processor more robust in shutdown scenarios 2017-05-14 13:02:41 +02:00
Simon Fels
14d77e9cc4 User proper constants in our adb message processor 2017-05-14 13:02:41 +02:00
Lee Jones
e492cd1af8 cmds: session_manager: Handle the Container Client class using pointers
We can now start the Session Manager in Stand Alone Mode.  This means
that the Container Manager is not required, since the assumption is
that the user will provide their own container.  The issue is that
the container related calls are spread throughout the Session
Manager's code base.  So if we attempt to take an instance of the
Container Client class in one if-ed out area, by the time we reach
the next, it will be out of scope.

One solution is to take the instance of the Container Client class
globally, then only make use of it if it's required.  This works
great if the Container Manager is running in the background.
However, since a connection is made to the Container Manager
during the constructor, if the Container Manager is not running,
the side-effect is the following error:

  Failed to connect to socket /run/anbox-container.socket: Connection refused

To solve this problem we will use a global (actually private to
the Session Manager) pointer which will always be in scope.  It
will only be initialised and used when required though.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-05-12 15:40:40 +01:00
Lee Jones
157a2f9c13 cmds: session_manager: Introduce an Experimental Mode flag
Some features which Anbox offer may be useful to users, but can not
be officially supported.  For example, the recently added Stand-Alone
Mode can be utilised to make use of different types of independent
containers where Anbox does not control the complete life cycle, but
since these types of setups can be widely varying and complex, it
would not be impossible to provide support.  Thus, when running in
these modes, it's important for the user to show knowledge that they
are operating in an experimental way.  This functionality provided
by issuing the --experimental flag when starting the Session Manager.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-05-12 15:40:40 +01:00
Lee Jones
c0393a6713 cmds: session_manager: Provide an option to use any container
Normally Anbox will use the default container provided by the
Anbox Container Manager, but some users may wish to run their
own container.  Here we're adding a --standalone flag which
tells the Session Manager not to interact (configure/start)
the Container Manager.  This allows the user to utilise any
other bespoke container of their choosing.  For instance,
this new feature was tested using a Docker container running
the android.img provided by Anbox.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-05-12 15:40:40 +01:00
Simon Fels
583e191071 Don't register platform policy as display manager but use a singleton instead 2017-05-12 08:36:03 +02:00
Simon Fels
bf243a33e8 Make platform policy a weak_ptr inside our window managers to break cycle reference 2017-05-12 08:35:10 +02:00
Simon Fels
a21233cb38 Merge pull request #252 from morphis/f/warn-on-cm-start
Print warning if user starts container manager manually
2017-05-11 18:35:59 +02:00
Simon Fels
5c1418b849 Merge pull request #251 from morphis/f/static-network-config
Use a static IP configuration for Android instead of a full blown DHCP setup
2017-05-11 18:35:46 +02:00
Simon Fels
e73ea080c4 Rename write_unsigned_{long,short} to write_uint{16,32} 2017-05-11 18:06:24 +02:00
Simon Fels
dd21e8fa1d Make never change value static and const 2017-05-11 18:05:38 +02:00
Simon Fels
e83cc1e5fd Use geteuid instead of getuid 2017-05-11 18:00:06 +02:00
Simon Fels
e60e020413 Remove double 'or' from warning message 2017-05-11 17:59:54 +02:00
Simon Fels
69733b1843 Merge pull request #244 from morphis/f/use-host-os-release
Read host os-release file when running inside the snap
2017-05-11 17:58:37 +02:00