2

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?

1 Answer 1

3

I 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .