`
44289533
  • 浏览: 64910 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

android 文件 修改权限

 
阅读更多
//shPath = /system/bin/sh
//shellCommand = chmod 0777 路径
public static int executeShell(String shellCommand) {
		int success = 0;
		try {
			Process pid = null;
			String[] cmd = { shPath, "-c", shellCommand };
			// Shell命令を執行
			pid = Runtime.getRuntime().exec(cmd);
			if (pid != null) {
				pid.waitFor();
			} else {
				
			}
			success = 1;
		} catch (Exception e) {
			
		}
		return success;
	}

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics