LoginSignup
1
2

More than 5 years have passed since last update.

Androidの時計をシェルスクリプトから補正する(要root)

Last updated at Posted at 2016-02-17

コマンド

$ adb shell "su -c 'date `date +%s`'"

説明

adbのシェルから時刻を補正するにはdateコマンドの引数にUNIXタイムを指定する.(ただしroot権限が必要)
UNIXタイムはdate +%sで取得できる.
誤差は最大1秒出てしまうので注意.

誤差を少なくする方法については別途書き起こす予定.
こちらの記事にまとめました.

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2