I need to change time on my phone while screen is powered off (because of some notifications I need to test).

On other devices I did this in adb shell as root by typing:

    date -s "YYYYMMDD.hhmmss"

But on this device my command has no effect (just printing out current time).

Do you have any advices?

1 Answer 1


I found answer here: https://stackoverflow.com/questions/32498628/change-date-on-rooted-device-android-m

I used wrong date format, apparently since Android M I should use

   adb shell date $(date +%m%d%H%M%Y)

This works to me (in adb shell signed as root):

toolbox date -s 20161231.235959                          
Sat Dec 31 23:59:59 GMT 2016

You must log in to answer this question.

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