openatx / uiautomator2

Android Uiautomator2 Python Wrapper
MIT License
6.26k stars 1.36k forks source link

Can't connect inside a docker container #931

Closed DillerDurak closed 2 months ago

DillerDurak commented 6 months ago

While connecting to a device I get ConnectionRefusedError (image 1), though in docker-compose file I added extra_hosts and enviroment (image 2). Also I can get list of connected devices from the container using adb devices and do another adb things such as shell and stuff. Why I can't do same things in uiautomator2 (version 2.16.14)?
image image

codeskyblue commented 2 months ago

try to change ANDROID_ADB_SERVER_ADDRESS to ANDROID_ADB_SERVER_HOST