client.openTcp will block the real adb shell
I just find that the client.openTcp will block the real adb shell some time for android 6.x and 7.x
Are you using tethering on your device?
Nope, I just use client.startService and then try to use client.openTcp to connect to the port on device. But the openTcp will block the adb of the device, event if I use command line adb shell, it will block forever. I just test it on Pixel. It may not happen everytime, but with some probability
I get the conn after first call client.openTcp, should I call con.end() before I exit the process?
Check if forwards behave the same (without adbkit). Start the service and forward a local port to the device port. Connect and see if the same thing happens.
Also, check once more whether tethering is enabled or not. If it is, turn it off.
I am sure tethering is not enabled. It just happen with Android 6.0.1,android android 7.x for sometime.
Is there something wrong with the my situation that I resue the same adbClient object for a lot of commands ?
I think you're going to have to show your code. Please try to make a minimal test case that shows the behavior.