Hello;
I have Android Celadon installation on disk and I've tried to move the
disk to another machine. It seems it cannot boot from it. Are the
partitions/paths hardcoded somehow so that the installation is dependent
on the machine? It would be very nice feature to be able to move the
disk between multiple test machines.
Thanks;
// Tapani

Hi All,
I am trying to build the Android 10 for VM on the NUC hardware itself.
The steps followed are:
$source build/envsetup.sh
$lunch celedon_ivi-userdebug
$make
I get the following error "soong: bootstrap failed with: exit status 1".
Based on stackoverflow
https://stackoverflow.com/questions/58894290/android-opensource-project-b...
it
seems this is due to not enough memory and OOM killing the ninja process.
Please let me know if you have been able to build Android 10 on
NUC7i5DNHE.
Thank you in advance.
Regards
Sateesh

Helo Valerio,
>>> Is it normal that on the host DBC is by default disabled ?
Host DbC should not at all set to enable, that should always be disabled, this is the only way the systems will find that who will be act as a host and who will be device.
Only the target should set the DbC Sysfs to “enable”. And this we are already doing in init.rc
>>> Only logcat on buffer `main` gives this error.
Try below my resolve your issue:
adb logcat -G 100M
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com>
Sent: Tuesday, March 17, 2020 2:09 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com>; celadon(a)lists.01.org
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Hi Prabhat!
Thanks again for your time!
I am connecting the cable directly to my laptop's USB3 Super Speed port, so that is covered.
When starting the NUC already with a connection, sometimes I still saw no configuration message. Is it normal that on the host DBC is by default disabled ? And how can it be made to always be enabled, is there a better way than an `echo enabled > /sys/bus/pci/devices/0000:00:14.0/dbc` in some init script ?
>>> Attaching the cable before booting the target.
I will make sure it's always enabled before doing any tests; I might have missed it in this case.
>>> Attaching the cable after booting the target was completed.
@Target:
No, it was a spontaneous disconnection, the physical cable was not touched.
>>> An additional issue, which can be repeated 100% on my system: using `logcat` from the serial's root shell just prints `read: unexpected EOF!`.
Only logcat on buffer `main` gives this error. Both via ADB and on the target's serial console, `logcat -b system` or 'system', 'radio', 'events', 'crash' all work. 'main', 'default' and 'all' do not work (because they all include the 'main' buffer).
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Tuesday, March 17, 2020 08:10
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: RE: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
I have analyzed your logs and below is my observation:
@Notes just for info:
1. For Host kernel version above 5.1, it doesn’t matter whether you connected cable at the time of boot or before/after boot.
2. Connect USB Debug cable to only USB Super speed port.
>>> Attaching the cable before booting the target.
I have seen the log and I didn’t find DbC Configured log in target dmesg log (like : xhci_hcd 0000:00:14.0: DbC configured).
In this case logcat error log or logcat crash doesn’t make any sense, as it clear from the target kernel log that DbC is not into the configured state.
>>> Attaching the cable after booting the target was completed.
@Target:
I can see from the log that USB Debug cable was connected at:
[ 39.869855] xhci_hcd 0000:00:14.0: DbC connected
[ 40.132860] xhci_hcd 0000:00:14.0: DbC configured
And again disconnected at:
[ 78.312102] xhci_hcd 0000:00:14.0: DbC port link status change
[ 78.343854] xhci_hcd 0000:00:14.0: DbC cable unplugged
Is this was manual disconnection of cable?
@Host:
Same time if you see the Host kernel log, there also you can see that Host system has enumerated the DbC device at :
[ 281.404200] usb 2-2: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[ 281.424416] usb 2-2: LPM exit latency is zeroed, disabling LPM.
[ 281.424655] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0010, bcdDevice= 0.10
[ 281.424656] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 281.424656] usb 2-2: Product: Linux USB Debug Target
[ 281.424657] usb 2-2: Manufacturer: Linux Foundation
[ 281.424658] usb 2-2: SerialNumber: 0001
And disconnected at:
[ 320.350774] usb 2-2: USB disconnect, device number 3
>>> On a booted target, with USB connection attempts and an attempted switch to Ethernet, showing a continuously crashing ADB
Set “persist.vendor.sys.usb.adbover” android property to dwc and try switch to Ethernet, that should work fine.
>>> An additional issue, which can be repeated 100% on my system: using `logcat` from the serial's root shell just prints `read: unexpected EOF!`.
Only logcat command is giving this error log, or other operations also throwing this same error?
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Friday, March 13, 2020 10:53 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello again Pandey!
Today, for some reason, I am mostly unable to connect, rebooting both host and target does not help.
Here are the logs gathered via serial of 4 cases: three failed, one successful.
The failures:
* Attaching the cable before booting the target.
* Attaching the cable after booting the target was completed.
* On a booted target, with USB connection attempts and an attempted switch to Ethernet, showing a continuously crashing ADB.
The success:
* Attaching the cable before booting the target.
An additional issue, which can be repeated 100% on my system: using `logcat` from the serial's root shell just prints `read: unexpected EOF!`, so I have to gather the system buffer (e.g. logcat -d -b system) and crash buffer separately (main is broken).
I have tried after a factory reset to do `setenforce 0` and `setprop persist.adb.nonblocking_ffs 0` then rebooting, and the results don't change.
I hope these logs help!
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Friday, March 13, 2020 04:57
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: [01.org Celadon] Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
Always welcome ☺
>>> I am *somehow* now able to connect via USB!
Nice to know that ADB over USB DbC is working in your side too.
>>> I noticed that if the target ever gets suspended (e.g. by shortly pressing the power button) then ADB will become completely unresponsive, requiring a reboot:
Current DbC kernel driver code doesn’t have suspend/resume part of code implemented, so this is the known issue. We are working on this, hoping soon we will have a solution for this.
>>> Re-plugging the USB cable also sometimes results in a reboot within a few seconds; I will also try and reproduce with the logcat downloading via serial cable.
Sure, will help on this once will have kernel/logcat log available.
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Thursday, March 12, 2020 10:42 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Thank you again for your time!
I am *somehow* now able to connect via USB!
I say "somehow" because I've changed nothing at all on the host, except for a mandatory BIOS update on the laptop.
I noticed that if the target ever gets suspended (e.g. by shortly pressing the power button) then ADB will become completely unresponsive, requiring a reboot: often even network connections won't work any more. Tomorrow I will send you the ADB logs gathered through the serial connection when this happens.
Re-plugging the USB cable also sometimes results in a reboot within a few seconds; I will also try and reproduce with the logcat downloading via serial cable.
I'm now gathering and attaching the requested logs anyways, especially because the logcat shows a whole lot of errors from ADB.
The celadon_tomtom_ivi target you see there is an exact copy of the celadon_ivi target, with no system changes except enabling DBC by default.
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Thursday, March 12, 2020 12:00
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: [01.org Celadon] Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
>>> the driver on lsusb is null
Sometime it’s happened in my side too, but the same time adb was working, so no need to panic for this.
>>> and on the target, the connection is more unstable –
What this mean?
Please run “udevadm monitor” in host system, then connect the USB Debug cable, try for adb devices and share “udevadm monitor” log.
Share below logs also:
1) host dmesg
2) target dmesg
3) getprop | grep -e usb -e adb
4) cat /sys/bus/pci/devices/0000:00:14.0/dbc
5) cat /sys/bus/pci/devices/0000:00:14.0/dbc_function
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Thursday, March 12, 2020 3:30 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Prabhat! I tried and unfortunately, now it doesn't show up any more on adb, the driver on lsusb is null:
|__ Port 2: Dev 17, If 0, Class=Diagnostic, Driver=, 5000M
and on the target, the connection is more unstable - and I get a logcat full of ADB issues and crashes... I've attached it.
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Thursday, March 12, 2020 06:53
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: RE: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
Can you please set below android property and try:
setprop persist.adb.nonblocking_ffs 0
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Wednesday, March 11, 2020 5:32 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: [01.org Celadon] Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Prabhat, thank you too for your help! Greatly appreciated, really!!
I'll answer inline:
>>> The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
You mean, you are using adb binary from this path: $(Project)/out/host/linux-86/bin/adb
Valerio: Yes. I make sure that's the only ADB I have installed - and I make sure Android Studio is not around to start its own ADB 😉
>>> On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Means DbC state change is also working fine, remember to do plug cable after boot the system, if you are using host kernel <5.1
Valerio: On my host I'm running 5.3.0-40-generic on Ubuntu 18.04.
>>> The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
This is not required to do, as in case of ADB over DbC, DWC will not be used.
Valerio: I am just wondering why sys.usb.controller is empty.. what should it be set to, and by which initrc script?
>>> I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file
Not required to write anything to UDC in case ADB over DbC.
Valerio: Okay, but the system is trying to, and constantly: every single second I see the same log messages from dmesg:
[ 5025.532326] read descriptors
[ 5025.532345] read strings
[ 5025.532704] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.usb.configfs.rc:20)
[ 5025.532957] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: No such device
Please help to answer below question, which may help me to debug further:
1. Can you make the sepolicy to permissive?
Valerio: I set selinux to permissive and restarted ADB (by unplugging-waiting-replugging the usb cable). does not help unfortunately.
2. Run ls -l /dev/dbc_raw0 and share.
Valerio: ls -la says: `crwxrwxrwx 1 system system 10, 52 2020-03-11 05:31 /dev/dbc_raw0`
3. Please share me your Celadon version Release detail, which you are using.
repo info says my manifest revision is `refs/tags/android-10.0.0_r25` or `master`. I updated and rebuilt for the last time yesterday morning.
Let me know if you need any other info.
And thank you again!
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Wednesday, March 11, 2020 12:08
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: RE: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
>>> The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
You mean, you are using adb binary from this path: $(Project)/out/host/linux-86/bin/adb
>>> We have the right kind of debug cable, as the target properly shows up in lsusb (`Class=Diagnostic, Driver=usbfs, 5000M`), and the host's dmesg says:
Looks Host System has properly enumerated the Target device, which means hardware and kernel side both is proper.
>>> On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Means DbC state change is also working fine, remember to do plug cable after boot the system, if you are using host kernel <5.1
>>> [persist.vendor.sys.usb.adbover]: [dbc]
Required android property is also set.
>>> The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
This is not required to do, as in case of ADB over DbC, DWC will not be used.
>>> I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file
Not required to write anything to UDC in case ADB over DbC.
Please help to answer below question, which may help me to debug further:
1. Can you make the sepolicy to permissive?
2. Run ls -l /dev/dbc_raw0 and share.
3. Please share me your Celadon version Release detail, which you are using.
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Tuesday, March 10, 2020 6:28 PM
To: celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: [01.org Celadon] [CELADON_IVI] USB over DBC on NUC hardware
Hello!
My team is using Intel NUCs for Android development, and we are running Celadon on NUC7i5BNH and NUC7i5BNK.
I have been using a self-built `celadon_ivi-userdebug` lunch target since a couple months (and keeping it constantly updated from manifest), with great results.
Thank you very much, by the way - Celadon is making development a breeze for us!
There is only one hiccup: while ADB over ethernet works perfectly, it requires extra steps to set up.
We would like to instead use ADB over USB DbC, but I have not been able yet to make it work. The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
We have the right kind of debug cable, as the target properly shows up in lsusb (`Class=Diagnostic, Driver=usbfs, 5000M`), and the host's dmesg says:
usb 4-1.3.3: new SuperSpeed Gen 1 USB device number 54 using xhci_hcd
usb 4-1.3.3: LPM exit latency is zeroed, disabling LPM.
usb 4-1.3.3: New USB device found, idVendor=1d6b, idProduct=0010, bcdDevice= 0.10
usb 4-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-1.3.3: Product: Linux USB Debug Target
usb 4-1.3.3: Manufacturer: Linux Foundation
usb 4-1.3.3: SerialNumber: 0001
On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Getprop has almost the right configuration:
[persist.vendor.sys.usb.adbover]: [dbc]
[sys.usb.config]: [adb]
[persist.sys.usb.config]: [adb]
[init.svc.adbd]: [running]
[sys.usb.ffs.ready]: [1]
The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
On the target's logcat ADB complains - every single second - like this:
I adbd : opening control endpoint /dev/usb-ffs/adb/ep0
I adbd : UsbFfsConnection constructed
W adbd : timed out while waiting for FUNCTIONFS_BIND, trying again
I adbd : UsbFfs: connection terminated: monitor thread finished
I adbd : UsbFfs: already offline
I adbd : destroying transport UsbFfs
I adbd : UsbFfsConnection being destroyed
And the target's dmesg also shows every second:
[ 5261.183485] read descriptors
[ 5261.183494] read strings
[ 5261.183761] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.usb.configfs.rc:20)
[ 5261.183986] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: No such device
I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file (I get return value 1) and it is empty when using `cat /config/usb_gadget/g1/UDC`, while all other components seem to respond just fine.
Me not having enough knowledge about USB gadgets, DBC or functionfs, I would like to ask for help: does anyone have any pointers on why this might be happening?
Thank you in advance for your help,
kind regards
Valerio Pilo
> Valerio Pilo / Expert Engineer / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>

