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
Random adb ports in Android 11+ #36
Comments
from ENV? for example env:ANDROID_ADB_SERVER_PORT |
Hi, I'm not looking for the port of the adb server, but the adb port of the client device. Android 10 and below I believe always used 5555, but now it is random. My adb server is Windows 10 but don't think that matters. I believe the random port can be between 30000 and 60000, but not 100% sure. Maybe a multi threaded port scan function could be added? |
I solved this by making a multi threaded port scanner and attempting to connect. This may not work right out of the box (I tried to copy the relevant parts out of my script)
I will keep this open, but if the dev would like to close it that's fine. It would be nice to see the functionality added to this library. |
I'm still struggling to find a good solution to this, as port scanning is slow. Honestly I do not understand why Android decided to go with the random ports and complicated pairing process. |
In Android 11 it appears to choose a random ADB port (from what I've seen between 30000 and 50000)... what's the best way to find the port number from python?
This might not be all devices, but it's what I've observed on Pixel 3 and 2.
The text was updated successfully, but these errors were encountered: