Commit graph

579 commits

Author SHA1 Message Date
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
Simon Fels
575781edf0 Merge pull request #266 from Red54/patch-1
Update build-android.md
2017-05-23 07:31:13 +02:00
Simon Fels
a7e9d01dea Merge pull request #276 from berolinux/clang-buildfixes
Fix build with clang
2017-05-23 07:30:51 +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
Thomas Voß
82c551f74f Merge pull request #274 from stbergmann/master
Make dependency on properties-cpp explicit
2017-05-17 21:48:59 +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
謝致邦 (XIE Zhibang)
bae91aedbf Update build-android.md
"anbox_desktop_armv7a_arm" is already renamed to "anbox_desktop_armv7a_neon".
2017-05-15 16:57:50 +08:00
Simon Fels
52f4a7e8e1 Merge pull request #257 from morphis/f/improve-adb-stability
Improve stability of the AdbMessageProcessor
2017-05-14 21:07:08 +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
Simon Fels
22fcbabb64 Print warning if user starts container manager manually 2017-05-11 07:45:24 +02:00
Simon Fels
7530bf9246 Use class instead of struct for IpConfigBuilder 2017-05-11 07:44:10 +02:00
Simon Fels
e441f3d42b Extend BinaryWriter test cases to cover all necessary things 2017-05-11 07:42:01 +02:00
Simon Fels
2fb4067da9 Add more constants for various static configuration items 2017-05-11 07:07:47 +02:00
Simon Fels
54499f0135 Simply bridge implementation to provide just a static configuration 2017-05-10 19:06:38 +02:00
Simon Fels
5bc93f76fe Create static IP configuration for Android 2017-05-10 19:06:12 +02:00
Simon Fels
c5f1a2724b Implement BinaryWriter class to allow writing binary data 2017-05-10 19:05:56 +02:00
Simon Fels
385bf94d51 Integrate review feedback 2017-05-09 09:51:38 +02:00
Simon Fels
fdbd63efa3 Merge pull request #245 from morphis/f/print-snap-revision
Print snap revision if running inside a snap
2017-05-09 09:43:51 +02:00
Simon Fels
a8045e0c8c Print snap revision if running inside a snap 2017-05-09 07:27:21 +02:00
Simon Fels
41530325ec Read host os-release file when running inside the snap 2017-05-09 07:20:56 +02:00
Simon Fels
ee38b6a181 Merge pull request #239 from matlink/patch-2
Adding libsdl2-image-dev dependency
2017-05-08 10:26:50 +02:00
Matlink
8d4c9dadc4 Adding libsdl2-image-dev dependency 2017-05-08 10:16:38 +02:00
Simon Fels
da20611a6c Merge pull request #214 from morphis/f/fork-session-mgr
Start session manager when not already running
2017-05-07 12:05:53 +02:00
Simon Fels
dbcc5cfba0 Fix incorrect logical expression for intent check 2017-05-07 11:46:59 +02:00
Simon Fels
459716ca6f Merge pull request #227 from morphis/f/correct-versioning
Set version we're building from snapcraft
2017-05-07 11:46:02 +02:00
Simon Fels
8c1247c0a8 Use boost::filesystem::path correctly 2017-05-05 18:46:07 +02:00
Simon Fels
189003ef95 Correct exception handling 2017-05-05 18:41:52 +02:00