先准备一台(不要两台)开启了开发者选项
的安卓手机,连接上电脑,确保执行adb devices
可以看到连接上的设备。
# adb devices
# adb tcpip 5555
# adb connect 192.168.1.188
安装 uiautomator2(https://github.com/openatx/uiautomator2)
pip3 install -U uiautomator2
运行安装包含httprpc服务的apk到手机+atx-agent, minicap, minitouch
(在过去的版本中,这一步是必须执行的,但是从1.3.0之后的版本,当运行python代码u2.connect()
时就会自动推送这些文件了)
python3 -m uiautomator2 init
安装 weditor
pip3 install -U weditor
启动方法
python3 -m weditor