ADB not seeing android device on VHclient

19 posts / 0 new
Last post
dragana_pay
ADB not seeing android device on VHclient

Hello,

I am trying to connect my android device over the network to a Jenkins build machine. So I installed a server on my Windows 10 and client on my CentOS 6.5 (Jenkins), when I use ./vhclientx86_64 -t LIST it shows my windows hub and the devices, for the android device is says ( In-use by you) but when I try to list the adb devices the list is empty. I tried with restarting the adb server, also tried restarting the client and the server.

Michael
.

Can you type

grep vhusbd /var/log/syslog

and post the output

dragana_pay
I can't find /var/log/syslog

I can't find /var/log/syslog also vhusbd, this is from /var/log/messages

Feb 27 13:08:28 Jenkins_Payment VirtualHere Client: VirtualHere Client 4.9.7 starting (Compiled: Jan 27 2020 22:47:15)
Feb 27 13:08:28 Jenkins_Payment VirtualHere Client: Client OS is Linux 2.6.32-431.el6.x86_64 x86_64
Feb 27 13:08:28 Jenkins_Payment VirtualHere Client: Using config at /root/.vhui
Feb 27 13:08:28 Jenkins_Payment VirtualHere Client: IPC available at /tmp/vhclient
Feb 27 13:08:28 Jenkins_Payment VirtualHere Client: Auto-find using Bonjour - on
Feb 27 13:08:28 Jenkins_Payment VirtualHere Client: Auto-find using Bonjour SSL - on
Feb 27 13:08:58 Jenkins_Payment VirtualHere Client: VirtualHere USB Server Trial Edition (10.200.86.23:7575)
Feb 27 13:10:17 Jenkins_Payment VirtualHere Client: There was a error using this device.
Feb 27 13:10:45 Jenkins_Payment VirtualHere Client: Connection 1 remotely disconnected gracefully (rx)
Feb 27 13:10:56 Jenkins_Payment VirtualHere Client: Server ping timeout, shutting down connection 1...
Feb 27 13:10:58 Jenkins_Payment VirtualHere Client: VirtualHere USB Server Trial Edition (10.200.86.23:7575)
Feb 27 13:11:14 Jenkins_Payment VirtualHere Client: There was a error using this device.
Feb 27 13:15:40 Jenkins_Payment VirtualHere Client: VirtualHere Client 4.9.7 starting (Compiled: Jan 27 2020 22:47:15)
Feb 27 13:15:40 Jenkins_Payment VirtualHere Client: Client OS is Linux 2.6.32-431.el6.x86_64 x86_64
Feb 27 13:15:40 Jenkins_Payment VirtualHere Client: Using config at /root/.vhui
Feb 27 13:15:40 Jenkins_Payment VirtualHere Client: IPC available at /tmp/vhclient
Feb 27 13:15:40 Jenkins_Payment VirtualHere Client: Auto-find using Bonjour - on
Feb 27 13:15:40 Jenkins_Payment VirtualHere Client: Auto-find using Bonjour SSL - on
Feb 27 13:15:40 Jenkins_Payment VirtualHere Client: VirtualHere USB Server Trial Edition (10.200.86.23:7575)
Feb 27 13:19:23 Jenkins_Payment VirtualHere Client: Server ping timeout, shutting down connection 1...
Feb 27 13:19:23 Jenkins_Payment VirtualHere Client: Connection 1 remotely disconnected gracefully (rx)
Feb 27 13:19:23 Jenkins_Payment kernel: vhci_hcd: not connected 4
Feb 27 13:21:11 Jenkins_Payment VirtualHere Client: VirtualHere USB Server Trial Edition (10.200.86.23:7575)

[root@Jenkins_Payment init.d]# ./vhclientx86_64 -t LIST
VirtualHere Client IPC, below are the available devices:
(Value in brackets = address, * = Auto-Use)

Windows Hub (DRA-STO-PAY-LT:7575)
--> Android (DRA-STO-PAY-LT.14) (In-use by you)
--> 0x07dc (DRA-STO-PAY-LT.6)
--> 0x003f (DRA-STO-PAY-LT.5)
--> Laptop_Integrated_Webcam_HD (DRA-STO-PAY-LT.3)
--> USB Optical Mouse (DRA-STO-PAY-LT.13)
--> 2.4G Mouse (DRA-STO-PAY-LT.2)

