BSP: L6.1.36
Some customer need use adb under usb ffs. The adb in Yocto can greatly improves development efficiency.
This is a demo for enabling adb on Yocto.
IMAGE_INSTALL:append = "android-tools android-tools-adbd"
PREFERRED_PROVIDER_android-tools-conf = "android-tools-conf-configfs"
modprobe g_ffs idVendor=0x1fc9 idProduct=0x0146 iSerialNumber="ZhimingLiu"
mkdir -p /dev/usb-ffs/adb
mount -t functionfs adb /dev/usb-ffs/adb -o uid=2000,gid=2000
adbd &
PS C:\Users\Administrator\Desktop\platform-tools> .\adb.exe devices
List of devices attached
ZhimingLiu device
PS C:\Users\Administrator\Desktop\platform-tools> .\adb.exe shell
sh-5.2# uname -a
Linux imx8mp-lpddr4-evk 6.1.36+g04b05c5527e9 #1 SMP PREEMPT Fri Nov 24 04:46:22 UTC 2023 aarch64 GNU/Linux
sh-5.2# ls
config ffs t.sh test2.sh
sh-5.2# cd /
sh-5.2# ls
bin dev home lost+found mnt proc run srv tmp usr
boot etc lib media opt root sbin sys unit_tests var
sh-5.2#