uiautomator2 : https://github.com/openatx/uiautomator2
python -m uiautomator2 init
如果出错手动
源文件下载:https://testerhome.com/topics/17257
Manual Init
安装 app-uiautomator、app-uiautomator-test
adb install app-uiautomator.apk
adb install app-uiautomator-test.apk安装minicap和minitouch
Push https://github.com/openatx/stf-binaries/raw/master/node_modules/minitouch-prebuilt/prebuilt/arm64-v8a/bin/minitouch -> /data/local/tmp/minitouch:0755
Push https://github.com/openatx/stf-binaries/raw/master/node_modules/minicap-prebuilt/prebuilt/arm64-v8a/lib/android-24/minicap.so -> /data/local/tmp/minicap.so:0755
Push https://github.com/openatx/stf-binaries/raw/master/node_modules/minicap-prebuilt/prebuilt/arm64-v8a/bin/minicap -> /data/local/tmp/minicap:0755安装atx-agent
adb push atx-agent /data/local/tmp/
adb shell chmod 755 /data/local/tmp/atx-agent # 注: 如果在/data/local/tmp 目录不好使,就push到/data/data/com.android.shell目录下
/data/local/tmp/atx-agent version # 查看版本
/data/local/tmp/atx-agent server -d # # 启动atx-agent并切换到后台运行卸载方法
adb shell rm /data/local/tmp/minicap
adb shell rm /data/local/tmp/minicap.so
adb shell rm /data/local/tmp/minitouch
adb shell /data/local/tmp/atx-agent server --stop
adb shell rm /data/local/tmp/atx-agent
adb uninstall com.github.uiautomator
adb uninstall com.github.uiautomator.test