Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.openTcp will block the real adb shell #72

Open
harlentan opened this issue May 12, 2017 · 6 comments
Open

client.openTcp will block the real adb shell #72

harlentan opened this issue May 12, 2017 · 6 comments

Comments

@harlentan
Copy link

I just find that the client.openTcp will block the real adb shell some time for android 6.x and 7.x

@sorccu
Copy link
Member

sorccu commented May 12, 2017

Are you using tethering on your device?

@harlentan
Copy link
Author

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

@harlentan
Copy link
Author

I get the conn after first call client.openTcp, should I call con.end() before I exit the process?

@sorccu
Copy link
Member

sorccu commented May 12, 2017

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.

@harlentan
Copy link
Author

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 ?

@sorccu
Copy link
Member

sorccu commented May 17, 2017

I think you're going to have to show your code. Please try to make a minimal test case that shows the behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants