Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public void changePermission(String filename) {
  2. try {
  3. Process sh = Runtime.getRuntime().exec("su", null,
  4. new File("/system/bin/"));
  5. OutputStream os = sh.getOutputStream();
  6. os.write(("pm install" +/sdcard/app.apk).getBytes("UTF-8"));
  7. os.flush();
  8. os.close();
  9. sh.waitFor();
  10. } catch (Exception ex) {
  11. Log.e("CHMOD ERROR", ex.getMessage());
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement