adb/atx测试->总结

adb/atx测试->总结_第1张图片
adb/atx测试->总结_第2张图片
7.当adb安装成功以后,会在后台启动一个adb server 程序,与移动设备上的adbd程序相对应,adbd是在安卓系统后台中启动的一个程序。(这个adbd应该跟atx没关系,虽然都是守护进程,用没有安装atx 的手机试试,atx 应该是为了uiautomator2自动化框架服务的)
先连adb再连atx服务u2.connect(“192.168.1.12”)则成功;
adb没有连接之前直接连atx服务u2.connect(“192.168.1.12”)会失败;
直接u2.connect_adb_wifi(‘192.168.1.12’)这个connect_adb_wifi是先连了adb再连了atx;
说明atx依赖于adb成功连接的基础上

import uiautomator2 as u2
先连adb再连atx服务u2.connect(“192.168.1.12”)则成功
u2.connect(“192.168.1.12”)
[W 220514 10:35:40 init:218] [pid:48570] atx-agent has something wrong, auto recovering
[I 220514 10:35:40 init:362] [pid:48570] [192.168.1.12] wait-for-device, time left(3.0s)
[D 220514 10:35:40 init:322] [pid:48570] [192.168.1.12] device 192.168.1.12 is online
[I 220514 10:35:41 init:156] uiautomator2 version: 2.16.13
[D 220514 10:35:41 init:167] Shell: (‘/data/local/tmp/atx-agent’, ‘server’, ‘–stop’)
[I 220514 10:35:42 init:285] skip version check for atx-agent dev
[D 220514 10:35:42 init:167] Shell: (‘/data/local/tmp/atx-agent’, ‘server’, ‘–nouia’, ‘-d’, ‘–addr’, ‘127.0.0.1:7912’)
[I 220514 10:35:42 init:350] Check atx-agent version
[D 220514 10:35:42 init:359] Forward: local:tcp:52119 -> remote:tcp:7912
[D 220514 10:35:43 init:359] Forward: local:tcp:52123 -> remote:tcp:7912
[D 220514 10:35:43 init:362] atx-agent version dev
[D 220514 10:35:43 init:365] device wlan ip: 192.168.1.12

adb没有连接之前直接连atx服务u2.connect(“192.168.1.12”)会失败
u2.connect(“192.168.1.12”)
[W 220514 10:46:12 init:218] [pid:48570] atx-agent has something wrong, auto recovering
[I 220514 10:46:12 init:362] [pid:48570] [192.168.1.12] wait-for-device, time left(3.0s)
[I 220514 10:46:13 init:362] [pid:48570] [192.168.1.12] wait-for-device, time left(2.0s)
[I 220514 10:46:14 init:362] [pid:48570] [192.168.1.12] wait-for-device, time left(1.0s)
Traceback (most recent call last):
File “”, line 1, in
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 1914, in connect
return connect_usb(addr)
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 1955, in connect_usb
return Device(serial)
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 262, in init
wlan_ip = self.wlan_ip
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 453, in wlan_ip
ip = self.http.get(“/wlan/ip”).text.strip()
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/requests/sessions.py”, line 555, in get
return self.request(‘GET’, url, **kwargs)
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 223, in request
self.__client._prepare_atx_agent()
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 321, in _prepare_atx_agent
raise RuntimeError(“USB device %s is offline” % self._serial)
RuntimeError: USB device 192.168.1.12 is offline
u2.connect(“192.168.1.12”)
[W 220514 10:46:18 init:218] [pid:48570] atx-agent has something wrong, auto recovering
[I 220514 10:46:18 init:362] [pid:48570] [192.168.1.12] wait-for-device, time left(3.0s)
[I 220514 10:46:19 init:362] [pid:48570] [192.168.1.12] wait-for-device, time left(2.0s)
[I 220514 10:46:20 init:362] [pid:48570] [192.168.1.12] wait-for-device, time left(1.0s)
Traceback (most recent call last):
File “”, line 1, in
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 1914, in connect
return connect_usb(addr)
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 1955, in connect_usb
return Device(serial)
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 262, in init
wlan_ip = self.wlan_ip
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 453, in wlan_ip
ip = self.http.get(“/wlan/ip”).text.strip()
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/requests/sessions.py”, line 555, in get
return self.request(‘GET’, url, **kwargs)
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 223, in request
self.__client._prepare_atx_agent()
File “/Users/shiwy/.pyenv/versions/3.6.0/lib/python3.6/site-packages/uiautomator2/init.py”, line 321, in _prepare_atx_agent
raise RuntimeError(“USB device %s is offline” % self._serial)
RuntimeError: USB device 192.168.1.12 is offline
直接u2.connect_adb_wifi(‘192.168.1.12’)这个connect_adb_wifi是先连了adb再连了atx;说明atx依赖于adb成功连接的基础上。
u2.connect_adb_wifi(‘192.168.1.12’)
connected to 192.168.1.12:5555
[W 220514 10:47:01 init:218] [pid:48570] atx-agent has something wrong, auto recovering
[I 220514 10:47:01 init:362] [pid:48570] [192.168.1.12] wait-for-device, time left(3.0s)
[D 220514 10:47:01 init:322] [pid:48570] [192.168.1.12] device 192.168.1.12 is online
[I 220514 10:47:01 init:156] uiautomator2 version: 2.16.13
[D 220514 10:47:01 init:167] Shell: (‘/data/local/tmp/atx-agent’, ‘server’, ‘–stop’)
[I 220514 10:47:02 init:285] skip version check for atx-agent dev
[D 220514 10:47:02 init:167] Shell: (‘/data/local/tmp/atx-agent’, ‘server’, ‘–nouia’, ‘-d’, ‘–addr’, ‘127.0.0.1:7912’)
[I 220514 10:47:02 init:350] Check atx-agent version
[D 220514 10:47:02 init:359] Forward: local:tcp:52406 -> remote:tcp:7912
[D 220514 10:47:02 init:359] Forward: local:tcp:52410 -> remote:tcp:7912
[D 220514 10:47:03 init:362] atx-agent version dev
[D 220514 10:47:03 init:365] device wlan ip: 192.168.1.12

你可能感兴趣的:(android)