From 49af1e5e2a6fcd6f0d8722c411fe7a1a3847a424 Mon Sep 17 00:00:00 2001 From: Mikko Gronoff Date: Mon, 22 May 2017 12:40:13 +0300 Subject: adbd: remove component QDB replaced ADB in 5.9. Remove obsoleted adbd from image and the recipe from meta layer. Change-Id: I26c6ed7a51886e8e52bc77be6edcbe5933be3068 Reviewed-by: Kari Oikarinen --- recipes/adbd/adbd.bb | 87 ------- recipes/adbd/files/Makefile.adbd | 34 --- recipes/adbd/files/adb-init | 40 ---- recipes/adbd/files/adbd.patch | 265 --------------------- recipes/adbd/files/adbd.service | 12 - recipes/adbd/files/defaults | 4 - recipes/adbd/files/emulator/defaults | 4 - recipes/adbd/files/imx53qsb/defaults | 4 - recipes/adbd/files/intel-corei7-64/defaults | 4 - recipes/adbd/files/nvidia-logan/adb-init | 46 ---- recipes/adbd/files/nvidia-logan/defaults | 4 - recipes/adbd/files/raspberrypi/defaults | 4 - .../packagegroup-b2qt-embedded-tools.bb | 1 - 13 files changed, 509 deletions(-) delete mode 100644 recipes/adbd/adbd.bb delete mode 100644 recipes/adbd/files/Makefile.adbd delete mode 100755 recipes/adbd/files/adb-init delete mode 100644 recipes/adbd/files/adbd.patch delete mode 100644 recipes/adbd/files/adbd.service delete mode 100644 recipes/adbd/files/defaults delete mode 100644 recipes/adbd/files/emulator/defaults delete mode 100644 recipes/adbd/files/imx53qsb/defaults delete mode 100644 recipes/adbd/files/intel-corei7-64/defaults delete mode 100644 recipes/adbd/files/nvidia-logan/adb-init delete mode 100644 recipes/adbd/files/nvidia-logan/defaults delete mode 100644 recipes/adbd/files/raspberrypi/defaults (limited to 'recipes') diff --git a/recipes/adbd/adbd.bb b/recipes/adbd/adbd.bb deleted file mode 100644 index 7bada5d..0000000 --- a/recipes/adbd/adbd.bb +++ /dev/null @@ -1,87 +0,0 @@ -############################################################################ -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the Boot to Qt meta layer. -## -## $QT_BEGIN_LICENSE:GPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 or (at your option) any later version -## approved by the KDE Free Qt Foundation. The licenses are as published by -## the Free Software Foundation and appearing in the file LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################ - -DESCRIPTION = "Android Debug Bridge Daemon" -HOMEPAGE = "http://developer.android.com/tools/help/adb.html" -SECTION = "devel" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://adb/NOTICE;md5=2ddb23e63b1f9c3c46aaa4195f819a6d" - -PV = "android-5.0.1_r1" -PR = "r0" -SRCREV = "${PV}" - -RRECOMMENDS_${PN} += "kernel-module-g-ffs" -DEPENDS = "openssl libcap" - -SRC_URI = "git://android.googlesource.com/platform/system/core;protocol=https;branch=lollipop-release;name=core \ - file://adbd.patch \ - file://Makefile.adbd \ - file://adb-init \ - file://defaults \ - file://adbd.service \ - " - -S = "${WORKDIR}/git" - -FILES_${PN} += "${bindir}/adbd" - -do_configure() { - if [ -n "${ADB_PRODUCTID}" ]; then - sed -i -e 's/PRODUCT=.*/PRODUCT=${ADB_PRODUCTID}/' ${WORKDIR}/defaults - fi -} - -do_compile() { - make -f ${WORKDIR}/Makefile.adbd -C adb -} - -do_install() { - install -m 0755 -d ${D}${bindir}/ - install -m 0755 ${WORKDIR}/git/adb/adbd ${D}${bindir}/ - install -m 0755 ${WORKDIR}/adb-init ${D}${bindir}/ - - install -m 0755 -d ${D}${sysconfdir}/init.d - ln -s ${bindir}/adb-init ${D}${sysconfdir}/init.d/ - - install -m 0755 -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/adbd.service ${D}${systemd_unitdir}/system/ - - install -m 0755 -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/defaults ${D}${sysconfdir}/default/adbd -} - -INITSCRIPT_NAME = "adb-init" -INITSCRIPT_PARAMS = "defaults 96" - -SYSTEMD_SERVICE_${PN} = "adbd.service" -# qdbd is started by default instead of adbd -SYSTEMD_AUTO_ENABLE = "disable" - -inherit update-rc.d systemd diff --git a/recipes/adbd/files/Makefile.adbd b/recipes/adbd/files/Makefile.adbd deleted file mode 100644 index 753d2d7..0000000 --- a/recipes/adbd/files/Makefile.adbd +++ /dev/null @@ -1,34 +0,0 @@ -LOCAL_SRC_FILES := \ - adb.c \ - fdevent.c \ - transport.c \ - transport_local.c \ - transport_usb.c \ - adb_auth_client.c \ - sockets.c \ - services.c \ - file_sync_service.c \ - jdwp_service.c \ - framebuffer_service.c \ - remount_service.c \ - usb_linux_client.c - -LOCAL_OBJ_FILES=$(LOCAL_SRC_FILES:%.c=%.o) - -LIBCUTILS_SRC_FILES := \ - ../libcutils/socket_inaddr_any_server.c \ - ../libcutils/socket_local_client.c \ - ../libcutils/socket_local_server.c \ - ../libcutils/socket_loopback_client.c \ - ../libcutils/socket_loopback_server.c - -LIBCUTILS_OBJ_FILES=$(LIBCUTILS_SRC_FILES:%.c=%.o) - -adbd: $(LOCAL_OBJ_FILES) $(LIBCUTILS_OBJ_FILES) - $(CC) $(LDFLAGS) $^ -o $@ -lcrypto -Wl,--as-needed -ldl -lpthread -lresolv - -../libcutils/%.o: ../libcutils/%.c - $(CC) -O2 -g -DADB_HOST=1 -Wall -Wno-unused-parameter -D_XOPEN_SOURCE -D_GNU_SOURCE -c $^ -o $@ -I../include/ -DHAVE_TERMIO_H -DHAVE_FORKEXEC - -%.o: %.c - $(CC) -O2 -g -DADB_QEMU=0 -DADB_HOST=0 -Wall -Wno-unused-parameter -D_XOPEN_SOURCE -D_GNU_SOURCE -c $^ -o $@ -isystem . -I../include/ -DHAVE_TERMIO_H -DHAVE_FORKEXEC diff --git a/recipes/adbd/files/adb-init b/recipes/adbd/files/adb-init deleted file mode 100755 index 5f47fd0..0000000 --- a/recipes/adbd/files/adb-init +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -DAEMON=/usr/bin/adbd - -. /etc/default/adbd - -if [ -e /var/run/dbus/session_bus_address ]; then - . /var/run/dbus/session_bus_address -fi - -case "$1" in -start) - if [ "$USE_ETHERNET" = "no" ]; then - modprobe g_ffs idVendor=${VENDOR} idProduct=${PRODUCT} iSerialNumber=${SERIAL:0:32} - mkdir -p /dev/usb-ffs - chmod 770 /dev/usb-ffs - mkdir -p /dev/usb-ffs/adb - chmod 770 /dev/usb-ffs/adb - mount -t functionfs adb /dev/usb-ffs/adb -o uid=0,gid=0 - fi - start-stop-daemon --start --quiet --exec $DAEMON & - ;; -stop) - start-stop-daemon --stop --quiet --exec $DAEMON - if [ "$USE_ETHERNET" = "no" ]; then - sleep 1 - umount /dev/usb-ffs/adb - rmmod g_ffs - fi - ;; -restart) - start-stop-daemon --stop --quiet --exec $DAEMON - sleep 1 - start-stop-daemon --start --quiet --exec $DAEMON & - ;; -*) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac -exit 0 diff --git a/recipes/adbd/files/adbd.patch b/recipes/adbd/files/adbd.patch deleted file mode 100644 index 479a049..0000000 --- a/recipes/adbd/files/adbd.patch +++ /dev/null @@ -1,265 +0,0 @@ -diff --git a/adb/adb.c b/adb/adb.c -index 10a1e0d..99fca49 100644 ---- a/adb/adb.c -+++ b/adb/adb.c -@@ -35,12 +35,10 @@ - - #if !ADB_HOST - #include --#include - #include - #include - #include - #include --#include - #else - #include "usb_vendors.h" - #endif -@@ -147,7 +145,7 @@ void adb_trace_init(void) - } - } - --#if !ADB_HOST -+#if !ADB_HOST && ADB_QEMU - /* - * Implements ADB tracing inside the emulator. - */ -@@ -288,6 +286,22 @@ static void send_close(unsigned local, unsigned remote, atransport *t) - send_packet(p, t); - } - -+int property_set(const char *key, const char *value) -+{ -+ return 0; -+} -+ -+int property_get(const char *key, char *value, const char *fallback) -+{ -+ if (fallback) { -+ strncpy(value, fallback, PROPERTY_VALUE_MAX-1); -+ return strlen(fallback); -+ } else { -+ value[0] = 0; -+ return 0; -+ } -+} -+ - static size_t fill_connect_data(char *buf, size_t bufsize) - { - #if ADB_HOST -@@ -1344,50 +1358,11 @@ int adb_main(int is_daemon, int server_port) - " unchanged.\n"); - } - -- /* add extra groups: -- ** AID_ADB to access the USB driver -- ** AID_LOG to read system logs (adb logcat) -- ** AID_INPUT to diagnose input issues (getevent) -- ** AID_INET to diagnose network issues (netcfg, ping) -- ** AID_GRAPHICS to access the frame buffer -- ** AID_NET_BT and AID_NET_BT_ADMIN to diagnose bluetooth (hcidump) -- ** AID_SDCARD_R to allow reading from the SD card -- ** AID_SDCARD_RW to allow writing to the SD card -- ** AID_NET_BW_STATS to read out qtaguid statistics -- */ -- gid_t groups[] = { AID_ADB, AID_LOG, AID_INPUT, AID_INET, AID_GRAPHICS, -- AID_NET_BT, AID_NET_BT_ADMIN, AID_SDCARD_R, AID_SDCARD_RW, -- AID_NET_BW_STATS }; -- if (setgroups(sizeof(groups)/sizeof(groups[0]), groups) != 0) { -- exit(1); -- } -- -- /* don't listen on a port (default 5037) if running in secure mode */ -- /* don't run as root if we are running in secure mode */ -- if (should_drop_privileges()) { -- drop_capabilities_bounding_set_if_needed(); - -- /* then switch user and group to "shell" */ -- if (setgid(AID_SHELL) != 0) { -- exit(1); -- } -- if (setuid(AID_SHELL) != 0) { -- exit(1); -- } -- -- D("Local port disabled\n"); -- } else { -- char local_name[30]; -- if ((root_seclabel != NULL) && (is_selinux_enabled() > 0)) { -- // b/12587913: fix setcon to allow const pointers -- if (setcon((char *)root_seclabel) < 0) { -- exit(1); -- } -- } -- build_local_name(local_name, sizeof(local_name), server_port); -- if(install_listener(local_name, "*smartsocket*", NULL, 0)) { -- exit(1); -- } -+ char local_name[30]; -+ build_local_name(local_name, sizeof(local_name), server_port); -+ if(install_listener(local_name, "*smartsocket*", NULL, 0)) { -+ exit(1); - } - - int usb = 0; -@@ -1408,10 +1383,9 @@ int adb_main(int is_daemon, int server_port) - printf("using port=%d\n", port); - // listen on TCP port specified by service.adb.tcp.port property - local_init(port); -- } else if (!usb) { -- // listen on default port -- local_init(DEFAULT_ADB_LOCAL_TRANSPORT_PORT); - } -+ // listen on default port -+ local_init(DEFAULT_ADB_LOCAL_TRANSPORT_PORT); - - D("adb_main(): pre init_jdwp()\n"); - init_jdwp(); -@@ -1695,7 +1669,6 @@ int main(int argc, char **argv) - #else - /* If adbd runs inside the emulator this will enable adb tracing via - * adb-debug qemud service in the emulator. */ -- adb_qemu_trace_init(); - while(1) { - int c; - int option_index = 0; -diff --git a/adb/adb_trace.h b/adb/adb_trace.h -index 8a5d9f8..01c4c06 100644 ---- a/adb/adb_trace.h -+++ b/adb/adb_trace.h -@@ -22,7 +22,7 @@ - #endif - - /* define ADB_TRACE to 1 to enable tracing support, or 0 to disable it */ --#define ADB_TRACE 1 -+#define ADB_TRACE 0 - - /* IMPORTANT: if you change the following list, don't - * forget to update the corresponding 'tags' table in -diff --git a/adb/file_sync_service.c b/adb/file_sync_service.c -index 7933858..3cbd0cd 100644 ---- a/adb/file_sync_service.c -+++ b/adb/file_sync_service.c -@@ -26,7 +26,6 @@ - - #include - #include --#include - #include "sysdeps.h" - - #define TRACE_TAG TRACE_SYNC -@@ -73,7 +72,6 @@ static int mkdirs(char *name) - *x = '/'; - return ret; - } -- selinux_android_restorecon(name, 0); - } - *x++ = '/'; - } -@@ -251,7 +249,6 @@ static int handle_send_file(int s, char *path, uid_t uid, - if(fd >= 0) { - struct utimbuf u; - adb_close(fd); -- selinux_android_restorecon(path, 0); - u.actime = timestamp; - u.modtime = timestamp; - utime(path, &u); -diff --git a/adb/remount_service.c b/adb/remount_service.c -index 72d15a1..df64799 100644 ---- a/adb/remount_service.c -+++ b/adb/remount_service.c -@@ -28,7 +28,7 @@ - #include "adb.h" - - --static int system_ro = 1; -+static int system_ro = 0; - static int vendor_ro = 1; - - /* Returns the device used to mount a directory in /proc/mounts */ -@@ -84,7 +84,7 @@ static int remount(const char* dir, int* dir_ro) - int fd; - int OFF = 0; - -- if (dir_ro == 0) { -+ if (*dir_ro == 0) { - return 0; - } - -@@ -132,7 +132,6 @@ void remount_service(int fd, void *cookie) - else { - write_string(fd, "remount failed\n"); - } -- - adb_close(fd); - } - -diff --git a/adb/services.c b/adb/services.c -index e61371a..8d4e2b5 100644 ---- a/adb/services.c -+++ b/adb/services.c -@@ -34,7 +34,7 @@ - # include - # endif - #else --# include -+# include - # include - #endif - -@@ -127,7 +127,7 @@ void reboot_service(int fd, void *arg) - goto cleanup; - } - -- ret = property_set(ANDROID_RB_PROPERTY, property_val); -+ ret = reboot(RB_AUTOBOOT); - if (ret < 0) { - snprintf(buf, sizeof(buf), "reboot failed: %d\n", ret); - writex(fd, buf, strlen(buf)); -@@ -302,7 +302,7 @@ static int create_subproc_raw(const char *cmd, const char *arg0, const char *arg - #if ADB_HOST - #define SHELL_COMMAND "/bin/sh" - #else --#define SHELL_COMMAND "/system/bin/sh" -+#define SHELL_COMMAND "/bin/sh" - #endif - - #if !ADB_HOST -diff --git a/adb/transport_local.c b/adb/transport_local.c -index 948cc15..d6d0a3a 100644 ---- a/adb/transport_local.c -+++ b/adb/transport_local.c -@@ -189,7 +189,7 @@ static void *server_socket_thread(void * arg) - } - - /* This is relevant only for ADB daemon running inside the emulator. */ --#if !ADB_HOST -+#if !ADB_HOST && ADB_QEMU - /* - * Redefine open and write for qemu_pipe.h that contains inlined references - * to those routines. We will redifine them back after qemu_pipe.h inclusion. -@@ -307,7 +307,7 @@ void local_init(int port) - if(HOST) { - func = client_socket_thread; - } else { --#if ADB_HOST -+#if ADB_HOST || !ADB_QEMU - func = server_socket_thread; - #else - /* For the adbd daemon in the system image we need to distinguish -diff --git a/include/cutils/properties.h b/include/cutils/properties.h -index 798db8b..c86f312 100644 ---- a/include/cutils/properties.h -+++ b/include/cutils/properties.h -@@ -19,8 +19,9 @@ - - #include - #include --#include --#include -+ -+#define PROP_NAME_MAX 32 -+#define PROP_VALUE_MAX 92 - - #ifdef __cplusplus - extern "C" { diff --git a/recipes/adbd/files/adbd.service b/recipes/adbd/files/adbd.service deleted file mode 100644 index d5005cf..0000000 --- a/recipes/adbd/files/adbd.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=ADB Server Daemon -After=network.target - -[Service] -Type=forking -ExecStart=/usr/bin/adb-init start -ExecStop=/usr/bin/adb-init stop -Environment=HOME=/home/root - -[Install] -WantedBy=multi-user.target diff --git a/recipes/adbd/files/defaults b/recipes/adbd/files/defaults deleted file mode 100644 index d2a3cc0..0000000 --- a/recipes/adbd/files/defaults +++ /dev/null @@ -1,4 +0,0 @@ -VENDOR=0x18d1 -PRODUCT=0x0000 -SERIAL=$(hostname)-$(sed -e 's/://g' /sys/class/net/eth0/address) -USE_ETHERNET=no diff --git a/recipes/adbd/files/emulator/defaults b/recipes/adbd/files/emulator/defaults deleted file mode 100644 index 0fbba4c..0000000 --- a/recipes/adbd/files/emulator/defaults +++ /dev/null @@ -1,4 +0,0 @@ -VENDOR=0x18d1 -PRODUCT=0x0000 -SERIAL=$(hostname)-$(sed -e 's/://g' /sys/class/net/eth0/address) -USE_ETHERNET=yes diff --git a/recipes/adbd/files/imx53qsb/defaults b/recipes/adbd/files/imx53qsb/defaults deleted file mode 100644 index 0fbba4c..0000000 --- a/recipes/adbd/files/imx53qsb/defaults +++ /dev/null @@ -1,4 +0,0 @@ -VENDOR=0x18d1 -PRODUCT=0x0000 -SERIAL=$(hostname)-$(sed -e 's/://g' /sys/class/net/eth0/address) -USE_ETHERNET=yes diff --git a/recipes/adbd/files/intel-corei7-64/defaults b/recipes/adbd/files/intel-corei7-64/defaults deleted file mode 100644 index 0fbba4c..0000000 --- a/recipes/adbd/files/intel-corei7-64/defaults +++ /dev/null @@ -1,4 +0,0 @@ -VENDOR=0x18d1 -PRODUCT=0x0000 -SERIAL=$(hostname)-$(sed -e 's/://g' /sys/class/net/eth0/address) -USE_ETHERNET=yes diff --git a/recipes/adbd/files/nvidia-logan/adb-init b/recipes/adbd/files/nvidia-logan/adb-init deleted file mode 100644 index 1be08c8..0000000 --- a/recipes/adbd/files/nvidia-logan/adb-init +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -DAEMON=/usr/bin/adbd - -. /etc/default/adbd - -case "$1" in -start) - if [ "$USE_ETHERNET" = "no" ]; then - echo 0 > /sys/class/android_usb/android0/enable - sleep 1 - echo ${SERIAL} > /sys/class/android_usb/android0/iSerial - echo ${VENDOR} > /sys/class/android_usb/android0/idVendor - echo ${PRODUCT} > /sys/class/android_usb/android0/idProduct - echo ffs > /sys/class/android_usb/android0/functions - echo adb >/sys/class/android_usb/android0/f_ffs/aliases - echo 1 > /sys/class/android_usb/android0/enable - - if [ ! -d "/dev/usb-ffs" ]; then - mkdir /dev/usb-ffs - mkdir /dev/usb-ffs/adb - fi - mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000 - fi - start-stop-daemon --start --quiet --exec $DAEMON & - ;; -stop) - start-stop-daemon --stop --quiet --exec $DAEMON - if [ "$USE_ETHERNET" = "no" ]; then - sleep 1 - if mount | grep /dev/usb-ffs/adb > /dev/null; then - umount /dev/usb-ffs/adb - fi - fi - ;; -restart) - start-stop-daemon --stop --quiet --exec $DAEMON - sleep 1 - start-stop-daemon --start --quiet --exec $DAEMON & - ;; -*) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac -exit 0 - diff --git a/recipes/adbd/files/nvidia-logan/defaults b/recipes/adbd/files/nvidia-logan/defaults deleted file mode 100644 index 93bba63..0000000 --- a/recipes/adbd/files/nvidia-logan/defaults +++ /dev/null @@ -1,4 +0,0 @@ -VENDOR=0955 -PRODUCT=7940 -SERIAL=$(hostname)-$(sed -e 's/://g' /sys/class/net/eth1/address) -USE_ETHERNET=no diff --git a/recipes/adbd/files/raspberrypi/defaults b/recipes/adbd/files/raspberrypi/defaults deleted file mode 100644 index 0fbba4c..0000000 --- a/recipes/adbd/files/raspberrypi/defaults +++ /dev/null @@ -1,4 +0,0 @@ -VENDOR=0x18d1 -PRODUCT=0x0000 -SERIAL=$(hostname)-$(sed -e 's/://g' /sys/class/net/eth0/address) -USE_ETHERNET=yes diff --git a/recipes/packagegroup/packagegroup-b2qt-embedded-tools.bb b/recipes/packagegroup/packagegroup-b2qt-embedded-tools.bb index c6361c7..e8936e4 100644 --- a/recipes/packagegroup/packagegroup-b2qt-embedded-tools.bb +++ b/recipes/packagegroup/packagegroup-b2qt-embedded-tools.bb @@ -34,7 +34,6 @@ PR = "r0" inherit packagegroup RDEPENDS_${PN} = "\ - adbd \ alsa-utils-amixer \ binutils \ binutils-symlinks \ -- cgit v1.2.3-54-g00ecf