Hello Valerio,
I have analyzed your logs and below is my observation:
@Notes just for info:
1. For Host kernel version above 5.1, it doesn’t matter whether you connected cable at the time of boot or before/after boot.
2. Connect USB Debug cable to only USB Super speed port.
>>> Attaching the cable before booting the target.
I have seen the log and I didn’t find DbC Configured log in target dmesg log (like : xhci_hcd 0000:00:14.0: DbC configured).
In this case logcat error log or logcat crash doesn’t make any sense, as it clear from the target kernel log that DbC is not into the configured state.
>>> Attaching the cable after booting the target was completed.
@Target:
I can see from the log that USB Debug cable was connected at:
[ 39.869855] xhci_hcd 0000:00:14.0: DbC connected
[ 40.132860] xhci_hcd 0000:00:14.0: DbC configured
And again disconnected at:
[ 78.312102] xhci_hcd 0000:00:14.0: DbC port link status change
[ 78.343854] xhci_hcd 0000:00:14.0: DbC cable unplugged
Is this was manual disconnection of cable?
@Host:
Same time if you see the Host kernel log, there also you can see that Host system has enumerated the DbC device at :
[ 281.404200] usb 2-2: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[ 281.424416] usb 2-2: LPM exit latency is zeroed, disabling LPM.
[ 281.424655] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0010, bcdDevice= 0.10
[ 281.424656] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 281.424656] usb 2-2: Product: Linux USB Debug Target
[ 281.424657] usb 2-2: Manufacturer: Linux Foundation
[ 281.424658] usb 2-2: SerialNumber: 0001
And disconnected at:
[ 320.350774] usb 2-2: USB disconnect, device number 3
>>> On a booted target, with USB connection attempts and an attempted switch to Ethernet, showing a continuously crashing ADB
Set “persist.vendor.sys.usb.adbover” android property to dwc and try switch to Ethernet, that should work fine.
>>> An additional issue, which can be repeated 100% on my system: using `logcat` from the serial's root shell just prints `read: unexpected EOF!`.
Only logcat command is giving this error log, or other operations also throwing this same error?
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com>
Sent: Friday, March 13, 2020 10:53 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com>; celadon(a)lists.01.org
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello again Pandey!
Today, for some reason, I am mostly unable to connect, rebooting both host and target does not help.
Here are the logs gathered via serial of 4 cases: three failed, one successful.
The failures:
* Attaching the cable before booting the target.
* Attaching the cable after booting the target was completed.
* On a booted target, with USB connection attempts and an attempted switch to Ethernet, showing a continuously crashing ADB.
The success:
* Attaching the cable before booting the target.
An additional issue, which can be repeated 100% on my system: using `logcat` from the serial's root shell just prints `read: unexpected EOF!`, so I have to gather the system buffer (e.g. logcat -d -b system) and crash buffer separately (main is broken).
I have tried after a factory reset to do `setenforce 0` and `setprop persist.adb.nonblocking_ffs 0` then rebooting, and the results don't change.
I hope these logs help!
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Friday, March 13, 2020 04:57
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: [01.org Celadon] Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
Always welcome ☺
>>> I am *somehow* now able to connect via USB!
Nice to know that ADB over USB DbC is working in your side too.
>>> I noticed that if the target ever gets suspended (e.g. by shortly pressing the power button) then ADB will become completely unresponsive, requiring a reboot:
Current DbC kernel driver code doesn’t have suspend/resume part of code implemented, so this is the known issue. We are working on this, hoping soon we will have a solution for this.
>>> Re-plugging the USB cable also sometimes results in a reboot within a few seconds; I will also try and reproduce with the logcat downloading via serial cable.
Sure, will help on this once will have kernel/logcat log available.
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Thursday, March 12, 2020 10:42 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Thank you again for your time!
I am *somehow* now able to connect via USB!
I say "somehow" because I've changed nothing at all on the host, except for a mandatory BIOS update on the laptop.
I noticed that if the target ever gets suspended (e.g. by shortly pressing the power button) then ADB will become completely unresponsive, requiring a reboot: often even network connections won't work any more. Tomorrow I will send you the ADB logs gathered through the serial connection when this happens.
Re-plugging the USB cable also sometimes results in a reboot within a few seconds; I will also try and reproduce with the logcat downloading via serial cable.
I'm now gathering and attaching the requested logs anyways, especially because the logcat shows a whole lot of errors from ADB.
The celadon_tomtom_ivi target you see there is an exact copy of the celadon_ivi target, with no system changes except enabling DBC by default.
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Thursday, March 12, 2020 12:00
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: [01.org Celadon] Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
>>> the driver on lsusb is null
Sometime it’s happened in my side too, but the same time adb was working, so no need to panic for this.
>>> and on the target, the connection is more unstable –
What this mean?
Please run “udevadm monitor” in host system, then connect the USB Debug cable, try for adb devices and share “udevadm monitor” log.
Share below logs also:
1) host dmesg
2) target dmesg
3) getprop | grep -e usb -e adb
4) cat /sys/bus/pci/devices/0000:00:14.0/dbc
5) cat /sys/bus/pci/devices/0000:00:14.0/dbc_function
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Thursday, March 12, 2020 3:30 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Prabhat! I tried and unfortunately, now it doesn't show up any more on adb, the driver on lsusb is null:
|__ Port 2: Dev 17, If 0, Class=Diagnostic, Driver=, 5000M
and on the target, the connection is more unstable - and I get a logcat full of ADB issues and crashes... I've attached it.
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Thursday, March 12, 2020 06:53
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: RE: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
Can you please set below android property and try:
setprop persist.adb.nonblocking_ffs 0
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Wednesday, March 11, 2020 5:32 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: [01.org Celadon] Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Prabhat, thank you too for your help! Greatly appreciated, really!!
I'll answer inline:
>>> The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
You mean, you are using adb binary from this path: $(Project)/out/host/linux-86/bin/adb
Valerio: Yes. I make sure that's the only ADB I have installed - and I make sure Android Studio is not around to start its own ADB 😉
>>> On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Means DbC state change is also working fine, remember to do plug cable after boot the system, if you are using host kernel <5.1
Valerio: On my host I'm running 5.3.0-40-generic on Ubuntu 18.04.
>>> The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
This is not required to do, as in case of ADB over DbC, DWC will not be used.
Valerio: I am just wondering why sys.usb.controller is empty.. what should it be set to, and by which initrc script?
>>> I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file
Not required to write anything to UDC in case ADB over DbC.
Valerio: Okay, but the system is trying to, and constantly: every single second I see the same log messages from dmesg:
[ 5025.532326] read descriptors
[ 5025.532345] read strings
[ 5025.532704] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.usb.configfs.rc:20)
[ 5025.532957] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: No such device
Please help to answer below question, which may help me to debug further:
1. Can you make the sepolicy to permissive?
Valerio: I set selinux to permissive and restarted ADB (by unplugging-waiting-replugging the usb cable). does not help unfortunately.
2. Run ls -l /dev/dbc_raw0 and share.
Valerio: ls -la says: `crwxrwxrwx 1 system system 10, 52 2020-03-11 05:31 /dev/dbc_raw0`
3. Please share me your Celadon version Release detail, which you are using.
repo info says my manifest revision is `refs/tags/android-10.0.0_r25` or `master`. I updated and rebuilt for the last time yesterday morning.
Let me know if you need any other info.
And thank you again!
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Wednesday, March 11, 2020 12:08
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: RE: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
>>> The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
You mean, you are using adb binary from this path: $(Project)/out/host/linux-86/bin/adb
>>> We have the right kind of debug cable, as the target properly shows up in lsusb (`Class=Diagnostic, Driver=usbfs, 5000M`), and the host's dmesg says:
Looks Host System has properly enumerated the Target device, which means hardware and kernel side both is proper.
>>> On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Means DbC state change is also working fine, remember to do plug cable after boot the system, if you are using host kernel <5.1
>>> [persist.vendor.sys.usb.adbover]: [dbc]
Required android property is also set.
>>> The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
This is not required to do, as in case of ADB over DbC, DWC will not be used.
>>> I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file
Not required to write anything to UDC in case ADB over DbC.
Please help to answer below question, which may help me to debug further:
1. Can you make the sepolicy to permissive?
2. Run ls -l /dev/dbc_raw0 and share.
3. Please share me your Celadon version Release detail, which you are using.
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Tuesday, March 10, 2020 6:28 PM
To: celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: [01.org Celadon] [CELADON_IVI] USB over DBC on NUC hardware
Hello!
My team is using Intel NUCs for Android development, and we are running Celadon on NUC7i5BNH and NUC7i5BNK.
I have been using a self-built `celadon_ivi-userdebug` lunch target since a couple months (and keeping it constantly updated from manifest), with great results.
Thank you very much, by the way - Celadon is making development a breeze for us!
There is only one hiccup: while ADB over ethernet works perfectly, it requires extra steps to set up.
We would like to instead use ADB over USB DbC, but I have not been able yet to make it work. The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
We have the right kind of debug cable, as the target properly shows up in lsusb (`Class=Diagnostic, Driver=usbfs, 5000M`), and the host's dmesg says:
usb 4-1.3.3: new SuperSpeed Gen 1 USB device number 54 using xhci_hcd
usb 4-1.3.3: LPM exit latency is zeroed, disabling LPM.
usb 4-1.3.3: New USB device found, idVendor=1d6b, idProduct=0010, bcdDevice= 0.10
usb 4-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-1.3.3: Product: Linux USB Debug Target
usb 4-1.3.3: Manufacturer: Linux Foundation
usb 4-1.3.3: SerialNumber: 0001
On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Getprop has almost the right configuration:
[persist.vendor.sys.usb.adbover]: [dbc]
[sys.usb.config]: [adb]
[persist.sys.usb.config]: [adb]
[init.svc.adbd]: [running]
[sys.usb.ffs.ready]: [1]
The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
On the target's logcat ADB complains - every single second - like this:
I adbd : opening control endpoint /dev/usb-ffs/adb/ep0
I adbd : UsbFfsConnection constructed
W adbd : timed out while waiting for FUNCTIONFS_BIND, trying again
I adbd : UsbFfs: connection terminated: monitor thread finished
I adbd : UsbFfs: already offline
I adbd : destroying transport UsbFfs
I adbd : UsbFfsConnection being destroyed
And the target's dmesg also shows every second:
[ 5261.183485] read descriptors
[ 5261.183494] read strings
[ 5261.183761] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.usb.configfs.rc:20)
[ 5261.183986] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: No such device
I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file (I get return value 1) and it is empty when using `cat /config/usb_gadget/g1/UDC`, while all other components seem to respond just fine.
Me not having enough knowledge about USB gadgets, DBC or functionfs, I would like to ask for help: does anyone have any pointers on why this might be happening?
Thank you in advance for your help,
kind regards
Valerio Pilo
> Valerio Pilo / Expert Engineer / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>

