From c3b2e88960cdffd19f0079ea4b78171deda6aadb Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Tue, 7 Feb 2017 08:14:34 +0100 Subject: [PATCH] Print error on startup when binder/ashmem are missing and fail --- src/anbox/cmds/run.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/anbox/cmds/run.cpp b/src/anbox/cmds/run.cpp index 64cd13e..e3bea66 100644 --- a/src/anbox/cmds/run.cpp +++ b/src/anbox/cmds/run.cpp @@ -104,6 +104,11 @@ anbox::cmds::Run::Run(const BusFactory &bus_factory) trap->stop(); }); + if (!fs::exists("/dev/binder") || !fs::exists("/dev/ashmem")) { + ERROR("Failed to start as either binder or ashmem kernel drivers are not loaded"); + return EXIT_FAILURE; + } + utils::ensure_paths({ SystemConfiguration::instance().socket_dir(), SystemConfiguration::instance().input_device_dir(),