• 本人弄了一台 PC A,连接手机,然后再从另外一台 PC B 通过 SSH 登录到 PC A 上,然后运行” python -m uiautomator2 init”,就会提示连接超时,log 如下。但是我如果直接在 PC A 上运行就可以正常的初始化成功。麻烦楼主帮忙看看问题

    [root@e2e ~]# python -m uiautomator2 init
    2018-05-22 17:55:30,921 - main.py:269 - INFO - Detect pluged devices: [u'c3718c7c']
    2018-05-22 17:55:30,921 - main.py:286 - INFO - Device(c3718c7c) initialing ...
    2018-05-22 17:55:31,214 - main.py:113 - INFO - install minicap
    2018-05-22 17:55:31,385 - main.py:120 - INFO - install minitouch
    2018-05-22 17:55:31,626 - main.py:137 - INFO - apk(1.0.12) already installed, skip
    2018-05-22 17:55:31,679 - main.py:175 - INFO - atx-agent(0.2.1) already installed, skip
    2018-05-22 17:55:31,842 - main.py:212 - INFO - launch atx-agent daemon
    Traceback (most recent call last):
    File "/usr/lib64/python2.7/runpy.py", line 162, in run_module_as_main
    "
    main", fname, loader, pkg_name)
    File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
    File "/usr/lib/python2.7/site-packages/uiautomator2/
    main.py", line 348, in
    main()
    File "/usr/lib/python2.7/site-packages/uiautomator2/
    main.py", line 344, in main
    fire.Fire(MyFire)
    File "/usr/lib/python2.7/site-packages/fire/core.py", line 127, in Fire
    component_trace = _Fire(component, args, context, name)
    File "/usr/lib/python2.7/site-packages/fire/core.py", line 366, in _Fire
    component, remaining_args)
    File "/usr/lib/python2.7/site-packages/fire/core.py", line 542, in _CallCallable
    result = fn(*varargs, **kwargs)
    File "/usr/lib/python2.7/site-packages/uiautomator2/
    main.py", line 273, in init
    ignore_apk_check)
    File "/usr/lib/python2.7/site-packages/uiautomator2/
    main.py", line 295, in _init_with_serial
    ins.launch_and_check()
    File "/usr/lib/python2.7/site-packages/uiautomator2/
    main_.py", line 225, in launch_and_check
    'http://localhost:%d/version' % lport, timeout=3)
    File "/usr/lib/python2.7/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
    File "/usr/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
    File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
    File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
    File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 521, in send
    raise ReadTimeout(e, request=request)
    requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=52630): Read timed out. (read timeout=3)

  • 我的 andriod 连接成功后,显示手机屏幕的窗口很小,而且没法拖动窗口,请问这个是兼容
    性问题,还是配置问题?