trigger adbd by /mnt/adb file detection
This commit is contained in:
parent
5cdcd6ab80
commit
dbddad6f77
|
@ -13,6 +13,10 @@ GADGET=/sys/kernel/config/usb_gadget/FunKey
|
|||
[ ! -f /mnt/usbnet ]
|
||||
USBNET=${?}
|
||||
|
||||
# Check if Android Debug Bridge is requested
|
||||
[ ! -f /mnt/adb ]
|
||||
ADB=${?}
|
||||
|
||||
# USB VID for Linux Foundation
|
||||
ID_VENDOR="0x1d6b"
|
||||
|
||||
|
@ -37,6 +41,12 @@ init_usb_gadget() {
|
|||
return 0
|
||||
fi
|
||||
|
||||
# ADB has precedence over USB Mass Storage / Ethernet over USB
|
||||
if [ ${ADB} -eq 1 ]; then
|
||||
adb start
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Get the legacy drivers out of the way
|
||||
modprobe -r g_ether
|
||||
modprobe -r g_mass_storage
|
||||
|
|
Loading…
Reference in New Issue