1. 静默卸载怎么搞?
2. 手机必须root过吗?
3. 我的代码必须有root权限吗?
2. 手机必须root过吗?
3. 我的代码必须有root权限吗?
解决方案 »
- 安卓ImageView获取本地G盘图片遇到的问题!
- 对于手势事件里面的onfling()方法,能具体获取到移动了多少距离吗?
- Android APP中如何打开浏览器 并以POST方式传递参数
- dialog存在时,怎么捕获手机back键的按下事件?
- 如何对android SMS系统数据的数据进行分组查询
- 请教:HttpClient的execute()方法
- 每个硬件品牌都有自己的应用商店?
- android studio debug模式提示:target package is not specified in androidmanifest.xml
- 控制台报错
- android源码右上角的menu键怎么去掉
- 关于锤子rom问题
- 如何使用纯代码实现不带图片的radiobutton?
String busybox1="mount -o remount rw /data";
String chmod1="chmod 777 /data/app/com.yingyonghui.et-2.apk";
uninstallapk1="pm uninstall com.yingyonghui.et";
chmodApk(busybox1,chmod1);
/*
* 对要卸载的apk赋予权限
*/
public void chmodApk(String busybox ,String chmod)
{
try {
Process process = null;
DataOutputStream os = null;
process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
os.writeBytes(busybox);
os.flush();
os.writeBytes(chmod);
os.flush();
os.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
/*
* 卸载apk
*/
public void uninstallApk(String uninstallapk)
{
try {
Process process = null;
DataOutputStream os = null;
process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
os.writeBytes(uninstallapk);
os.flush();
os.close();
} catch (Exception ex) {
ex.printStackTrace();
}