如何卸载从/系统/应用自己的应用程序? [英] How to uninstall own app from /system/app?

查看:99
本文介绍了如何卸载从/系统/应用自己的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够自己的应用程序安装到使用亚行的shell命令/系统/应用程序。但如何将其卸载?是否有任何命令来做到这一点?我的手机是植根。

I'm able to install own application into /system/app using adb shell commands. But how to uninstall it? Is there any commands to do it? My phone is rooted.

推荐答案

使用手动卸载ADB:

HTTP:// WWW .careace.net / 2010/05/12 /如何到删除 - Android的应用程序 - 通过-ADB /

编程方式:

    public static void deleteFromSystem (final String file)
    {
        try 
        {
            if (new File(file).exists())
            {
                String  path        = new File(file).getParent();
                Process process     = Runtime.getRuntime().exec("su");
                DataOutputStream os = new DataOutputStream(process.getOutputStream());
                os.writeBytes("mount -o rw,remount /system; \n");
                os.writeBytes("chmod 777 "      + path + "; \n");
                os.writeBytes("chmod 777 "      + file + "; \n");
                os.writeBytes("rm -r "          + file + "; \n");
                os.writeBytes("mount -o ro,remount /system; \n");
                os.writeBytes("reboot \n");
                os.flush();
                os.close();
                process.waitFor();
            }
        } 
        catch (Throwable e) {e.printStackTrace();}
    }

这篇关于如何卸载从/系统/应用自己的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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