【发布时间】:2014-10-15 11:42:39
【问题描述】:
我尝试在我的根手机上卸载应用程序,我使用来自How to uninstall Android App with root permissions? 的代码,我尝试了这个建议,但我失败了。 这是我的代码:
Process process;
try {
process = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(process.getOutputStream());
os.writeBytes("pm uninstall com.lixiancheng.orangemusic"+"; \n");
os.flush();
} catch (IOException e) {
e.printStackTrace();
}
为什么我无法卸载应用程序?代码有问题吗?
【问题讨论】:
-
我认为 \n 在这里无效。
-
我尝试删除这些\n,再次失败。
标签: android uninstallation rooted-device