adb shell 进入android系统,修改权限 .............烂招.

解决方案 »

  1.   


    是app的权限啊  我需要用app来删除
      

  2.   

    我也来支烂招...        String command = "rm /data/***";  // the command that will be execute
            Runtime runtime = Runtime.getRuntime();  
            Process proc = null;
                
    try {
    proc = runtime.exec(command);
    } catch (IOException e1) {
    e1.printStackTrace();
    }
        
            // put a BufferedReader on the ps output 
            InputStream inputstream = proc.getInputStream();
            InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
            BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
        
            // read the ps output and show it to screen.
            ...
            ...        // judge the return value     
            try {
                if (proc.waitFor() != 0) {
                    System.err.println("exit value = " + proc.exitValue());
                } 
            }
            catch (InterruptedException e) {
                System.err.println(e);
            }
      

  3.   

    rm的话只用第一个try和最后一个try里面的就可以了,中间的可以不要
      

  4.   

    似乎不行   返回错误:
    04-12 09:50:30.279: WARN/System.err(1542): exit value = 255
      

  5.   

    data目录除非你是root或者system用户组,要不是无法执行的。即使你加上了  WRITE_INTERNAL_MEMORY也是不可以的。最重要的是你是用sdk来开发三方软件,似乎无解。
      

  6.   

    基本的linux知识,应用程序只是普通用户,没有那么高的权限,不可能的事情不要想了。
    app可以在自己的目录里作事情,context有getfile之类的方法可以获取私有目录。
      

  7.   


    俺是Linux白痴啊
    看来要补一补了