Skip to content

Commit

Permalink
Suppress eol in functionfs setup scripts (openembedded#147)
Browse files Browse the repository at this point in the history
Stray newline character causes errors in functionfs setup scripts
used by android-tools-adbd.service, when using musl libc and/or toybox.

Signed-off-by: Devendra Tewari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
tewarid authored and kraj committed Jul 29, 2021
1 parent 5e042ac commit db5f487
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cd /sys/kernel/config/usb_gadget

cd adb

echo "" > UDC || true
echo -n "" > UDC || true

killall adbd || true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ mkdir configs/c.1
mkdir functions/ffs.usb0
mkdir strings/0x409
mkdir configs/c.1/strings/0x409
echo 0x18d1 > idVendor
echo 0xd002 > idProduct
echo -n 0x18d1 > idVendor
echo -n 0xd002 > idProduct
echo "$serial" > strings/0x409/serialnumber
echo "$manufacturer" > strings/0x409/manufacturer
echo "$model" > strings/0x409/product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e

sleep 3

ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
ls /sys/class/udc/ | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC

0 comments on commit db5f487

Please sign in to comment.