android - 一键式安卓应用 killer

标签 android genymotion kill-process

我正在 Genymotion 模拟器中调试应用程序,当应用程序开始出现异常时,我已经厌倦了终止应用程序。梦想是有一些预先配置的一键式(一键式)应用程序 killer 来终止(或卸载)一个特定的应用程序。

你能推荐一些吗?我的谷歌搜索没有给出任何不错的结果。我找到的所有应用程序都需要比内置应用程序管理器更多的点击次数。

所有 Genymotion 虚拟设备都已预 root。

最佳答案

如果它是您开发的应用程序,您为什么不选择添加快捷方式

adb uninstall your.app

您还可以使用

删除和清除所有数据
adb shell pm clear com.my.app.package

或者用linux命令杀死它

adb -d shell
android $ su
android # ps
android # kill <process id from ps output>

或强行停止

adb shell am force-stop com.yourapp

或者创建一个简单的应用程序,在启动时或单击按钮时执行此操作

Process process = Runtime.getRuntime().exec("su");
DataOutputStream outputStream = new DataOutputStream(process.getOutputStream());
outputStream.writeBytes("busybox killall yourprocess\n");
outputStream.flush();
outputStream.writeBytes("exit\n");
outputStream.flush();
process.waitFor();

等等

关于android - 一键式安卓应用 killer ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24279124/

相关文章:

linux - killall(1) 等效系统调用或 C 库调用

linux - 如何杀死所有从 "lsof -i"开始处理的内容

java - ListView 无法正确显示自定义数组适配器?

android - 更新 Android SDK 和 ADT 后出现 Ksoap2 错误

android - 在 Intellij Genymotion 插件上运行 Android 应用程序时失败 [INSTALL_FAILED_DEXOPT]

android - Genymotion 模拟器增加堆大小

android-studio - 找不到Genymotion.app

使用 MSGPack Core 和 Jackson Mapper 的 Android - 解码未知类型的类变量

android - 您可以将 DBFlow Android ORM 与应用程序打包的现有数据库一起使用吗?

mysql - 当进程未出现在进程列表中时杀死 mysql "add columns"