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

SkySeraph · August 29, 2017 · Last by jack replied at May 12, 2022 · 1283 hits

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

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

只有 root 手机这条出路

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

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

按 android API 不同作区分啊

bauul 回复

😓 😅

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

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up