[PATCH] Fix adbd for non-Ubuntu systems
Remove glib/dbus dependencies and partially restore services.c to be
closer to the original source code in order to run on systems without
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
core/adbd/services.c | 160 ++++-------------------------------------------
debian/makefiles/adbd.mk | 4 +-
3 files changed, 14 insertions(+), 151 deletions(-)
diff --git a/core/adbd/adb.c b/core/adbd/adb.c
index d90e6b8..7fe6445 100644
@@ -1165,7 +1165,6 @@ void build_local_name(char* target_str, size_t target_size, int server_port)
static int should_drop_privileges() {
#else /* ALLOW_ADBD_ROOT */
diff --git a/core/adbd/services.c b/core/adbd/services.c
index 05bd0d0..5adcefe 100644
--- a/core/adbd/services.c
+++ b/core/adbd/services.c
-#define UNITY_SERVICE "com.canonical.UnityGreeter"
-#define GREETER_INTERFACE "com.canonical.UnityGreeter"
-#define PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
-#define ACTIVE_PROPERTY "IsActive"
-#define UNLOCK_PATH "/userdata/.adb_onlock"
@@ -268,11 +259,11 @@ static int create_service_thread(void (*func)(int, void *), void *cookie)
-static int create_subprocess(const char *cmd, const char *arg0, const char *arg1, const char *arg2, const char *arg3, const char *arg4, pid_t *pid)
+static int create_subprocess(const char *cmd, const char *arg0, const char *arg1, pid_t *pid)
- D("create_subprocess(cmd=%s, arg0=%s, arg1=%s, arg2=%s, arg3=%, arg4=%ss)\n", cmd, arg0, arg1, arg2, arg3, arg4);
- fprintf(stderr, "error: create_subprocess not implemented on Win32 (%s %s %s %s %s %s)\n", cmd, arg0, arg1, arg2, arg3, arg4);
+ D("create_subprocess(cmd=%s, arg0=%s, arg1=%s)\n", cmd, arg0, arg1);
+ fprintf(stderr, "error: create_subprocess not implemented on Win32 (%s %s %s)\n", cmd, arg0, arg1);
#else /* !HAVE_WIN32_PROC */
@@ -327,7 +318,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1
D("adb: unable to open %s\n", text);