[oe] [meta-oe][PATCH 2/4] android-tools: import 2 changes from meta-webos-ports

Martin Jansa martin.jansa at gmail.com
Tue Oct 2 17:33:57 UTC 2018


* import upstream-able changes from following commits:
  https://github.com/webOS-ports/meta-webos-ports/commit/9d032e47b5a90846485393095a4fd9b923578f22
  https://github.com/webOS-ports/meta-webos-ports/commit/fea52b88281e197482b7412824802c057ec99000
  https://github.com/webOS-ports/meta-webos-ports/commit/d8068a7a4722f6203ef16d85c235f86a5a76fa9c
  https://github.com/webOS-ports/meta-webos-ports/commit/c314b69505343ea959adc9789e0a1fca52a8af67

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 .../0001-Allow-adbd-to-be-ran-as-root.patch   | 24 +++++++++++++++++++
 .../android-tools/android-tools-adbd.service  |  5 ++--
 .../android-tools/android-tools_5.1.1.r37.bb  |  1 +
 3 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/0001-Allow-adbd-to-be-ran-as-root.patch

diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0001-Allow-adbd-to-be-ran-as-root.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0001-Allow-adbd-to-be-ran-as-root.patch
new file mode 100644
index 0000000000..d8f0d48692
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0001-Allow-adbd-to-be-ran-as-root.patch
@@ -0,0 +1,24 @@
+From 3237f335c5b559c68749173f4343e6475f9eb8c7 Mon Sep 17 00:00:00 2001
+From: Florent Revest <revestflo at gmail.com>
+Date: Mon, 30 Oct 2017 21:05:46 +0100
+Subject: [PATCH] Allow adbd to be ran as root
+
+---
+ adb/adb.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/adb/adb.c b/adb/adb.c
+index 10a1e0d..a88641f 100644
+--- a/adb/adb.c
++++ b/adb/adb.c
+@@ -1267,6 +1267,7 @@ static int should_drop_privileges() {
+     int secure = 0;
+     char value[PROPERTY_VALUE_MAX];
+ 
++    return 0;
+    /* run adbd in secure mode if ro.secure is set and
+     ** we are not in the emulator
+     */
+-- 
+2.14.3
+
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service
index 88ed6871d3..ddf8d7f74e 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service
@@ -1,12 +1,13 @@
 [Unit]
 Description=Android Debug Bridge
+ConditionPathExists=/var/usb-debugging-enabled
+Before=android-system.service
 
 [Service]
 Type=simple
 Restart=on-failure
-ExecStartPre=/usr/bin/android-gadget-setup adb
+ExecStartPre=-/usr/bin/android-gadget-setup adb
 ExecStart=/usr/bin/adbd
-StandardOutput=null
 
 [Install]
 WantedBy=basic.target
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
index adf372d8bb..74f2bf221e 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
+++ b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
@@ -49,6 +49,7 @@ SRC_URI = " \
     file://fastboot.mk;subdir=${BPN} \
     file://mkbootimg.mk;subdir=${BPN} \
     file://0001-usb_linux.c-fix-build-with-glibc-2.28.patch;patchdir=system/core \
+    file://0001-Allow-adbd-to-be-ran-as-root.patch;patchdir=system/core \
 "
 
 S = "${WORKDIR}/git"
-- 
2.17.1




More information about the Openembedded-devel mailing list