This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

The ADB of Android O can't work

Other Parts Discussed in Thread: DRA742

Hi sir,

I bring up successfully with Android o on  "DRA74x EVM REV"  board, it can enter into the Android home UI, and if I connect the mouse, it can work fine, but the adb function don't work, I set the use mode to "device", but there are nothing output when insert the board to Ubuntu, so do you have some configuration to do this, I want to enable the adb function. thanks a lot.

jacinto6evm:/sys/kernel/debug # ls
48890000.usb extfrag mmc1 pvr suspend_stats
488d0000.usb fault_around_bytes omap_iommu pwm sync
asoc gpio omap_mux ras tracing
bdi hid omapdss regmap ubi
binder ieee80211 opp regulator ubifs
clk iio pinctrl remoteproc usb
dma_buf memblock pm_debug sched_features wakeup_sources
dri mmc0 pm_qos sleep_time
jacinto6evm:/sys/kernel/debug # cd 48890000.usb/
jacinto6evm:/sys/kernel/debug/48890000.usb # ls
link_state mode regdump testmode
jacinto6evm:/sys/kernel/debug/48890000.usb # cat mode
host
jacinto6evm:/sys/kernel/debug/48890000.usb # cd ..
jacinto6evm:/sys/kernel/debug # ls
48890000.usb extfrag mmc1 pvr suspend_stats
488d0000.usb fault_around_bytes omap_iommu pwm sync
asoc gpio omap_mux ras tracing
bdi hid omapdss regmap ubi
binder ieee80211 opp regulator ubifs
clk iio pinctrl remoteproc usb
dma_buf memblock pm_debug sched_features wakeup_sources
dri mmc0 pm_qos sleep_time
jacinto6evm:/sys/kernel/debug # cd 488d0000.usb/
jacinto6evm:/sys/kernel/debug/488d0000.usb # ls
link_state mode regdump testmode
jacinto6evm:/sys/kernel/debug/488d0000.usb # cat mode
device
jacinto6evm:/sys/kernel/debug/488d0000.usb # ls
link_state mode regdump testmode
jacinto6evm:/sys/kernel/debug/488d0000.usb # cd ..
jacinto6evm:/sys/kernel/debug # ls
48890000.usb extfrag mmc1 pvr suspend_stats
488d0000.usb fault_around_bytes omap_iommu pwm sync
asoc gpio omap_mux ras tracing
bdi hid omapdss regmap ubi
binder ieee80211 opp regulator ubifs
clk iio pinctrl remoteproc usb
dma_buf memblock pm_debug sched_features wakeup_sources
dri mmc0 pm_qos sleep_time
jacinto6evm:/sys/kernel/debug #

  • update the kernel log:
    jacinto6evm:/ # dmesg | grep usb
    [ 0.485417] usbcore: registered new interface driver usbfs
    [ 0.485476] usbcore: registered new interface driver hub
    [ 0.485569] usbcore: registered new device driver usb
    [ 2.373864] usbcore: registered new interface driver xpad
    [ 2.379329] usbcore: registered new interface driver usb_acecad
    [ 2.385336] usbcore: registered new interface driver aiptek
    [ 2.390975] usbcore: registered new interface driver gtco
    [ 2.396468] usbcore: registered new interface driver hanwang
    [ 2.402215] usbcore: registered new interface driver kbtab
    [ 2.660000] usbcore: registered new interface driver usbhid
    [ 2.665671] usbhid: USB HID core driver
    [ 2.739306] usbcore: registered new interface driver snd-usb-audio
    [ 3.311374] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 3.318190] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 3.325459] usb usb1: Product: xHCI Host Controller
    [ 3.330354] usb usb1: Manufacturer: Linux 4.4.91-00002-g4367150-dirty xhci-hcd
    [ 3.337619] usb usb1: SerialNumber: xhci-hcd.1.auto
    [ 3.364086] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [ 3.372312] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
    [ 3.379128] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 3.386391] usb usb2: Product: xHCI Host Controller
    [ 3.391303] usb usb2: Manufacturer: Linux 4.4.91-00002-g4367150-dirty xhci-hcd
    [ 3.398553] usb usb2: SerialNumber: xhci-hcd.1.auto
    [ 4.066111] init: Added '/init.usb.rc' to import list
    [ 4.085383] init: Added '/init.usb.configfs.rc' to import list
    [ 4.102902] init: Parsing file /init.usb.rc...
    [ 4.132672] init: Added '/vendor/etc/init/hw/init.jacinto6evmboard.usb.rc' to import list
    [ 4.141167] init: Parsing file /vendor/etc/init/hw/init.jacinto6evmboard.usb.rc...
    [ 4.149509] init: Parsing file /init.usb.configfs.rc...
    [ 4.492110] init: Parsing file /vendor/etc/init/android.hardware.usb@1.0-service.rc...
    [ 4.541303] ueventd: /sys/ rule /sys/devices/virtual/usb_composite/* enable
    [ 5.105518] usbcore: registered new interface driver usb-storage
    [ 11.571498] init: computing context for service 'usb-hal-1-0'
    [ 11.577504] init: starting service 'usb-hal-1-0'...
    [ 12.271393] init: processing action (persist.sys.usb.config=* && boot)
    [ 12.301321] init: processing action (sys.usb.config=adb && sys.usb.configfs=1)
    [ 12.805341] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1)
    [ 12.814953] init: write_file: Unable to write to '/config/usb_gadget/g1/UDC': No such device
    [ 36.239395] usb 1-1: new low-speed USB device number 2 using xhci-hcd
    [ 36.395578] usb 1-1: New USB device found, idVendor=1bcf, idProduct=0005
    [ 36.403633] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
    [ 36.417772] usb 1-1: Product: USB Optical Mouse
    [ 36.435754] usb 1-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    [ 36.470370] input: USB Optical Mouse as /devices/platform/44000000.ocp/48880000.omap_dwc3_1/48890000.usb/xhci-hcd.1.auto/usb1/1-1/1-1:1.0/0003:1BCF:0005.0001/input/input0
    [ 36.491667] hid-generic 0003:1BCF:0005.0001: input,hidraw0: USB HID v1.10 Mouse [USB Optical Mouse] on usb-xhci-hcd.1.auto-1/input0
    jacinto6evm:/ # lspci -k
    /system/bin/sh: lspci: not found
    127|jacinto6evm:/ #
  • Hi,

    can you check if USB debugging mode is enabled as described here:
    developer.android.com/.../adb.html

    Also on your Ubuntu host can you try to run following commands:

    adb kill-server
    sudo adb start-server
    adb devices

    and see if you are able to see the device listed.

    Regards,
    Yordan
  • user5253578,

    1) Are you using the current Proc SDK Android Automotive Release 6AO.1.O ?

    2) Are you changing Android kernel configuration / DT property especially related to usb and gadget mode ?

    3) Are you using adb from the Android Built system
    >>adb --version should show something like this
    Android Debug Bridge version 1.0.39
    Revision 3d975c7803f4-android

    you can find adb binary from release package
    software-dl.ti.com/.../6AO_1_0_emmc.tgz

    4) Are you changing anything in device/ti/jacinto6evm/init.jacinto6evmboard.usb.rc ?
    >> what does getprop show from serial prompt
    ex:
    [sys.usb.config]: [mtp,adb]
    [sys.usb.configfs]: [1]
    [sys.usb.controller]: [488d0000.usb]
    [sys.usb.ffs.ready]: [1]
    [sys.usb.mtp.device_type]: [3]
    [sys.usb.state]: [adb]

    5) when you run adb devices, the following is expected to be seen in kernel log
    [ 128.118395] android_work: sent uevent USB_STATE=DISCONNECTED
    [ 128.232114] android_work: sent uevent USB_STATE=CONNECTED
    [ 128.237599] android_work: sent uevent USB_STATE=DISCONNECTED
    [ 128.375989] android_work: sent uevent USB_STATE=CONNECTED
    [ 128.381752] configfs-gadget gadget: high-speed config #1: b
    [ 128.387950] android_work: sent uevent USB_STATE=CONFIGURED

    --

    This should help in narrowing down your issue.
  • thanks Yordan for quickly response.

    I checked the "developer.android.com/.../adb.html", and try again. it don't work, it seems that the Ubuntu host don't recognize the USB device when the board stay in the USB device mode.

    I run the "lsusb" in the Ubuntu host, there is nothings, checked the kernel log (dmesg) in the board, also there are no output.

    Thanks
    Jackie

  • thanks sir, many thanks,

    1) yes, I used the Android Automotive Release 6AO.1.O from processors.wiki.ti.com/.../6AO.1.0_Release_Notes
    2) yes, I don't change the related usb configuration , but I changed the usb dts, I will upload the files.
    3)yeah, I used the same adb tools with you said , used the adb tool under the "emmc_files" folder
    4)yes, I changed this file "init.jacinto6evmboard.usb.rc" only for showing the screen with HDMI, I will upload this files.
    5) this is my configuration with my board, please help to double check it.
    |jacinto6evm:/ # getprop | grep usb
    [init.svc.usb-hal-1-0]: [running]
    [persist.sys.usb.config]: [adb]
    [ro.boottime.usb-hal-1-0]: [6535062623]
    [sys.usb.config]: [mtp,adb]
    [sys.usb.configfs]: [1]
    [sys.usb.controller]: [48890000.usb]
    [sys.usb.ffs.mtp.ready]: [1]
    [sys.usb.ffs.ready]: [0]
    [sys.usb.state]: [mtp,adb]

    |jacinto6evm:/ # getprop | grep svc
    [init.svc.adbd]: [running]
    [init.svc.audio-hal-2-0]: [running]
    [init.svc.audioserver]: [running]
    [init.svc.bootanim]: [stopped]
    [init.svc.camera-provider-2-4]: [running]
    [init.svc.cameraserver]: [running]
    [init.svc.configstore-hal-1-0]: [running]
    [init.svc.console]: [running]
    [init.svc.drm]: [running]
    [init.svc.gatekeeperd]: [running]
    [init.svc.gralloc-2-0]: [running]
    [init.svc.healthd]: [running]
    [init.svc.hidl_memory]: [running]
    [init.svc.hostapd]: [stopped]
    [init.svc.hwservicemanager]: [running]
    [init.svc.installd]: [running]
    [init.svc.keymaster-3-0]: [running]
    [init.svc.keystore]: [running]
    [init.svc.lad_dra7xx]: [running]
    [init.svc.lmkd]: [running]
    [init.svc.logd]: [running]
    [init.svc.logd-reinit]: [stopped]
    [init.svc.media]: [running]
    [init.svc.mediacodec]: [running]
    [init.svc.mediadrm]: [running]
    [init.svc.mediaextractor]: [running]
    [init.svc.mediametrics]: [running]
    [init.svc.netd]: [running]
    [init.svc.pvrsrvinit]: [stopped]
    [init.svc.servicemanager]: [running]
    [init.svc.storaged]: [running]
    [init.svc.surfaceflinger]: [running]
    [init.svc.tombstoned]: [running]
    [init.svc.ueventd]: [running]
    [init.svc.usb-hal-1-0]: [running]
    [init.svc.vehicle-hal-2.0]: [running]
    [init.svc.vndservicemanager]: [running]
    [init.svc.vold]: [running]
    [init.svc.webview_zygote32]: [running]
    [init.svc.wifi_hal_legacy]: [running]
    [init.svc.wificond]: [running]
    [init.svc.wpa_supplicant]: [stopped]
    [init.svc.zygote]: [running]

    jacinto6evm:/ # getprop | grep adb
    [init.svc.adbd]: [running]
    [persist.sys.usb.config]: [adb]
    [ro.boottime.adbd]: [7381172311]
    [sys.usb.config]: [mtp,adb]
    [sys.usb.state]: [mtp,adb]
    jacinto6evm:/ #

    5) but I run the adb devices, there is no log output in the kernel log.

    Note, I found another things, there is no "android.c" file in the kernel driver under " drivers/usb/gadget", I think maybe there is no android driver to lead this issue, it seems that the ubuntu host can't recognize the board when the board stay in the usb device mode.
    jacinto6evm:/ # lsusb
    Bus 001 Device 001: ID 1d6b:0002
    Bus 002 Device 001: ID 1d6b:000

    Thanks
    Jackie
  • I uploaded the dra7-evm-common.dtsi  dra7-evm.dts and init.jacinto6evmboard.usb.rc in the related_files.7z

    related_files.7z

  • Hi Jackie,

    ADB now works via USB ConfigFS, there is no separate android USB driver (This was the case in older Kernels).
    The micro USB port on the EVM (the one used for fastboot flashing) is by default enabled for ADB.

    Did you try connecting Linux PC to micro USB port?
    The port next to HDMI connector.

    Regards,
    Vishal
  • Hi  Vishal,

    I checked all the related ConfigFS  configuration,  but it seems that the otg connection is not stale, then it lead to this issue, it show  the following message.

    "

    [   10.239101] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered

    [   10.249111] android_work: did not send uevent (0 0   (null))

    [   10.255982] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller

    [   10.263652] android_work: did not send uevent (0 0   (null))

    "

    I attached the kernel log, 8231.session.log

    thanks

    Jackie

  • Hi Jackie,

    No change is needed in init.jacinto6evmboard.usb.rc file for bringing up TI EVM with TI Android SDK release.
    The log is showing continuous connect/disconnect in USB connection.

    Couple of things to try,
    1) Try not using ADB via USB3.0 connection, connect the cable to a USB2.0 port on your PC or use a non USB3.0 cable.
    2) Make sure ADB host binary (for Linux PC) is from Android O, kill the old instance and try again. Commands below
        adb kill-server
        adb devices


    Regards,
    Vishal

  • Hi Jackie,

    Any update on the suggestions provided?

    Regards,
    Vishal

  • hi Vishal,

    thanks for your support, followed your instruction, it get the the same result, same phenomenon, same logs,  the adb can't work . Maybe i used the 

    DRA74x EVM REV leading to this issue, I don't know, I am continuing to debug it.

    Listed the board info:

    CPU : DRA752-GP ES1.1
    Model: TI DRA742
    Board: DRA74x EVM REV

    thanks
    jackie

  • Hi Jackie,

    Some basic question,

    Are you running on TI EVM with pre built release binaries?

    Regards,
    Vishal

  • no, the reference board is damaged, so I don't verify it, but we make the new device only replacing some similar component and reducing some unused component.

    thanks
    Jackie
  • Hi,

    Are these correct GPIOs for your board design?

    extcon_usb1: extcon_usb1 {
        compatible = "linux,extcon-usb-gpio";
        id-gpio = <&gpio6 12 GPIO_ACTIVE_HIGH>;
    };

    extcon_usb2: extcon_usb2 {
        compatible = "linux,extcon-usb-gpio";
        id-gpio = <&gpio6 13 GPIO_ACTIVE_HIGH>;
    };

    Which USB port are you using for ADB? usb1 or usb2?

    Regards,
    Vishal

  • yes, the GPIO is corrected, I wan to use the 'usb1' for adb, but if i set all the 'dr_mode' to host, the mouse can be worked.

    Thanks
    Jackie
  • now I set the usb1 dr_mode to "otg" or "peripheral", it also can't work.

    &usb1 {
    - dr_mode = "otg";
    + dr_mode = "peripheral";
    };

    Thanks
    Jackie
  • Hi Jackie,

    We may have to look at schematics of the board on why only host mode works, but peripheral mode does not work.

    Regards,
    Vishal

  • Hi Jackie,

    Any further update on this issue?

    Regards,
    Vishal

  • I'm on a business trip, sorry for late reply, I attached the design, please help to check it. thanks a lot.

    USB 连接图.xlsx

  • Have you verified that VBUS is on? In device mode the, the USB needs to detect a VBUS signal to function.
  • thanks yang, yes, it is no now .

    Thanks
    Jackie

  • extcon_usb1: extcon_usb1 {
    compatible = "linux,extcon-usb-gpio";
    id-gpio = <&gpio6 12 GPIO_ACTIVE_HIGH>;
    };


    extcon_usb2: extcon_usb2 {
    compatible = "linux,extcon-usb-gpio";
    id-gpio = <&gpio6 13 GPIO_ACTIVE_HIGH>;
    };

    the usb VBUS is on now.
  • Is device mode functional now?
  • yes, it is peripheral mode now,


    &usb1 {
    dr_mode = "peripheral";
    };

    &usb2 {
    dr_mode = "host";
    };
  • So, the issue s resolved?
  • no, the adb is not still working...
  • Can you try changing the dts from id-gpio to vbus-gpio

  • it is still not working, I run "lsusb" , it can't find the device node.  and there are no output from the dmesg log. it seems that USB is not working under "device" mode.

  • 130|jacinto6evm:/sys/kernel/debug/48890000.usb # dmesg | grep usb2
    [ 0.424475] [hahahahadrivers/of/platform.c of_device_alloc 142] bus->name = extcon_usb2, of_get_property(...) = linux,extcon-usb-gpio
    [ 0.744857] [hahahahadrivers/of/platform.c of_device_alloc 142] bus->name = phy, of_get_property(...) = ti,dra7x-usb2
    [ 0.745077] [hahahahadrivers/of/platform.c of_device_alloc 142] bus->name = phy, of_get_property(...) = ti,dra7x-usb2-phy2
    [ 6.968161] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [ 6.976387] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
    [ 6.983215] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 6.990467] usb usb2: Product: xHCI Host Controller
    [ 6.995377] usb usb2: Manufacturer: Linux 4.4.91-00005-gbc80c55-dirty xhci-hcd
    [ 7.002638] usb usb2: SerialNumber: xhci-hcd.1.auto
    mesg | grep usb1 <
    [ 0.422916] [hahahahadrivers/of/platform.c of_device_alloc 142] bus->name = extcon_usb1, of_get_property(...) = linux,extcon-usb-gpio
    [ 6.915437] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 6.922277] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 6.929529] usb usb1: Product: xHCI Host Controller
    [ 6.934443] usb usb1: Manufacturer: Linux 4.4.91-00005-gbc80c55-dirty xhci-hcd
    [ 6.941707] usb usb1: SerialNumber: xhci-hcd.1.auto
    jacinto6evm:/sys/kernel/debug/48890000.usb #


    it show "We don't know the algorithms for LPM for this host, disabling LPM." , How to clear above message ?
  • Hi,

    USB2 in your setup is in host mode right? Should you be looking for USB1 logs?
    The print "We don't know the algorithms for LPM for this host, disabling LPM." is OK for host. We see that in working case also.

    Regards,
    Vishal