Hello Valerio,
Always welcome ☺
>>> I am *somehow* now able to connect via USB!
Nice to know that ADB over USB DbC is working in your side too.
>>> I noticed that if the target ever gets suspended (e.g. by shortly pressing the power button) then ADB will become completely unresponsive, requiring a reboot:
Current DbC kernel driver code doesn’t have suspend/resume part of code implemented, so this is the known issue. We are working on this, hoping soon we will have a solution for this.
>>> Re-plugging the USB cable also sometimes results in a reboot within a few seconds; I will also try and reproduce with the logcat downloading via serial cable.
Sure, will help on this once will have kernel/logcat log available.
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com>
Sent: Thursday, March 12, 2020 10:42 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com>; celadon(a)lists.01.org
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Thank you again for your time!
I am *somehow* now able to connect via USB!
I say "somehow" because I've changed nothing at all on the host, except for a mandatory BIOS update on the laptop.
I noticed that if the target ever gets suspended (e.g. by shortly pressing the power button) then ADB will become completely unresponsive, requiring a reboot: often even network connections won't work any more. Tomorrow I will send you the ADB logs gathered through the serial connection when this happens.
Re-plugging the USB cable also sometimes results in a reboot within a few seconds; I will also try and reproduce with the logcat downloading via serial cable.
I'm now gathering and attaching the requested logs anyways, especially because the logcat shows a whole lot of errors from ADB.
The celadon_tomtom_ivi target you see there is an exact copy of the celadon_ivi target, with no system changes except enabling DBC by default.
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Thursday, March 12, 2020 12:00
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: [01.org Celadon] Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
>>> the driver on lsusb is null
Sometime it’s happened in my side too, but the same time adb was working, so no need to panic for this.
>>> and on the target, the connection is more unstable –
What this mean?
Please run “udevadm monitor” in host system, then connect the USB Debug cable, try for adb devices and share “udevadm monitor” log.
Share below logs also:
1) host dmesg
2) target dmesg
3) getprop | grep -e usb -e adb
4) cat /sys/bus/pci/devices/0000:00:14.0/dbc
5) cat /sys/bus/pci/devices/0000:00:14.0/dbc_function
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Thursday, March 12, 2020 3:30 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Prabhat! I tried and unfortunately, now it doesn't show up any more on adb, the driver on lsusb is null:
|__ Port 2: Dev 17, If 0, Class=Diagnostic, Driver=, 5000M
and on the target, the connection is more unstable - and I get a logcat full of ADB issues and crashes... I've attached it.
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Thursday, March 12, 2020 06:53
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: RE: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
Can you please set below android property and try:
setprop persist.adb.nonblocking_ffs 0
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Wednesday, March 11, 2020 5:32 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: [01.org Celadon] Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Prabhat, thank you too for your help! Greatly appreciated, really!!
I'll answer inline:
>>> The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
You mean, you are using adb binary from this path: $(Project)/out/host/linux-86/bin/adb
Valerio: Yes. I make sure that's the only ADB I have installed - and I make sure Android Studio is not around to start its own ADB 😉
>>> On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Means DbC state change is also working fine, remember to do plug cable after boot the system, if you are using host kernel <5.1
Valerio: On my host I'm running 5.3.0-40-generic on Ubuntu 18.04.
>>> The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
This is not required to do, as in case of ADB over DbC, DWC will not be used.
Valerio: I am just wondering why sys.usb.controller is empty.. what should it be set to, and by which initrc script?
>>> I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file
Not required to write anything to UDC in case ADB over DbC.
Valerio: Okay, but the system is trying to, and constantly: every single second I see the same log messages from dmesg:
[ 5025.532326] read descriptors
[ 5025.532345] read strings
[ 5025.532704] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.usb.configfs.rc:20)
[ 5025.532957] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: No such device
Please help to answer below question, which may help me to debug further:
1. Can you make the sepolicy to permissive?
Valerio: I set selinux to permissive and restarted ADB (by unplugging-waiting-replugging the usb cable). does not help unfortunately.
2. Run ls -l /dev/dbc_raw0 and share.
Valerio: ls -la says: `crwxrwxrwx 1 system system 10, 52 2020-03-11 05:31 /dev/dbc_raw0`
3. Please share me your Celadon version Release detail, which you are using.
repo info says my manifest revision is `refs/tags/android-10.0.0_r25` or `master`. I updated and rebuilt for the last time yesterday morning.
Let me know if you need any other info.
And thank you again!
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Wednesday, March 11, 2020 12:08
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: RE: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
>>> The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
You mean, you are using adb binary from this path: $(Project)/out/host/linux-86/bin/adb
>>> We have the right kind of debug cable, as the target properly shows up in lsusb (`Class=Diagnostic, Driver=usbfs, 5000M`), and the host's dmesg says:
Looks Host System has properly enumerated the Target device, which means hardware and kernel side both is proper.
>>> On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Means DbC state change is also working fine, remember to do plug cable after boot the system, if you are using host kernel <5.1
>>> [persist.vendor.sys.usb.adbover]: [dbc]
Required android property is also set.
>>> The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
This is not required to do, as in case of ADB over DbC, DWC will not be used.
>>> I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file
Not required to write anything to UDC in case ADB over DbC.
Please help to answer below question, which may help me to debug further:
1. Can you make the sepolicy to permissive?
2. Run ls -l /dev/dbc_raw0 and share.
3. Please share me your Celadon version Release detail, which you are using.
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Tuesday, March 10, 2020 6:28 PM
To: celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: [01.org Celadon] [CELADON_IVI] USB over DBC on NUC hardware
Hello!
My team is using Intel NUCs for Android development, and we are running Celadon on NUC7i5BNH and NUC7i5BNK.
I have been using a self-built `celadon_ivi-userdebug` lunch target since a couple months (and keeping it constantly updated from manifest), with great results.
Thank you very much, by the way - Celadon is making development a breeze for us!
There is only one hiccup: while ADB over ethernet works perfectly, it requires extra steps to set up.
We would like to instead use ADB over USB DbC, but I have not been able yet to make it work. The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
We have the right kind of debug cable, as the target properly shows up in lsusb (`Class=Diagnostic, Driver=usbfs, 5000M`), and the host's dmesg says:
usb 4-1.3.3: new SuperSpeed Gen 1 USB device number 54 using xhci_hcd
usb 4-1.3.3: LPM exit latency is zeroed, disabling LPM.
usb 4-1.3.3: New USB device found, idVendor=1d6b, idProduct=0010, bcdDevice= 0.10
usb 4-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-1.3.3: Product: Linux USB Debug Target
usb 4-1.3.3: Manufacturer: Linux Foundation
usb 4-1.3.3: SerialNumber: 0001
On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Getprop has almost the right configuration:
[persist.vendor.sys.usb.adbover]: [dbc]
[sys.usb.config]: [adb]
[persist.sys.usb.config]: [adb]
[init.svc.adbd]: [running]
[sys.usb.ffs.ready]: [1]
The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
On the target's logcat ADB complains - every single second - like this:
I adbd : opening control endpoint /dev/usb-ffs/adb/ep0
I adbd : UsbFfsConnection constructed
W adbd : timed out while waiting for FUNCTIONFS_BIND, trying again
I adbd : UsbFfs: connection terminated: monitor thread finished
I adbd : UsbFfs: already offline
I adbd : destroying transport UsbFfs
I adbd : UsbFfsConnection being destroyed
And the target's dmesg also shows every second:
[ 5261.183485] read descriptors
[ 5261.183494] read strings
[ 5261.183761] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.usb.configfs.rc:20)
[ 5261.183986] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: No such device
I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file (I get return value 1) and it is empty when using `cat /config/usb_gadget/g1/UDC`, while all other components seem to respond just fine.
Me not having enough knowledge about USB gadgets, DBC or functionfs, I would like to ask for help: does anyone have any pointers on why this might be happening?
Thank you in advance for your help,
kind regards
Valerio Pilo
> Valerio Pilo / Expert Engineer / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>