Auto-Find currently on
Auto-Use All currently off
Reverse Lookup currently off
Reverse SSL Lookup currently off
VirtualHere Client not running as a service

Michael
.

No that kernel is way too old, its not going to work

dragana_pay
okay thank you :)

okay thank you :)

dragana_pay
I tried the client on CentOS7

I tried the client on CentOS7 with a newer kernel, this is the output from /var/log/messages, it doesn't seem to connect to the server at all.

Feb 28 01:39:01 localhost systemd: Time has been changed
Feb 28 01:39:07 localhost kernel: e1000: ens33 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
Feb 28 01:39:07 localhost NetworkManager[758]: [1582871947.4589] device (ens33): carrier: link connected
Feb 28 01:39:39 localhost kernel: e1000: ens33 NIC Link is Down
Feb 28 02:15:03 localhost systemd: Time has been changed
Feb 28 02:16:18 localhost chronyd[732]: Forward time jump detected!
Feb 28 02:23:39 localhost kernel: e1000: ens33 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
Feb 28 02:23:39 localhost NetworkManager[758]: [1582874619.6797] device (ens33): carrier: link connected
Feb 28 02:24:40 localhost systemd: Created slice User Slice of root.
Feb 28 02:24:40 localhost systemd: Started Session 13 of user root.
Feb 28 02:24:40 localhost systemd-logind: New session 13 of user root.
Feb 28 02:24:41 localhost systemd: Started Session 14 of user root.
Feb 28 02:24:41 localhost systemd-logind: New session 14 of user root.
Feb 28 02:27:01 localhost chronyd[732]: Selected source 79.99.56.71
Feb 28 02:27:05 localhost chronyd[732]: Selected source 87.120.166.8
Feb 28 02:28:06 localhost chronyd[732]: Selected source 79.99.56.71
Feb 28 02:28:09 localhost journal: VirtualHere Client: VirtualHere Client 4.9.7 starting (Compiled: Jan 27 2020 22:47:15)
Feb 28 02:28:09 localhost journal: VirtualHere Client: Client OS is Linux 3.10.0-1062.12.1.el7.x86_64 x86_64
Feb 28 02:28:09 localhost journal: VirtualHere Client: Using config at /root/.vhui
Feb 28 02:28:09 localhost journal: VirtualHere Client: IPC available at /tmp/vhclient
Feb 28 02:28:09 localhost journal: VirtualHere Client: Auto-find using Bonjour - on
Feb 28 02:28:09 localhost journal: VirtualHere Client: Auto-find using Bonjour SSL - on
Feb 28 02:28:10 localhost chronyd[732]: Selected source 87.120.166.8
Feb 28 02:28:18 localhost systemd: Started Session 15 of user root.
Feb 28 02:28:18 localhost systemd-logind: New session 15 of user root.
Feb 28 02:28:18 localhost systemd: Started Session 16 of user root.
Feb 28 02:28:18 localhost systemd-logind: New session 16 of user root.

This is the output from the server log

2020-02-28 08:27:49 INFO :>>> Starting VirtualHere USB Server v4.0.9 (Built: Jan 4 2020, 20:50:57)<<<
2020-02-28 08:27:49 INFO :Using configuration C:\Users\Dragana.Stojanovikj\Downloads\config.ini
2020-02-28 08:27:49 INFO :Server licensed to=unlicensed max_devices=1
2020-02-28 08:27:49 INFO :Listening on all network interfaces at TCP port 7575 (IPv6 dual-stack)
2020-02-28 08:27:50 INFO :Tickled device USB\VID_0C45&PID_649D\6&2DEEA478&0&6 when getting prod/vend strings
2020-02-28 08:27:50 INFO :Found Low speed device [093a:2510] "PixArt, USB Optical Mouse" at address 1
2020-02-28 08:27:50 INFO :Found Full speed device [1ea7:0064] "0x1ea7, 2.4G Mouse" at address 2
2020-02-28 08:27:51 INFO :Found High speed device [0c45:649d] "CNFCH52K137010003HE1, Laptop_Integrated_Webcam_HD" at address 3
2020-02-28 08:27:51 INFO :Found High speed device [05c6:9091] "Android, Android" at address 4
2020-02-28 08:27:51 INFO :Found Full speed device [138a:003f] "0x138a, 0x003f" at address 5
2020-02-28 08:27:51 INFO :Found Full speed device [8087:07dc] "0x8087, 0x07dc" at address 6

