UiAutomator 大家来讨论下 UiAutomator2.0 中 Shell 执行?

SkySeraph · 2017年08月29日 · 最后由 jack 回复于 2022年05月12日 · 1258 次阅读

如题。
UiAutomator2.0 中提供了新的 API xx..executeShellCommand 来替代 Runtime.getRuntime().exec。 如果继续使用老的方式,可能遇到各种权限和坑的问题,毕竟 APK 和 Jar 还是有很大差异的,大家有没有好的解决方案?

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 6 条回复 时间 点赞

只有 root 手机这条出路

都用 uiautomator2 了,为什么不用 executeShellCommand
还是说非要用 1?

API 21+, 低版本手机不支持.

按 android API 不同作区分啊

bauul 回复

😓 😅

问下 xx..executeShellCommand 这个如何使用 root 权限输入命令呢

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册