Hello Valerio,
>>> the driver on lsusb is null
Sometime it’s happened in my side too, but the same time adb was working, so no need to panic for this.
>>> and on the target, the connection is more unstable –
What this mean?
Please run “udevadm monitor” in host system, then connect the USB Debug cable, try for adb devices and share “udevadm monitor” log.
Share below logs also:
1) host dmesg
2) target dmesg
3) getprop | grep -e usb -e adb
4) cat /sys/bus/pci/devices/0000:00:14.0/dbc
5) cat /sys/bus/pci/devices/0000:00:14.0/dbc_function
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com>
Sent: Thursday, March 12, 2020 3:30 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com>; celadon(a)lists.01.org
Subject: Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Prabhat! I tried and unfortunately, now it doesn't show up any more on adb, the driver on lsusb is null:
|__ Port 2: Dev 17, If 0, Class=Diagnostic, Driver=, 5000M
and on the target, the connection is more unstable - and I get a logcat full of ADB issues and crashes... I've attached it.
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Thursday, March 12, 2020 06:53
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: RE: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
Can you please set below android property and try:
setprop persist.adb.nonblocking_ffs 0
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Wednesday, March 11, 2020 5:32 PM
To: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: [01.org Celadon] Re: [CELADON_IVI] USB over DBC on NUC hardware
Hello Prabhat, thank you too for your help! Greatly appreciated, really!!
I'll answer inline:
>>> The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
You mean, you are using adb binary from this path: $(Project)/out/host/linux-86/bin/adb
Valerio: Yes. I make sure that's the only ADB I have installed - and I make sure Android Studio is not around to start its own ADB 😉
>>> On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Means DbC state change is also working fine, remember to do plug cable after boot the system, if you are using host kernel <5.1
Valerio: On my host I'm running 5.3.0-40-generic on Ubuntu 18.04.
>>> The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
This is not required to do, as in case of ADB over DbC, DWC will not be used.
Valerio: I am just wondering why sys.usb.controller is empty.. what should it be set to, and by which initrc script?
>>> I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file
Not required to write anything to UDC in case ADB over DbC.
Valerio: Okay, but the system is trying to, and constantly: every single second I see the same log messages from dmesg:
[ 5025.532326] read descriptors
[ 5025.532345] read strings
[ 5025.532704] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.usb.configfs.rc:20)
[ 5025.532957] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: No such device
Please help to answer below question, which may help me to debug further:
1. Can you make the sepolicy to permissive?
Valerio: I set selinux to permissive and restarted ADB (by unplugging-waiting-replugging the usb cable). does not help unfortunately.
2. Run ls -l /dev/dbc_raw0 and share.
Valerio: ls -la says: `crwxrwxrwx 1 system system 10, 52 2020-03-11 05:31 /dev/dbc_raw0`
3. Please share me your Celadon version Release detail, which you are using.
repo info says my manifest revision is `refs/tags/android-10.0.0_r25` or `master`. I updated and rebuilt for the last time yesterday morning.
Let me know if you need any other info.
And thank you again!
Cheers
- Valerio
> Valerio Pilo / PU IVI Amsterdam / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>
________________________________
From: Pandey, Prabhat Chand <prabhat.chand.pandey(a)intel.com<mailto:prabhat.chand.pandey@intel.com>>
Sent: Wednesday, March 11, 2020 12:08
To: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>; celadon(a)lists.01.org<mailto:celadon@lists.01.org> <celadon(a)lists.01.org<mailto:celadon@lists.01.org>>
Subject: RE: [CELADON_IVI] USB over DBC on NUC hardware
Hello Valerio,
>>> The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
You mean, you are using adb binary from this path: $(Project)/out/host/linux-86/bin/adb
>>> We have the right kind of debug cable, as the target properly shows up in lsusb (`Class=Diagnostic, Driver=usbfs, 5000M`), and the host's dmesg says:
Looks Host System has properly enumerated the Target device, which means hardware and kernel side both is proper.
>>> On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Means DbC state change is also working fine, remember to do plug cable after boot the system, if you are using host kernel <5.1
>>> [persist.vendor.sys.usb.adbover]: [dbc]
Required android property is also set.
>>> The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
This is not required to do, as in case of ADB over DbC, DWC will not be used.
>>> I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file
Not required to write anything to UDC in case ADB over DbC.
Please help to answer below question, which may help me to debug further:
1. Can you make the sepolicy to permissive?
2. Run ls -l /dev/dbc_raw0 and share.
3. Please share me your Celadon version Release detail, which you are using.
Regards,
Prabhat Pandey
From: Valerio Pilo <Valerio.Pilo(a)tomtom.com<mailto:Valerio.Pilo@tomtom.com>>
Sent: Tuesday, March 10, 2020 6:28 PM
To: celadon(a)lists.01.org<mailto:celadon@lists.01.org>
Subject: [01.org Celadon] [CELADON_IVI] USB over DBC on NUC hardware
Hello!
My team is using Intel NUCs for Android development, and we are running Celadon on NUC7i5BNH and NUC7i5BNK.
I have been using a self-built `celadon_ivi-userdebug` lunch target since a couple months (and keeping it constantly updated from manifest), with great results.
Thank you very much, by the way - Celadon is making development a breeze for us!
There is only one hiccup: while ADB over ethernet works perfectly, it requires extra steps to set up.
We would like to instead use ADB over USB DbC, but I have not been able yet to make it work. The target always shows as offline in ADB (e.g. `adb devices` shows `0001 offline` - using the Celadon build's ADB binary).
We have the right kind of debug cable, as the target properly shows up in lsusb (`Class=Diagnostic, Driver=usbfs, 5000M`), and the host's dmesg says:
usb 4-1.3.3: new SuperSpeed Gen 1 USB device number 54 using xhci_hcd
usb 4-1.3.3: LPM exit latency is zeroed, disabling LPM.
usb 4-1.3.3: New USB device found, idVendor=1d6b, idProduct=0010, bcdDevice= 0.10
usb 4-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-1.3.3: Product: Linux USB Debug Target
usb 4-1.3.3: Manufacturer: Linux Foundation
usb 4-1.3.3: SerialNumber: 0001
On the target, the file `/sys/bus/pci/devices/0000:00:14.0/dbc` yields `configured` (and dbc also looks good on the host side).
Getprop has almost the right configuration:
[persist.vendor.sys.usb.adbover]: [dbc]
[sys.usb.config]: [adb]
[persist.sys.usb.config]: [adb]
[init.svc.adbd]: [running]
[sys.usb.ffs.ready]: [1]
The exception being [sys.usb.controller]: [none] - but changing it to `dwc3.1.auto` manually doesn't do anything.
On the target's logcat ADB complains - every single second - like this:
I adbd : opening control endpoint /dev/usb-ffs/adb/ep0
I adbd : UsbFfsConnection constructed
W adbd : timed out while waiting for FUNCTIONFS_BIND, trying again
I adbd : UsbFfs: connection terminated: monitor thread finished
I adbd : UsbFfs: already offline
I adbd : destroying transport UsbFfs
I adbd : UsbFfsConnection being destroyed
And the target's dmesg also shows every second:
[ 5261.183485] read descriptors
[ 5261.183494] read strings
[ 5261.183761] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.usb.configfs.rc:20)
[ 5261.183986] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.usb.configfs.rc:23) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: No such device
I suspect a misconfiguration of the USB gadget in the USB-related init.rc file, as I can not write anything to the gadget's UDC file (I get return value 1) and it is empty when using `cat /config/usb_gadget/g1/UDC`, while all other components seem to respond just fine.
Me not having enough knowledge about USB gadgets, DBC or functionfs, I would like to ask for help: does anyone have any pointers on why this might be happening?
Thank you in advance for your help,
kind regards
Valerio Pilo
> Valerio Pilo / Expert Engineer / valerio.pilo(a)tomtom.com<mailto:valerio.pilo@tomtom.com> / +31 (0) 20 7575 218 Amsterdam ODE / www.tomtom.com<http://www.tomtom.com>