And this is from the dmesg

[ 123.376907] Request for unknown module key 'The ELRepo Project (http://elrepo.org): ELRepo.org Secure Boot Key: f365ad3481a7b20e3427b61b2a26635b83fe427b' err -11
[ 123.376919] usbip_core: loading out-of-tree module taints kernel.
[ 123.377114] usbip_core: module verification failed: signature and/or required key missing - tainting kernel
[ 123.379126] usbip_core: USB/IP Core v1.0.0
[ 123.379286] Request for unknown module key 'The ELRepo Project (http://elrepo.org): ELRepo.org Secure Boot Key: f365ad3481a7b20e3427b61b2a26635b83fe427b' err -11
[ 123.380478] vhci_hcd vhci_hcd: USB/IP Virtual Host Controller
[ 123.393377] vhci_hcd vhci_hcd: new USB bus registered, assigned bus number 3
[ 123.638378] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 3.10
[ 123.638384] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 123.638388] usb usb3: Product: USB/IP Virtual Host Controller
[ 123.638391] usb usb3: Manufacturer: Linux 3.10.0-1062.12.1.el7.x86_64 vhci_hcd
[ 123.638393] usb usb3: SerialNumber: vhci_hcd
[ 123.640630] hub 3-0:1.0: USB hub found
[ 123.640717] hub 3-0:1.0: 8 ports detected

Michael
.

Remember centos likes blocking most ports. So you need to open UDP 5353 to allow auto-find to work in the client and TCP 7575 for communications

dragana_pay
2020-02-28 10:04:45 INFO

