Skip to contentSkip to conversation

android-tools-conf-configfs: handle multiple UDC controllers

PATCH In review Shoudi Li 2 participants 4 messages Jan 23

lore
Share & tools
lore

Shoudi Li

author
#0 lore raw

PATCH 1/1 android-tools-conf-configfs: handle multiple UDC controllers

For the boards with multiple UDC ports, adb funtion will be impacted due to below error.

ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busy

---
 .../android-tools-conf-configfs/android-gadget-start        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start +4 -2
index ca6c3df275..76b5e29624 100644
@@ -2,6 +2,8 @@
 
 set -e
 
-sleep 3
+sleep 10
 
-ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
+ls /sys/class/udc/ | head -n 1 | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC
+
+echo "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadget usage"
Signature · 1 line
2.52.0
#1 lore raw
Quoted 10 lines · Shoudi Li

For the boards with multiple UDC ports, adb funtion will be impacted due to below error.

ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busy

---
 .../android-tools-conf-configfs/android-gadget-start        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Same issues, forged From and missing SoB.

Signature · 2 lines
With best wishes
Dmitry
#2 lore raw

Dmitry Baryshkov <[email protected]> escreveu (sexta, 23/01/2026 à(s) 17:34):

Quoted 7 lines · Shoudi Li
Quoted 6 lines

For the boards with multiple UDC ports, adb funtion will be impacted due to below error.

ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busy

Quoted 7 lines
Quoted 4 lines
---
 .../android-tools-conf-configfs/android-gadget-start        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Same issues, forged From and missing SoB.

Yep in this one I forgot the --from on git send-email but I didn't notice that the author was also wrong.

Quoted 6 lines

--
With best wishes
Dmitry

Signature · 3 lines
Best regards,

José Quaresma
#3 lore raw
Quoted 15 lines · Jose Quaresma

Dmitry Baryshkov <[email protected]> escreveu (sexta, 23/01/2026 à(s) 17:34):

Quoted 12 lines · Shoudi Li
Quoted 10 lines

For the boards with multiple UDC ports, adb funtion will be impacted due to below error.

ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busy

---
 .../android-tools-conf-configfs/android-gadget-start        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Quoted 5 lines
Quoted 2 lines

Same issues, forged From and missing SoB.

Yep in this one I forgot the --from on git send-email but I didn't notice that the author was also wrong.

Hmm, isn't it written in your ~/.gitconfig? Also please use Qualcomm emails when sending pathches.

And, of course, please don't send HTML emails, they might be filtered out.

Signature · 2 lines
With best wishes
Dmitry