Kotlin中的命令执行

发布于 2025-01-28 13:45:35 字数 308 浏览 3 评论 0原文

我想执行此命令:

runtime.getRuntime()。exec(“ adb shell dpm set-set-device-owner com.example.msgshareapp/.adminreceiver”)

这不起作用,然后我尝试了此:

runtime.getRuntime()。exec(“ dpm set-set-device-owner com.example.msgshareapp/.adminreceiver”)

,无论如何,这一切都没有完全执行此命令?

I want to execute this command:

Runtime.getRuntime().exec("adb shell dpm set-device-owner com.example.msgshareapp/.AdminReceiver")

This didn't work, then I tried this:

Runtime.getRuntime().exec("dpm set-device-owner com.example.msgshareapp/.AdminReceiver")

And this does completly nothing, anyway of executing this command?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨洒年华 2025-02-04 13:45:35
val command = arrayOf("adb", "shell", "dpm", "set-device-owner", "com.example.msgshareapp/.AdminReceiver")
Runtime.getRuntime().exec(command)
val command = arrayOf("adb", "shell", "dpm", "set-device-owner", "com.example.msgshareapp/.AdminReceiver")
Runtime.getRuntime().exec(command)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文