aboutsummaryrefslogtreecommitdiffstats
path: root/testing/anbox/input-chmod.patch
diff options
context:
space:
mode:
authorAntoine Fontaine <antoine.fontaine@epfl.ch>2020-03-11 01:17:11 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-03-10 22:05:29 -0300
commitdb71e0d805feea2bfc6082ecf0155ec3b5b4a80c (patch)
tree1309ceff8fcf86e502f5b1c76f9fa879d0ceb423 /testing/anbox/input-chmod.patch
parent161ec9fdf23c35dbcc8a05b78f98788e1d7684d5 (diff)
downloadaports-db71e0d805feea2bfc6082ecf0155ec3b5b4a80c.tar.bz2
aports-db71e0d805feea2bfc6082ecf0155ec3b5b4a80c.tar.xz
testing/anbox: fix issues
* give even more time to start, because Android is visibly quite long to start on a phone * backport the input chmod patch, it unbreaks touch input on some devices * ignore wayland env vars, as they aren't actually working
Diffstat (limited to 'testing/anbox/input-chmod.patch')
-rw-r--r--testing/anbox/input-chmod.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/anbox/input-chmod.patch b/testing/anbox/input-chmod.patch
new file mode 100644
index 0000000000..7d540a65e5
--- /dev/null
+++ b/testing/anbox/input-chmod.patch
@@ -0,0 +1,32 @@
+being upstreamed here: https://github.com/anbox/anbox/pull/1381
+
+diff --git a/src/anbox/input/device.cpp b/src/anbox/input/device.cpp
+index 130ae1d..eb63ecc 100644
+--- a/src/anbox/input/device.cpp
++++ b/src/anbox/input/device.cpp
+@@ -38,6 +38,10 @@ std::shared_ptr<Device> Device::create(
+ sp->connector_ = std::make_shared<network::PublishedSocketConnector>(
+ path, runtime, delegate_connector);
+
++ // FIXME: currently creating the socket creates it with the rights of
++ // the user we're running as. As this one is mapped into the container
++ ::chmod(path.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
++
+ return sp;
+ }
+
+diff --git a/src/anbox/input/manager.cpp b/src/anbox/input/manager.cpp
+index eacdd8b..f5d44ea 100644
+--- a/src/anbox/input/manager.cpp
++++ b/src/anbox/input/manager.cpp
+@@ -26,7 +26,9 @@
+ namespace anbox {
+ namespace input {
+ Manager::Manager(const std::shared_ptr<Runtime> &runtime) : runtime_(runtime) {
+- utils::ensure_paths({SystemConfiguration::instance().input_device_dir()});
++ const auto dir = SystemConfiguration::instance().input_device_dir();
++ utils::ensure_paths({dir});
++ ::chmod(dir.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+ }
+
+ Manager::~Manager() {}