I need to connect Android phone to my DUT through USB and I have to connect and disconnect the device, and I need to send/receive data from phone to DUT through phone UI, To automate this I have used adb through wifi, and to disconnect device from DUT I am disabling and enabling USB debugging. While doing that my adb connection I am loosing adb connection also, how can I automate this scenario?
And I am using AndroidViewClient to automate the android.