From b85ae59968f4e7f4872e4766e49b62f191384242 Mon Sep 17 00:00:00 2001 From: Etienne Cordonnier Date: Fri, 10 Mar 2023 16:35:45 +0100 Subject: [PATCH] android-tools 10: Add flag to enable adbd service android-tools-adbd service can be enabled in the image using USB_DEBUGGING_ENABLED = "1" in local.conf. See commit 4271cc28279b791 of meta-openembedded. The existing ConditionPathExists line in the service file checks for the existence of this file. Signed-off-by: Etienne Cordonnier Signed-off-by: Khem Raj --- .../android-tools/android-tools_10.0.0.r36.bb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_10.0.0.r36.bb b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_10.0.0.r36.bb index 77cbbedbcb..cf81afe14f 100644 --- a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_10.0.0.r36.bb +++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools_10.0.0.r36.bb @@ -228,3 +228,9 @@ FILES:${PN}-fstools = "\ FILES:${PN} += "${libdir}/android ${libdir}/android/*" BBCLASSEXTEND = "native" + +android_tools_enable_devmode() { + touch ${IMAGE_ROOTFS}/var/usb-debugging-enabled +} + +ROOTFS_POSTPROCESS_COMMAND_${PN}-adbd += "${@bb.utils.contains("USB_DEBUGGING_ENABLED", "1", "android_tools_enable_devmode;", "", d)}"