2020-02-28 10:04:45 INFO :Unmanaging device 6 [8087:07dc]
2020-02-28 10:04:46 ERROR :Calling CM_Get_DevNode_PropertyW (Class) failed for USB\VID_8087&PID_07DC\7&4653FB5&0&2, error CR_NO_SUCH_DEVNODE or CR_NO_SUCH_DEVINST
2020-02-28 10:04:46 ERROR :CreateFile failed while completing capture of device USB\VID_8087&PID_8000\5&391495ED&0&1,USB\VID_05C6&PID_9091\0123456789ABCDEF,5, The system cannot find the file specified. (0x00000002)
2020-02-28 10:04:47 ERROR :Calling CM_Get_DevNode_PropertyW (Class) failed for USB\VID_8087&PID_07DC\7&4653FB5&0&2, error CR_NO_SUCH_DEVNODE or CR_NO_SUCH_DEVINST
2020-02-28 10:04:47 INFO :Found High speed device [05c6:9091] "Android, Android" at address 9
2020-02-28 10:04:47 INFO :Unmanaging device 4 [05c6:9091]
2020-02-28 10:04:47 WARNING :Failed to locate root devnode when rescanning, 13
2020-02-28 10:04:47 ERROR :Error binding device 4 [05c6:9091] to connection 1, BIND_ERROR
2020-02-28 10:04:48 ERROR :Calling CM_Get_DevNode_PropertyW (Class) failed for USB\VID_8087&PID_07DC\7&4653FB5&0&2, error CR_NO_SUCH_DEVNODE or CR_NO_SUCH_DEVINST
2020-02-28 10:05:12 ERROR :Cannot initiate capture of device at address 4, perhaps its disappeared?
2020-02-28 10:05:12 ERROR :Error binding device 4 [0000:0000] to connection 1, BIND_ERROR
2020-02-28 10:05:16 ERROR :Calling CM_Get_DevNode_PropertyW (Class) failed for USB\VID_8087&PID_07DC\7&4653FB5&0&2, error CR_NO_SUCH_DEVNODE or CR_NO_SUCH_DEVINST
2020-02-28 10:05:16 INFO :Unmanaging device 9 [05c6:9091]
2020-02-28 10:05:17 ERROR :Calling CM_Get_DevNode_PropertyW (Class) failed for USB\VID_8087&PID_07DC\7&4653FB5&0&2, error CR_NO_SUCH_DEVNODE or CR_NO_SUCH_DEVINST
2020-02-28 10:05:17 INFO :Found High speed device [05c6:9091] "Android, Android" at address 4
2020-02-28 10:05:36 ERROR :Calling CM_Get_DevNode_PropertyW (Class) failed for USB\VID_8087&PID_07DC\7&4653FB5&0&2, error CR_NO_SUCH_DEVNODE or CR_NO_SUCH_DEVINST
2020-02-28 10:05:36 ERROR :Calling CM_Get_DevNode_PropertyW (Class) failed for USB\VID_8087&PID_07DC\7&4653FB5&0&2, error CR_NO_SUCH_DEVNODE or CR_NO_SUCH_DEVINST
2020-02-28 10:05:37 ERROR :CreateFile failed while completing capture of device USB\VID_8087&PID_8000\5&391495ED&0&1,USB\VID_05C6&PID_9091\0123456789ABCDEF,5, The system cannot find the file specified. (0x00000002)
2020-02-28 10:05:37 ERROR :Calling CM_Get_DevNode_PropertyW (Class) failed for USB\VID_8087&PID_07DC\7&4653FB5&0&2, error CR_NO_SUCH_DEVNODE or CR_NO_SUCH_DEVINST
2020-02-28 10:05:37 INFO :Found High speed device [05c6:9091] "Android, Android" at address 9
2020-02-28 10:05:37 INFO :Unmanaging device 4 [05c6:9091]
2020-02-28 10:05:38 WARNING :Failed to locate root devnode when rescanning, 13
2020-02-28 10:05:38 ERROR :Error binding device 4 [05c6:9091] to connection 1, BIND_ERROR
2020-02-28 10:05:39 ERROR :Calling CM_Get_DevNode_PropertyW (Class) failed for USB\VID_8087&PID_07DC\7&4653FB5&0&2, error CR_NO_SUCH_DEVNODE or CR_NO_SUCH_DEVINST

Michael
.

I think you need to be using linux as a server instead of windows. Your android device is dropping from the USB bus

dragana_pay
.

Thank you, I tried the server on CentOS 7, but it still seems to have a problems:
This is /var/log/messages on the client side

Feb 28 05:10:09 localhost kernel: vhci_hcd vhci_hcd: rhport(0) sockfd(11) devid(4) speed(3) speed_str(high-speed)
Feb 28 05:10:09 localhost kernel: usb 3-1: new high-speed USB device number 17 using vhci_hcd
Feb 28 05:10:09 localhost kernel: usb 3-1: new high-speed USB device number 18 using vhci_hcd
Feb 28 05:10:09 localhost kernel: usb usb3-port1: attempt power cycle
Feb 28 05:10:10 localhost kernel: usb 3-1: new high-speed USB device number 19 using vhci_hcd
Feb 28 05:10:10 localhost kernel: usb 3-1: SetAddress Request (19) to port 0
Feb 28 05:10:10 localhost kernel: usb 3-1: New USB device found, idVendor=05c6, idProduct=9091, bcdDevice= 3.10
Feb 28 05:10:10 localhost kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 28 05:10:10 localhost kernel: usb 3-1: Product: Android
Feb 28 05:10:10 localhost kernel: usb 3-1: Manufacturer: Android
Feb 28 05:10:10 localhost kernel: usb 3-1: SerialNumber: 0123456789ABCDEF
Feb 28 05:10:10 localhost kernel: usb 3-1: can't set config #1, error -1
Feb 28 05:10:10 localhost kernel: vhci_hcd: connection closed
Feb 28 05:10:10 localhost kernel: vhci_hcd: connection closed
Feb 28 05:10:10 localhost kernel: vhci_hcd: stop threads
Feb 28 05:10:10 localhost kernel: vhci_hcd: release socket
Feb 28 05:10:10 localhost kernel: vhci_hcd: disconnect device
Feb 28 05:10:10 localhost kernel: usb 3-1: USB disconnect, device number 19

