android 获取root修改系统时间

SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMdd.HHmmss");
		  String datetime=sdf.format(ServiceTime);  
		String command = "date -s\""+datetime+"\"";
		try {
			Runtime.getRuntime().exec(new String[] {command});
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		};

你可能感兴趣的:(android,java)