Android包管理器无法使用ICS工作管理器、工作、Android、ICS

由网友(如果我爱你能倒过来写ヽ)分享简介:4.0之前,这是正常工作,但4.0后,我不能像卸载下午com.abcBefore 4.0,It's work normally, but after 4.0,I can't run it like "pm uninstall com.abc"我的code是这样的:my code like this:try {...

4.0之前,这是正常工作,但4.0后,我不能像卸载下午com.abc

Before 4.0,It's work normally, but after 4.0,I can't run it like "pm uninstall com.abc"

我的code是这样的:

my code like this:

try {
                // Executes the command.
                Process process = Runtime.getRuntime().exec("pm uninstall me.onemobile.android");
                DataOutputStream toProcess = new DataOutputStream(process.getOutputStream());
                toProcess.writeBytes("exec " + "shell pm uninstall me.onemobile.android" + "n");
                toProcess.flush();
            } catch (IOException e) {
                System.out.println(e.getMessage());
                throw new RuntimeException(e);
            }

当我运行它,它的表现是这样的:

when I run it,it's show like this:

[1] + Stopped (signal)

有一定的差异,当我在root身份运行卸载下午com.test,它只是显示

There some difference when i run "pm uninstall com.test" in root,and it just show

[1] + Stopped (signal)

但运行亚行外壳时卸载com.test的时候,它的工作,所以它让我疯了。

but when run "adb shell pm uninstall com.test" ,It's work, so it's make me crazy.

任何帮助或暗示将AP preciate。

any help or hint will be appreciate.

推荐答案

试试这个code

  toProcess.writeBytes("export LD_LIBRARY_PATH=/vendor/lib:/system/lib" + "n"); 
  toProcess.writeBytes("exec " + "shell pm uninstall me.onemobile.android" + "n"); 
  toProcess.flush(); 
阅读全文

相关推荐

最新文章