And this is /var/log/messages on the server side

Feb 28 05:10:50 localhost kernel: usb 3-1: reset high-speed USB device number 3 using xhci_hcd
Feb 28 05:10:55 localhost kernel: usb 3-1: device descriptor read/64, error -110
Feb 28 05:11:01 localhost chronyd[726]: Forward time jump detected!
Feb 28 05:11:01 localhost chronyd[726]: Can't synchronise: no selectable sources
Feb 28 05:11:11 localhost kernel: usb 3-1: device descriptor read/64, error -110
Feb 28 05:11:11 localhost kernel: usb 3-1: reset high-speed USB device number 3 using xhci_hcd
Feb 28 05:11:16 localhost kernel: usb 3-1: device descriptor read/64, error -110
Feb 28 05:11:31 localhost kernel: usb 3-1: device descriptor read/64, error -110
Feb 28 05:11:32 localhost kernel: usb 3-1: reset high-speed USB device number 3 using xhci_hcd
Feb 28 05:11:32 localhost vhusbdx86_64[2264]: Device 31 [05c6:9091] BOUND to connection 8
Feb 28 05:11:33 localhost kernel: usb 3-1: USB disconnect, device number 3
Feb 28 05:11:33 localhost vhusbdx86_64[2264]: Device 31 [05c6:9091] SURPRISE UNBOUND from connection 8
Feb 28 05:11:33 localhost vhusbdx86_64[2264]: Unmanaging device 31 [05c6:9091]
Feb 28 05:11:34 localhost kernel: usb 3-1: new high-speed USB device number 4 using xhci_hcd
Feb 28 05:11:34 localhost kernel: usb 3-1: New USB device found, idVendor=05c6, idProduct=9091, bcdDevice= 3.10
Feb 28 05:11:34 localhost kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 28 05:11:34 localhost kernel: usb 3-1: Product: Android
Feb 28 05:11:34 localhost kernel: usb 3-1: Manufacturer: Android
Feb 28 05:11:34 localhost kernel: usb 3-1: SerialNumber: 0123456789ABCDEF
Feb 28 05:11:34 localhost vhusbdx86_64[2264]: Found High speed device [05c6:9091] "Android, Android" at address 31

Michael
.

Use a VirtualHere GUI client and then right click on the android phone and select Custom Event Handler and put in exactly this line

onReset.$VENDOR_ID$.$PRODUCT_ID$=

then press OK. Now try to use it again

dragana_pay
.

I have no option to use the VirtualHere client with GUI so I tried this:

[root@localhost ~]# /etc/init.d/vhclientx86_64 -t "CUSTOM EVENT,localhost.localdomain.11,onReset.$VENDOR_ID$.$PRODUCT_ID$="
OK
[root@localhost ~]# /etc/init.d/vhclientx86_64 -t LIST
VirtualHere Client IPC, below are the available devices:
(Value in brackets = address, * = Auto-Use)

Desktop Hub (localhost.localdomain:7575)
--> Android (localhost.localdomain.11)
--> VMware Virtual USB Mouse (localhost.localdomain.21)

Auto-Find currently on
Auto-Use All currently off
Reverse Lookup currently off
Reverse SSL Lookup currently off
VirtualHere Client not running as a service
[root@localhost ~]# /etc/init.d/vhclientx86_64 -t "USE,localhost.localdomain.11"
FAILED

