Connect to rpi 4 with adb over usb
I have a Raspberry pi 4 B
with the Emteria 11.11.0
OS. I would like to connect it to my laptop via adb using usb, but it doesn't work. I enabled the usb debugging option in developer options, but the device is not visible after running the adb devices
command. For comparison, I do the same on the LineageOS 18.1 - KonstaKANG (Android 11)
on my RPI 4 B and it works there without a problem.
I also tried using adb via wifi and it worked, but I couldn't get the image via the scrcpy
program (again - it works without a problem on lineageos).
Reading the internet, I came across guides that it is necessary to enable OTG. So I modified the config.txt
file by adding the lines:dtoverlay=dwc2
and in the cmdline.txt
file after the fragment: roowait
I added:modules-load=dwc2,g_ether
but that didn't help. I connected with adb over wifi with the RPI, and executed with shell: dmesg | grep dwc
. This is response:
grep: (standard input): Invalid argument grep: (standard input): Invalid argument [ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=2C:CF:67:4D:75:54 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 cgroup_enable=memory console=tty0 console=serial2,115200 consoleblank=0 no_console_suspend earlyprintk root=/dev/ram0 rootwait modules-load=dwc2 elevator=deadline fsck.repair=yes androidboot.hardware=rpi4 androidboot.board.platform=bcm2711 androidboot.selinux=permissive sdhci.debug_quirks2=4 androidboot.serialno=10000000ed35c1ee [ 0.000000] Unknown kernel command line parameters "earlyprintk modules-load=dwc2", will be passed to user space. [ 0.864923] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 0.865385] dwc_otg: FIQ enabled [ 0.865398] dwc_otg: NAK holdoff enabled [ 0.865409] dwc_otg: FIQ split-transaction FSM enabled [ 0.865423] Module dwc_common_port init [ 0.866369] dwc2 fe980000.usb: supply vusb_d not found, using dummy regulator [ 0.866646] dwc2 fe980000.usb: supply vusb_a not found, using dummy regulator [ 1.074873] dwc2 fe980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM [ 1.075188] dwc2 fe980000.usb: DWC OTG Controller [ 1.075231] dwc2 fe980000.usb: new USB bus registered, assigned bus number 3 [ 1.075298] dwc2 fe980000.usb: irq 27, io mem 0xfe980000 [ 1.075837] usb usb3: Manufacturer: Linux 5.15.32+ dwc2_hsotg [ 1.392029] modules-load=dwc2 grep: (standard input): Invalid argument
Any ideas what could be wrong?