adbd test on Yocto

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

adbd test on Yocto

No ratings

adbd test on Yocto

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.

 

Yocto local.conf

IMAGE_INSTALL:append = "android-tools android-tools-adbd"
PREFERRED_PROVIDER_android-tools-conf = "android-tools-conf-configfs"

 

Test script for launching adbd

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 &

 

Test on Windows:

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#
Version history
Last update:
‎11-24-2023 05:42 AM
Updated by: