我正在 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/