android 之 静默卸载
来源:互联网 发布:virtualbox安装mac镜像 编辑:程序博客网 时间:2024/05/02 01:17
一个个卸载软件,弹出卸载软件提示好麻烦,现在特作出下列方法,可以静默卸载
静默安装敬请期待。。。。
//下面3句是静默卸载系统软件命令
String busybox="mount -o remount rw /system";
String chmod="chmod 777 /system/app/HtcTwitter.apk";
uninstallapk="rm -r /system/app/HtcTwitter.apk";
//下面3句是静默卸载第三方软件命令
String busybox1="mount -o remount rw /data";
String chmod1="chmod 777 /data/app/com.yingyonghui.market-2.apk";
uninstallapk1="pm uninstall com.yingyonghui.market";
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();
}
}
- android 之 静默卸载
- Android 静默安装 静默卸载 探索之路
- Android实现静默卸载
- android静默安装、静默卸载apk方法
- Android静默安装和静默卸载
- Android--静默安装和静默卸载
- Android静默安装和静默卸载
- Android静默安装和静默卸载
- android实现静默卸载和静默安装
- Android静默安装和静默卸载
- Android静默安装和静默卸载
- android静默安装与静默卸载
- Android随笔之——静默安装、卸载[转]
- android 实现静默安装、卸载
- android 实现静默安装、卸载
- android 实现静默安装、卸载
- android 实现静默安装、卸载
- Android静默安装卸载程序
- 13.2.15. Restrictions on InnoDB Tables
- 孟岩谈如何学习modern C++
- iOS开发知识与能力体系 思维导图
- mysql 空值 与 ''
- MTK Android 菜鸟上手之旅
- android 之 静默卸载
- JSch - Java实现的SFTP(文件上传详解篇)
- iOS开发那些事-如何编译iOS程序
- Linux1.0 kernel bootsect.S 学习日记
- <高手分享:全方面了解问题步骤录制器工具>
- 自动删除javascript中的logging语句
- Pro Android学习笔记(一):Android平台
- 深入剖析Socket实现
- 使用XML生成菜单