Androidシステムタイムコードの変更
800 ワード
//
try {
Process process = Runtime.getRuntime().exec("su");
// 【 yyyyMMdd.HHmmss】
String formatDate = DateTimeUtils.toModifySystemDateTimeFormat(date);
DataOutputStream os = new DataOutputStream(process.getOutputStream());
os.writeBytes("setprop persist.sys.timezone GMT
");
os.writeBytes("/system/bin/date -s "+formatDate+"
");
os.writeBytes("clock -w
");
os.writeBytes("exit
");
os.flush();
} catch (Exception e) {
Tracker.e(e);
}