Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void changePermission(String filename) {
- try {
- Process sh = Runtime.getRuntime().exec("su", null,
- new File("/system/bin/"));
- OutputStream os = sh.getOutputStream();
- os.write(("pm install" +/sdcard/app.apk).getBytes("UTF-8"));
- os.flush();
- os.close();
- sh.waitFor();
- } catch (Exception ex) {
- Log.e("CHMOD ERROR", ex.getMessage());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement