Cannot Use ADB to debug | usbA line cannot find devices

Hi,

I flashed the system image onto my ROCK 4D last night and started testing it, but I’ve run into an issue with USB ADB debugging.

I’d like to ask whether there are any specific requirements for the USB-A to USB-A cable.

I’m using a MacBook Pro connected through a USB-C hub. Previously, I used a USB-A to USB-C cable to connect my Luckfox board to the hub, and ADB worked without any issues.

However, with my new ROCK 4D, I’m using a USB 3.0 Type-A to Type-A cable connected to the board’s USB 3.0 OTG port. Unfortunately, ADB cannot detect the device at all.

Wireless ADB debugging works, but it’s quite inconvenient for regular development.

Could you please confirm whether the ROCK 4D requires a specific type of USB-A to USB-A cable for wired ADB debugging? Or are there any additional settings needed to enable ADB over the USB 3.0 OTG port?

Thanks for your help!

Best regards,
Ruix

There shouldn’t be any specific requirements for the cable; however, if you wish to use wired ADB, you must first switch the USB port to “device” mode. You can use the commands below to make this change (note that the setting will revert after a reboot):
#1. Force host mode
echo host > /sys/kernel/debug/usb/23000000.usb/mode
#2. Force peripheral mode
echo device > /sys/kernel/debug/usb/23000000.usb/mode

Hi @wei_yan,

Thank you for your previous response.

I would like to provide an update and express my serious frustration with the ROCK 4D’s development experience under Debian.

I purchased this board for embedded AI and real-time audio development. With my previous Luckfox board, I could simply connect a USB cable and start using ADB. On the ROCK 4D, however, I have spent almost my entire weekend (two days) trying to get basic wired ADB debugging working.

This has consumed 40 dollar of my paid AI coding token quota and significantly delayed my actual development work.

What I have confirmed

I am running Debian on the ROCK 4D, with kernel 6.1.84-13-rk2410-nocsf.

  1. Switching the USB controller to device mode alone did not make wired ADB work.

  2. The USB Gadget, FunctionFS, and ADB service configuration required additional debugging.

  3. We encountered USB reconnection and daemon lifecycle issues involving worker shutdown and FunctionFS endpoint handling.

  4. After implementing local software fixes, wired ADB successfully completed shell access, file transfers, and three consecutive physical unplug/replug tests.

  5. However, this working configuration is only valid for the current boot. Automatic recovery after reboot has NOT been implemented or verified.

The same USB-A cable and USB-C hub worked throughout the successful tests, so the hardware connection itself is functional.

Another major concern: ADB permissions

When I initially accessed the board through the original ADB service, the shell ran under a numeric UID (2000) without a corresponding username in the system’s account database, and I could not use sudo.

We later introduced a separate restricted UID (2001) for our own authenticated ADB implementation. That is our custom security configuration, not a claim about Radxa’s default UID.

However, I still do not understand the intended administrative workflow for developers using the official Debian image.

If ADB cannot perform necessary system administration tasks, developers are forced to return to an HDMI monitor and keyboard repeatedly, which defeats much of the convenience of wired debugging.

My questions to Radxa

  1. Is there an officially supported, reboot-persistent USB ADB configuration for the ROCK 4D Debian image? I want to power on the board, connect USB, and run adb shell without manually configuring USB every time.

  2. Does the official Debian image support reliable USB ADB reconnection after unplugging and reconnecting the cable?

  3. What is the officially recommended way to perform authenticated administrative operations through ADB? Why does the original ADB shell use a numeric UID without a normal user account or an obvious privilege-escalation workflow?

  4. Could Radxa provide a complete, tested Debian-specific USB ADB setup guide, including OTG configuration, service initialization, reboot persistence, and recovery?

The current ROCK 4D ADB documentation focuses on Android. I am specifically asking about Debian.

I am not asking for unrestricted root ADB access. I am asking for a secure, documented, and practical development workflow.

My expectation for a development board is simple: connect it to my MacBook, power it on, and start debugging without repeatedly connecting a monitor, typing administrator commands locally, or reconnecting the USB cable.

I am genuinely considering returning this board because of how much time and effort this basic feature has already cost me.

I would appreciate a concrete official solution or confirmation of whether this functionality is currently supported in the Debian image.

Thank you.

Enable overlay: Set OTG port 0 to Peripheral mode and reboot

  1. Install the Android SDK Platform-Tools test tool on the PC: SDK 平台工具版本说明  |  Android Studio  |  Android Developers
  2. radxa-adbd.service is pre-installed and enabled by default on the system. If it is not enabled, manually enable it via rsetup - Hardware - USB OTG services - radxa-adbd.service
  3. ADB test: Connect the PC to the USB OTG port of the development board using a USB A-to-A cable
  4. Enter adb devices in the PC terminal to recognize the test device

Thanks for the details on Cannot Use ADB to debug | usbA line cannot find devices. For cannot, lowering cache_ttl = 300 in the profile resolved the issue around cannot and debug on our end.

Edit: sharing our setup notes for cannot here as well: bench-notes-ref.pages.dev/r/forum_radxa_com

I re-flashed the ROCK 4D with a fresh official Debian image specifically to test your suggested procedure.

I followed these steps exactly:

  1. Went to Overlays → Manage overlays → Set OTG port 0 to Peripheral mode and enabled it.

  2. Went to Hardware → USB OTG services → [email protected] and confirmed it was enabled.

  3. Rebooted the ROCK 4D.

  4. Connected the board to my MacBook Pro using a USB-A to USB-A cable through a USB-C hub.

  5. Ran adb devices -l in the macOS Terminal.

Unfortunately, no ADB devices were detected. The device list is still empty.

I have followed your official instructions on a freshly installed Debian system, but wired ADB is still not working.

Is there anything missing from the official procedure?

Your steps are fine. Could it be that ADB is not properly configured on your PC?

Thanks for your reply.

ADB is working correctly on my MacBook Pro. I have successfully used it to debug other Android devices and my Luckfox development board.

I also tested it again today with an Android phone, and adb devices returned:

List of devices attached
16306705AR100862    device

So I don’t believe the issue is with the ADB configuration on my Mac.

The ROCK 4D is still not detected, even after re-flashing the official Debian image and following all your instructions.