在没有 root 权限的情况下杀死使用 Monkey 启动的 Android 应用程序

发布于 2025-01-17 18:38:38 字数 309 浏览 5 评论 0 原文

我正在使用猴子在Android设备上进行测量。我启动了一系列应用程序,一定时间后我应该杀死一个应用程序。可以在不解锁智能手机上的根本权限的情况下执行此操作吗? 我尝试了几个命令,包括:

adb shell am force-stop com.samsung.android.calendar

adb shell am kill com.samsung.android.calendar

不幸的是,这些命令无法正常工作,或者它们当场工作,但是几秒钟后,猴子重新启动了应用程序。 我发现其他命令需要您解锁智能手机上的根本权限,我应该避免使用。

I am using Monkey to take measurements on an Android device. I launch a series of applications and after a certain amount of time I should kill one. Is it possible to do this without unlocking the root permissions on the smartphone?
I've tried several commands, including:

adb shell am force-stop com.samsung.android.calendar

adb shell am kill com.samsung.android.calendar

Unfortunately these commands don't work or maybe they work on the spot, but after a few seconds Monkey relaunches the application.
I found other commands that however require you to unlock the root permissions on the smartphone, which I should avoid.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文