diff mbox series

[meta-oe,10/10] android-tools-conf: android-gadget-cleanup: don't killall adbd

Message ID 20261110-android-tools-adbd-v1-10-cc2176f381c3@gmail.com
State New
Headers show
Series android-tools: adbd fixes and opt-in access control for Linux systems | expand

Commit Message

Alex Kiernan Nov. 10, 2026, 5:35 p.m. UTC
android-gadget-cleanup runs as the service's ExecStopPost, once adbd has
exited, so there is nothing left for `killall adbd` to stop. Under a
supervisor that respawns adbd it is worse than redundant: the new adbd
starts into a gadget that is being torn down. busybox builds without
killall also fail on it silently. Drop it, and stop quietly if there is
no adb gadget to clean up.

AI-Generated: Claude Opus 5.5 (Claude Code)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
 .../android-tools/android-tools-conf/android-gadget-cleanup           | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-cleanup b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-cleanup
index f27d77df5120..5d32dbd2bcb1 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-cleanup
+++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-cleanup
@@ -4,12 +4,10 @@ 
 
 cd /sys/kernel/config/usb_gadget
 
-cd adb
+cd adb || exit 0
 
 echo -n "" > UDC || true
 
-killall adbd || true
-
 umount /dev/usb-ffs/adb
 
 rm configs/c.1/ffs.usb0