Hello,
I would like to ask how to properly disable ADB on TinkerOS.
I am using a Tinker Board 3S with TinkerOS (Debian 11 V1.0.7).
For security reasons, I want to prevent ADB from automatically starting when a USB device is connected, since this device will be used to run a custom application in a production environment.
At the moment, I am disabling ADB by manually removing the ADB function from the USB gadget configuration:
sudo rm /sys/kernel/config/usb_gadget/asus/configs/b.1/f-ffs.adb
sudo rmdir /sys/kernel/config/usb_gadget/asus/functions/ffs.adb
I also commented out the ADB-related sections inside /usr/bin/usbdevice (lines 260–272):
# /usr/bin/usbdevice
adb_prepare()
{
# usb_mount adb /dev/usb-ffs/adb -o uid=2000,gid=2000 -t functionfs
# usb_start_daemon /usr/bin/adbd
# usb_wait_files -m /dev/usb-ffs/adb
}
adb_stop()
{
# usb_stop_daemon /usr/bin/adbd
}
Are there any concerns or drawbacks with disabling ADB in this way?
Is there an official or recommended method to disable ADB in TinkerOS?
Any advice would be greatly appreciated.