Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean runChmod777(String myfile) {
- Process process = null;
- try {
- process = Runtime.getRuntime().exec("su -c chmod 0777 myfile");
- process.waitFor();
- } catch (Exception e) {
- Log.d("*** DEBUG ***", "Unexpected error - Here is what I know: "+e.getMessage());
- return false;
- }
- finally {
- try {
- process.destroy();
- } catch (Exception e) {
- // nothing
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement