• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/android-tools/0002-Fix-adbd-for-non-Ubuntu-systems.patch
Thomas PetazzoniThomas Petazzoni committed 88cbfd1007f23 Nov 2015
Raw file
Source viewDiff to previous
-                                                         G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION,
 
1
[PATCH] Fix adbd for non-Ubuntu systems
2
​
3
Remove glib/dbus dependencies and partially restore services.c to be
4
closer to the original source code in order to run on systems without
5
sudo.
6
​
7
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
8
---
9
 core/adbd/adb.c          |   1 -
10
 core/adbd/services.c     | 160 ++++-------------------------------------------
11
 debian/makefiles/adbd.mk |   4 +-
12
 3 files changed, 14 insertions(+), 151 deletions(-)
13
​
14
diff --git a/core/adbd/adb.c b/core/adbd/adb.c
15
index d90e6b8..7fe6445 100644
16
--- a/core/adbd/adb.c
17
+++ b/core/adbd/adb.c
18
@@ -1165,7 +1165,6 @@ void build_local_name(char* target_str, size_t target_size, int server_port)
19
 
20
 #if !ADB_HOST
21
 static int should_drop_privileges() {
22
-    return 1;
23
 #ifndef ALLOW_ADBD_ROOT
24
     return 1;
25
 #else /* ALLOW_ADBD_ROOT */
26
diff --git a/core/adbd/services.c b/core/adbd/services.c
27
index 05bd0d0..5adcefe 100644
28
--- a/core/adbd/services.c
29
+++ b/core/adbd/services.c
30
@@ -20,15 +20,6 @@
31
 #include <string.h>
32
 #include <errno.h>
33
 #include <pwd.h>
34
-#include <glib.h>
35
-#include <gio/gio.h>
36
-
37
-#define UNITY_SERVICE "com.canonical.UnityGreeter"
38
-#define GREETER_OBJ "/"
39
-#define GREETER_INTERFACE "com.canonical.UnityGreeter"
40
-#define PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
41
-#define ACTIVE_PROPERTY "IsActive"
42
-#define UNLOCK_PATH "/userdata/.adb_onlock"
43
 
44
 #include "sysdeps.h"
45
 
46
@@ -268,11 +259,11 @@ static int create_service_thread(void (*func)(int, void *), void *cookie)
47
 }
48
 
49
 #if !ADB_HOST
50
-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)
51
+static int create_subprocess(const char *cmd, const char *arg0, const char *arg1, pid_t *pid)
52
 {
53
 #ifdef HAVE_WIN32_PROC
54
-    D("create_subprocess(cmd=%s, arg0=%s, arg1=%s, arg2=%s, arg3=%, arg4=%ss)\n", cmd, arg0, arg1, arg2, arg3, arg4);
55
-    fprintf(stderr, "error: create_subprocess not implemented on Win32 (%s %s %s %s %s %s)\n", cmd, arg0, arg1, arg2, arg3, arg4);
56
+    D("create_subprocess(cmd=%s, arg0=%s, arg1=%s)\n", cmd, arg0, arg1);
57
+    fprintf(stderr, "error: create_subprocess not implemented on Win32 (%s %s %s)\n", cmd, arg0, arg1);
58
     return -1;
59
 #else /* !HAVE_WIN32_PROC */
60
     char *devname;
61
@@ -327,7 +318,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1
62
         } else {
63
            D("adb: unable to open %s\n", text);
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.