This is the server side:
Feb 28 06:54:48 localhost vhusbdx86_64[1952]: Found High speed device [05c6:9091] "Android, Android" at address 11
Feb 28 06:55:39 localhost vhusbdx86_64[1952]: Set custom event "onReset.$.$="
Feb 28 06:55:58 localhost kernel: usb 1-1: reset high-speed USB device number 3 using ehci-pci
Feb 28 06:56:04 localhost kernel: usb 1-1: device descriptor read/64, error -110
Feb 28 06:56:04 localhost vhusbdx86_64[1952]: Device 11 [05c6:9091] BOUND to connection 1
Feb 28 06:56:05 localhost kernel: usb 1-1: USB disconnect, device number 3
Feb 28 06:56:05 localhost vhusbdx86_64[1952]: Device 11 [05c6:9091] SURPRISE UNBOUND from connection 1
Feb 28 06:56:05 localhost vhusbdx86_64[1952]: Unmanaging device 11 [05c6:9091]
Feb 28 06:56:06 localhost kernel: usb 1-1: new high-speed USB device number 4 using ehci-pci
Feb 28 06:56:06 localhost kernel: usb 1-1: New USB device found, idVendor=05c6, idProduct=9091, bcdDevice= 3.10
Feb 28 06:56:06 localhost kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 28 06:56:06 localhost kernel: usb 1-1: Product: Android
Feb 28 06:56:06 localhost kernel: usb 1-1: Manufacturer: Android
Feb 28 06:56:06 localhost kernel: usb 1-1: SerialNumber: 0123456789ABCDEF
Feb 28 06:56:06 localhost vhusbdx86_64[1952]: Found High speed device [05c6:9091] "Android, Android" at address 11

Michael
.

No you will have to escape the $ with a forward slash infront

It shouldnt say Set custom event "onReset.$.$="

It should say Set custom event "onReset.05c6.9091="

dragana_pay
Yeah thanks you are right :)

Yeah thanks you are right :)

[root@localhost ~]# /etc/init.d/vhclientx86_64 -t "CUSTOM EVENT,localhost.localdomain.11,onReset.\$VENDOR_ID\$.\$PRODUCT_ID\$="
OK
[root@localhost ~]# /etc/init.d/vhclientx86_64 -t "USE,localhost.localdomain.11"
OK

This is the server side log:

Feb 28 07:45:02 localhost vhusbdx86_64[1952]: 10.0.10.55 connected as connection 11
Feb 28 07:45:41 localhost vhusbdx86_64[1952]: Set custom event "onReset.05c6.9091="
Feb 28 07:45:47 localhost vhusbdx86_64[1952]: Executed "" for onReset.05c6.9091
Feb 28 07:45:47 localhost vhusbdx86_64[1952]: Device 11 [05c6:9091] BOUND to connection 11
Feb 28 07:45:48 localhost kernel: usb 1-1: USB disconnect, device number 2
Feb 28 07:45:48 localhost vhusbdx86_64[1952]: Device 11 [05c6:9091] SURPRISE UNBOUND from connection 11
Feb 28 07:45:48 localhost vhusbdx86_64[1952]: Unmanaging device 11 [05c6:9091]
Feb 28 07:45:49 localhost kernel: usb 1-1: new high-speed USB device number 3 using ehci-pci
Feb 28 07:45:49 localhost kernel: usb 1-1: New USB device found, idVendor=05c6, idProduct=9091, bcdDevice= 3.10
Feb 28 07:45:49 localhost kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 28 07:45:49 localhost kernel: usb 1-1: Product: Android
Feb 28 07:45:49 localhost kernel: usb 1-1: Manufacturer: Android
Feb 28 07:45:49 localhost kernel: usb 1-1: SerialNumber: 0123456789ABCDEF
Feb 28 07:45:49 localhost vhusbdx86_64[1952]: Found High speed device [05c6:9091] "Android, Android" at address 11

Now I have surprise unbound of the device

Michael
.

SURPRISE UNBOUND means that the device disconnected itself without any trigger from software.

Usually skipping a reset (some devices dont like an unexpected reset sent to them) resolves that issue but it seems your phone is still dropping.

Im not sure what else to try, what phone model is it and what android version?

dragana_pay
.

The android version is 6.0.1 and the Kernel version is 3.10.49.101111

Michael
.

What phone model is it?

dragana_pay
.

It's not a phone is a POS terminal with model number SATURN1000 from Castles

Michael
.

Sometimes USB devices disconnect themselves it due to a lack of power. But im not sure this is the issue here either, i dont think this phone will work with virtualhere

Log in or register to post comments