How can I update android time via ADB?
I know I can run this comand via windows cmd:
adb shell date -s 20140414.130000
But I need to synchronize the time with my windows machine.
Is this possible to accomplish?
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.
Sign up to join this communityI found a solution for this by using the perl.
I created this perl script, which sends the current date with the correct format to the android device via adb:
use Time::localtime;
$_=localtime;
system'adb','shell','date -s',sprintf("%04d%02d%02d.%02d%02d%02d",$_->year+1900,$_->mon+1,$_->mday,$_->hour,$_->min,$_->sec)
Then I just need to open cmd
and run this:
perl < clock.pl