uiautomtor2安装,android自动化

时间:2019-07-05
本文章向大家介绍uiautomtor2安装,android自动化,主要包括uiautomtor2安装,android自动化使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

原生uiautomator2手机环境配置
python -m uiautomator2 init
1.获取cpu abi
adb shell getprop ro.product.cpu.abi
2.获取sdk version
adb shell getprop ro.build.version.sdk
3.根据cpu abi和sdk version 找到对应的 minicap, minicap.so, minitouch, atx-agent
push 到 /data/local/tmp/minicap
/data/local/tmp/minicap.so
/data/local/tmp/minitouch
/data/local/tmp/atx-agent
adb push [minicap path] /data/local/tmp/minicap
adb push [minicap.so path] /data/local/tmp/minicap.so
adb push [minitouch path] /data/local/tmp/minitouch
adb push [atx-agent path] /data/local/tmp/atx-agent

4.执行命令
adb shell chmod 755 /data/local/tmp/atx-agent

卸载uiautomator
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