通过编程方式卸载应用 [英] Uninstall an app programmatically

查看:141
本文介绍了通过编程方式卸载应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个用于卸载应用程序的开源应用程序.我该怎么办?

I want to develop an open source app for uninstalling applications. How can I do this?

获得根访问权限后,如何卸载/system/app/中的应用程序?

And how can I uninstall an app that is in /system/app/ after I gain root access?

谢谢

推荐答案

如果您具有root这样的访问权限,则可以在应用程序中执行adb commands

You can execute adb commands from within your app if you have root access like this

Process process = Runtime.getRuntime().exec("your command");
BufferedReader bufferedReader = new BufferedReader(
                                    new InputStreamReader(process.getInputStream()));

还要为此代码使用try catch

这篇关于通过编程方式卸载应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