Process process = null;
       DataOutputStream os = null;
       try {String command = "chmod 777 " + "data";
           
        process = Runtime.getRuntime().exec("su");
           os = new DataOutputStream(process.getOutputStream());
           os.writeBytes(command + "\n");
           os.writeBytes("exit\n");
           os.flush();
           process.waitFor();
       } catch (Exception e) {
           
       } finally {
           try {
               if (os != null) {
                   os.close();
               }
               process.destroy();
           } catch (Exception e) {
           }
       }
这样可以访问data文件夹