[Python] ADB in WSL2 is not working on uiautomator2 python

Discussão em 'Python' iniciado por Stack, Dezembro 6, 2024.

  1. Stack

    Stack Membro Participativo

    I want to use ADB for both Windows (Host machine) and WSL2. On the current setup, when using adb device for both Windows and WSL2 are working fine. But for some reason in WSL2 by running the uiautomator2 init -s xxxxxx seems have an issue when forwarding the port. It also happens to other python package(s) that are related to adb. In WSL1 no issue with adb, but in WSL2 not working properly. I'm new in wsl2 so please give me some advice on this case.

    Thank you

    Windows:


    ADB version and devices

    WSL2


    ENV:

    ANDROID_ADB_SERVER_HOST="host.docker.internal"
    ANDROID_ADB_SERVER_PORT=5037
    ANDROID_ADB_SERVER_ADDRESS="host.docker.internal"


    WSL2 distro version
    WSL2 ADB version and uiautomator logs
    WSL2 ADB version and uiautomator logs

    Continue reading...

Compartilhe esta Página