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 4271cc2827 of meta-openembedded.

The existing ConditionPathExists line in the service file checks for the
existence of this file.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Etienne Cordonnier 2023-03-10 16:35:45 +01:00 committed by Khem Raj
parent 28636f3d3f
commit b85ae59968

View File

@ -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)}"