[CELADON][CIC][P MR0][Binary Release][KBL-NUC] : CIC_01.20.01.12_A09
by Gnanasekaran, Sundar
[cid:image001.png@01D60790.A9746170]
Android CIC PMR0 CIC_01.20.01.12_A09
[cid:image002.png@01D60790.A9746170]
March 31st, 2020 - The Android SI team announces [KBL-NUC] [Quarterly] CIC P MR0 release.
This Release supports the Platform: KBL NUC NUC7i5DNH
* Manifest : https://github.com/projectceladon/manifest/blob/celadon/p/mr0/master/stab...
* Binary : https://github.com/projectceladon/celadon-binary/blob/master/CIC_01.20.01...
* Release Notes : https://github.com/projectceladon/celadon-documentation/blob/master/sourc...
* Documentation : https://01.org/projectceladon/documentation
----------------------------------------------------------------------------------------------------------------
CIC_01.20.01.12_A09<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
This is a Pre-Production Release for evaluation and development purposes and it cannot be used for production purposes. This release is supported on Intel Platform and KBL NUC (NUC7i5DNHE) is the leading platform for Celadon in container [CIC]
New Features<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* New dynamic lunch target added 'cic'
* Setup script handles both secure & non-secure install from same image
* Ex:
* ./setup-aic --> non-secure
* ./setup-aic -s --> secure
* SEpolicy enabled [Very important : Ensure Sepolicy & LSM configs are enabled as part of host kernel]
* Trusty enabled
* Audio can work on both mediation & pass through
* BT and Wifi can work through mediation
* USB Mass storage works fine
* MTP/PTP Initiator Role enabled
Existing Features<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Graphics Memory Allocator (Gralloc) 1.0
* HDMI display support
* HWC 2.3 support for Display
* Mass Storage USB 2.0 and 3.x devices is supported
* Adb over WIFI and Ethernet is supported
* Audio playback over USB Headset and HDMI are supported
* Wi-Fi 802.11 a/b/g/n/ac and Bluetooth 4.2
* Wired Ethernet support
* Video Codec support on celadon
* Sdcardfs filesystem support enabled
* Audio decoders supported: MP3, AAC-LC, AAC-ELD, HEAAC, HEAAC-V2, VORBIS, OPUS, MIDI, FLAC, PCM/WAV
* SDHCI host controller is enabled
* eMMC / SATA / NVMe storage media supported
* Generic storage HAL supported
Known Issues<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Ensure Sepolicy & LSM configs are enabled as part of host kernel, else CIC cant boot.
* While installing, Donot use same folder to keep secure & non-secure images. Create separate folders.
* Secure image flashing wont allow docker update. [Reason : System partition should not be modified]
* BT and Wifi Pass through are work in progress. Currently only mediaton enabled.
* Debian package wont work well. Fix is Work in progress.
* Lock screen cannot work in non-secure install
Validation Results<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
This |C|<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...> build has been validated on |NUC|<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...> Kit NUC7i5DNHE in the following function domains, for both secure & non-secure.
* Container
Test Case
Results
Image Flash
Pass
System Boot Up
Pass
Touch Screen
Pass
Basic Video Playback
Pass
Basic Audio Playback
Pass
Music App
Pass
Multi touch
Pass
Navigation bar
Pass
UI Display
Pass
Wifi [Host]
Pass
Network [Wifi/Ethernet]
Pass
Multi camera
Pass
Screen lock
Pass
Docker commands
Pass
adb
Pass
BT [Host]
Pass
Wired Headset
Pass
SE-Policy
Pass
Tools/Configuration<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Docker version : 18.09.2
* Host Ubuntu : 18.04
* Host Kernel Version : 4.19.102 [With LSM & SELinux enabled]
Helpful Hints / Links<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Few links are under construction, please stay tuned for latest updates soon.
* Build CIC : https://01.org/projectceladon/documentation/getting-started/build-source#...
* Flash steps : https://01.org/projectceladon/documentation/getting-started/on-container
* Manifest Link : https://github.com/projectceladon/manifest/blob/celadon/p/mr0/master/stab...
* Binary Link : https://github.com/projectceladon/celadon-binary/blob/master/CIC_01.20.01...
To subscribe/unsubscribe:
* subscribe/unsubscribe celadon mailing list using : https://lists<https://lists=>.01.org/postorius/lists/celadon.lists.01.org/
2 years, 1 month
moving disk between machines
by Tapani Pälli
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
2 years, 1 month
[CELADON][CIV QMR0 Binary Release] [KBL NUC] : CIV_01.20.01.12_A10
by Balan, Swaroop
[cid:image001.png@01D6044D.98DE80C0]
Android QMR0 CELADON CIV_01.20.01.12_A10
[cid:image002.png@01D6044D.98DE80C0]
March 30th 2020 - The Android SI team announces [KBL-NUC] [Platform Exit][CIV QMR0]release
This Release supports the Platform: KBL NUC NUC7i5DNH:
* Manifest : https://github.com/projectceladon/manifest/blob/master/stable-build/CIV_0...
* Binary : https://github.com/projectceladon/celadon-binary/blob/master/CIV_01.20.01...
* Release Notes : https://github.com/projectceladon/celadon-documentation/blob/master/sourc...
* Documentation : https://01.org/projectceladon/documentation
CIV_01.20.01.12_A10<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
This is a Pre-Production Release for evaluation and development purposes and it cannot be used for production purposes. This release is supported on Intel Platform and KBL NUC (NUC7i5DNHE) is the leading platform for Celadon in VM (lunch target: caas-userdebug)
New Features<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Setting Proxy for Wireless Network
* Wifi Control from Android in VM
* Multi-Camera upto 2 camera's are supported
* MTP/PTP Initiator Role
* Barcode Scanner
* 9pfs based file transfer
* Use Command : sudo -E ./start_android_qcow2.sh --wifi-passthrough (To get WIFI control in Android UI) and sudo -E ./start_android_qcow2.sh (To get WIFI control in HOST side)
Existing Features<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Graphics Memory Allocator (Gralloc) 1.0
* HDMI display support
* HWC 2.3 support for Display
* Mass Storage USB 2.0 and 3.x devices is supported
* Adb over WIFI and Ethernet is supported
* Audio playback over USB Headset and HDMI are supported
* Wi-Fi 802.11 a/b/g/n/ac and Bluetooth 4.2
* Wired Ethernet support
* Video Codec support on celadon
Decoder
* AVC High profile @ Level 5.1 (4k@30fps<mailto:4k@30fps>)
* HEVC Main and Main 10 profile @ Level 5 (4k@30fps<mailto:4k@30fps>)(Main 10 with BT2020 and ST2084 information is not supported)
* VP9 profile 0 @ Level 5 (4k@30fps<mailto:4k@30fps>)
* Vp8 8 bits 1080p@60fps<mailto:1080p@60fps>
Encoder
* AVC High profile @ level 4.1 (1080P@30fps<mailto:1080P@30fps>)
* HEVC Main profile @ Level 4 (1080P@30fps<mailto:1080P@30fps>)
* Art-extension is enabled
* Sdcardfs filesystem support enabled
* Audio decoders supported: MP3, AAC-LC, AAC-ELD, HEAAC, HEAAC-V2, VORBIS, OPUS, MIDI, FLAC, PCM/WAV
* SDHCI host controller is enabled
* eMMC and SATA storage media supported
* Generic storage HAL supported
* Security SELinux enforcing, Trusty TEE, File Based Encryption, Trusty, Keymaster 3.0 User guide:
SELinux Configuration and Rules How to Enable or Disable Trusty for Debugging
Known Issues<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Unable to connect WPA/WPA2 Enterprise Wi-Fi network in Android VM
* Hotplug doesn't work in secondary display
Validation Results<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
|C|<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...> build has been validated on |NUC|<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...> Kit NUC7i5DNH<https://ark.intel.com/products/122488/Intel-NUC-Kit-NUC7i5DNHE> in the following function domains:
Component
Results
Comments
Wi-Fi
OK
Host wifi is switched to Android UI in QEMU
BT
OK
Bluetooth is working
Audio over USB
OK
MP3, AAC-LC, AAC-ELD, HEAAC, HEAAC-V2, VORBIS, OPUS, FLAC, PCM/WAV formats supported
Adb connect over WIFI
OK
Adb connect over Ethernet
OK
Display /Touch and Gesture
OK
Storage/SD Card
OK
Add "-device usb-host,vendorid=,productid=" into startandroidqcow2.sh.
Security
OK
Boot/Kernel
OK
Boots on QEMU 4.2.0
Ethernet
OK
Image Flash
OK
Web browsing
OK
Video playback
OK
H264/H265/MPEG2/VP8/VP9 Video Playback
USB
OK
MTP/PTP Initiator Role
Tools/Configuration<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* QEMU Version 4.2.0
* Host Ubuntu 18.04
* Host Kernel Version 5.3.0.xx
Helpful Hints / Links<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Build Celadon in VM with Android 10 https://01.org/projectceladon/documentation/getting-started/build-source#...
* We can use CIV Q-MR0 image to flash on the KBL NUC as a Bare Metal
* Manifest Link :https://github.com/projectceladon/manifest/blob/master/stable-build/CIV_01.20.01.12_A10.xml
* Binary Link :https://github.com/projectceladon/celadon-binary/blob/master/CIV_01.20.01.12_A10/caas-flashfiles-eng.build.zip
To subscribe/unsubscribe:
- subscribe/unsubscribe celadon mailing list using : https://lists.01.org/postorius/lists/celadon.lists.01.org/
2 years, 1 month
[CELADON P-MR0 Platform Exit Announcement] [KBL NUC] : CELADON_01.20.01.12_A09
by Balan, Swaroop
[cid:image001.png@01D60414.25065F80]
Android PMR0 CELADON_01.20.01.12_A09
[cid:image002.png@01D60414.25065F80]
March 29th 2020 - The Android SI team announces [KBL-NUC PMR0] [PLATFORM EXIT] [CELADON_01.20.01.12_A09]release
This Release supports the following Platforms: KBL NUC NUC7i5DNH:
* Manifest : https://github.com/projectceladon/manifest/blob/master/stable-build/CELAD...
* Release Notes : https://github.com/projectceladon/celadon-documentation/blob/master/sourc...
* Binary : https://github.com/projectceladon/celadon-binary/blob/master/CELADON_01.2...
* Documentation : https://01.org/projectceladon/documentation
CELADON_01.20.01.12_A09<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
This is a Pre-Production Release for evaluation and development purpose and it cannot be used for production purposes. This release is supported on Intel Platform and KBL NUC (NUC7i5DNHE) is the leading platform for PMR0 Bare Metal .
Features<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Graphics Memory Allocator (Gralloc) 1.0
* HDMI display support
* HWC 2.0 support for Display
* Adb & Fastboot supported over USB 2.0 and USB 3.0
* Adb over WIFI and Ethernet is supported
* USB digital audio playback support
* Since no default sound card is present we should connect USB headsset for any BT or media related activities for KBL COMMERCIAL NUC hardware
* Wi-Fi 802.11 a/b/g/n/ac and Bluetooth 4.2
* Wired Ethernet support
* Android Kernelflinger boot support
* Thermal Daemon is enabled for CELADON
* 4K support is enabled on CELADON
* Video Codec support on celadon
Decoder
* AVC High profile @ Level 5.1 (4k@30fps<mailto:4k@30fps>)
* HEVC Main and Main 10 profile @ Level 5 (4k@30fps<mailto:4k@30fps>)(Main 10 with BT2020 and ST2084 information is not supported)
* VP9 profile 0 @ Level 5 (4k@30fps<mailto:4k@30fps>)
* Vp8 8 bits 1080p@60fps<mailto:1080p@60fps>
Encoder
* AVC High profile @ level 4.1 (1080P@30fps<mailto:1080P@30fps>)
* HEVC Main profile @ Level 4 (1080P@30fps<mailto:1080P@30fps>)
* Art-extension is enabled in CELADON
* f2fs filesystem support enabled
* S3 Suspend/Resume is supported
* Audio decoders supported: MP3/AAC-LC/HEAAC/HEAAC-v2/FLAC/VORBIS/OPUS/AMRNB/AMRWB
* Audio Encoders: AAC-LC, AAC ELD, HEAAC, AMR-NB, AMR-WB, WAV
* HDMI audio playback is enabled
* SDHCI host controller is enabled
* Security reference solution - TPM based h/w binding reference implementation
* Selinux: enabled the neverallow check for selinux
* User guide:
* SELinux Configuration and Rules
* How to Enable or Disable Trusty for Debugging
* Flashing binaries via PFT - Platform Flash Tool
* Currently HDMI with stereo is enabled by default to support HDMI audio playback as there is no support for channel map, card and device detection from kernel space.
* To test the multichannel 5.1 channel playback, use setprop vendor.audio.hdmi_multichannel 1 from adb shell and make sure to unplug and re-plug HDMI device before testing . On commercial NUC currently HDMI device port 3 is enabled.
Known Issues<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Lets Drive screen seen, on click of applications under "New User"
* saved system time changes to default after reboot
Validation Results<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
|C|<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...> build has been validated on |NUC|<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...> Kit NUC7i5DNH<https://ark.intel.com/products/122488/Intel-NUC-Kit-NUC7i5DNHE> in the following function domains:
Component
Results
Comments
Wi-Fi
OK
WiFi Direct, WiFi streaming
Wi-Fi Hotspot
OK
BT
OK
Audio over USB
OK
MP3/AAC/MIDI/FLAC/WAV Audio playback
Adb connect over WIFI
OK
Adb connect over Ethernet
OK
Display /Touch and Gesture
OK
Storage/SD Card
OK
Security
OK
Boot/Kernel
OK
USB devices over OTG
OK
Ethernet
OK
Fastboot
OK
Web browsing
OK
Video playback
OK
H264/H265/MPEG2/VP8/VP9 Video Playback
Helpful Hints/Links<https://github.com/projectceladon/celadon-documentation/blob/master/sourc...>
* Manifest Link : https://github.com/projectceladon/manifest/blob/master/stable-build/CELAD...
* Binary Link : https://github.com/projectceladon/celadon-binary/blob/master/CELADON_01.2...
To subscribe/unsubscribe:
- subscribe/unsubscribe celadon mailing list using : https://lists.01.org/postorius/lists/celadon.lists.01.org/
2 years, 1 month
Building Android 10 VM version on NUC
by Sateesh K
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
2 years, 2 months
Re: [CELADON_IVI] USB over DBC on NUC hardware
by Pandey, Prabhat Chand
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>
2 years, 2 months
Re: [CELADON_IVI] USB over DBC on NUC hardware
by Pandey, Prabhat Chand
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>
2 years, 2 months
Re: [CELADON_IVI] USB over DBC on NUC hardware
by Pandey, Prabhat Chand
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>
2 years, 2 months
CiC kernel modules (binderfs) issues
by Zhou Ziyang
Hi,
I tried binderfs driver ( projectceladon<https://github.com/projectceladon>/kernel-modules-cic<https://github.com/projectceladon/kernel-modules-cic>), but not worked in my ubuntu 18.04 server.
The test program is from https://brauner.github.io/2019/01/09/android-binderfs.html
Kernel info:
Linux version 4.15.0-88-generic (buildd@lgw01-amd64-036) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020
Cannot allocate binder device.
frank@ frank:~/workspace$ sudo mount -t binder binder binderfs
frank@ frank:~/workspace$ ll binderfs
total 4
drwxr-xr-x 2 root root 0 Mar 13 08:33 ./
drwxrwxr-x 5 frank frank 4096 Mar 13 08:31 ../
crw------- 1 root root 244, 0 Mar 13 08:33 binder-control
frank@ frank:~/workspace$ sudo ./a.out binderfs/binder-control hwbinder
Invalid argument - Failed to allocate new binder device
Cannot unload from kernel
frank@frank:~/workspace$ sudo umount binderfs
frank@frank:~/workspace$ ll binderfs
total 8
drwxrwxr-x 2 frank frank 4096 Mar 13 07:56 ./
drwxrwxr-x 5 frank frank 4096 Mar 13 08:31 ../
frank@frank:~/workspace$ sudo rmmod binder
binder_module binderfs_module
frank@frank:~/workspace$ sudo rmmod binder
binder_module binderfs_module
frank@frank:~/workspace$ sudo rmmod binderfs_module
rmmod: ERROR: ../libkmod/libkmod-module.c:793 kmod_module_remove_module() could not remove 'binderfs_module': Device or resource busy
rmmod: ERROR: could not remove module binderfs_module: Device or resource busy
BTW,
Where is the source code of ` aic-manager-entry` under https://github.com/projectceladon/vendor-intel-cic/tree/master/host/docke... I checked the `aic` script, and understand binder devices are all allocated in host side. Whether binderfs syscall resides in ` aic-manager-entry ` binary?
Thanks in advance.
2 years, 2 months
Re: [CELADON_IVI] USB over DBC on NUC hardware
by Pandey, Prabhat Chand
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>
2 years, 2 months