AOSP 9 ADB over USB not showing up

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AOSP 9 ADB over USB not showing up

Jump to solution
3,496 Views
nxpsri
Contributor II

When I enable adb on my AOSP 9 imx6 device, on my Linux development host this happens:

'lsusb' output on my Linux laptop connected to the device via OTG-microUSB port:

BEFORE enabling ADB on device

(base) popossri@pop-os:~/ArcX/mercury_files/manifest/jenkins/Android$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f2:b685 Chicony Electronics Co., Ltd Chicony USB2.0 Camera
Bus 001 Device 021: ID 18d1:4ee1 Google Inc. Nexus/Pixel Device (MTP)
Bus 001 Device 004: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Bus 001 Device 010: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

AFTER enabling ADB on device
(base) popossri@pop-os:~/ArcX/mercury_files/manifest/jenkins/Android$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f2:b685 Chicony Electronics Co., Ltd Chicony USB2.0 Camera
Bus 001 Device 004: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Bus 001 Device 010: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

On my Samsung phone, I have to enable USB debugging using special instructions before it can be used by ADB. I tried doing that by changing device.mk so that my /system/build.prop has the following entries:

persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb

But the device doesn't show up in 'adb devices' .

TCP(ethernet) based adb connection works just fine.What else should I check and enable?

Tags (3)
0 Kudos
1 Solution
2,972 Views
nxpsri
Contributor II

It turned out that the serial number ro.serialno was not passed in as kernel command line argument. Once that was fixed in BoardConfig.mk, ADB over USB worked and the device showed up on both Linux and Windows hosts.

View solution in original post

Tags (2)
0 Kudos
2 Replies
3,134 Views
nxpsri
Contributor II

Based on what I read on other stackoverflow posts , I have enabled these properties:

:/ # getprop **persist.sys.usb.config                                    
ptp,adb**

:/ # getprop | grep usb                                                
[init.svc.usb-hal-1-1]: [running]

[init.svc.usbd]: [stopped]

[persist.sys.usb.config]: [ptp,adb]

[ro.boottime.usb-hal-1-1]: [11083523334]

[ro.boottime.usbd]: [11451505001]


**[sys.usb.config]: [ptp,adb]**

[sys.usb.configfs]: [2]

[sys.usb.controller]: [ci_hdrc.0]


[sys.usb.ffs.ready]: [0]

[sys.usb.mtp.device_type]: [3]
**[service.adb.tcp.port]:   [-1]**
                               
[vendor.usb.config]: [ci_hdrc.0]

Also, I have enabled 'USB debugging' in developer settings. But despite setting [sys.oem_unlock_allowed]: [1], I could not enable OEM unlocking'. Perhaps its because we're using a custom bootloader, not U-boot?

Finally, adb devices -l on a Ubuntu host connected to the device does not list the AOSP9 device and ADB over USB hasn't worked so far.

What can I try next to resolve this?

Tags (3)
0 Kudos
2,973 Views
nxpsri
Contributor II

It turned out that the serial number ro.serialno was not passed in as kernel command line argument. Once that was fixed in BoardConfig.mk, ADB over USB worked and the device showed up on both Linux and Windows hosts.

Tags (2)
0 Kudos