如何卸载从/系统/应用自己的应用程序?

如何卸载从/系统/应用自己的应用程序?

问题描述:

我能够自己的应用程序安装到使用亚行的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();}
    }